EmbeddedRelated.com
Forums
Memfault Beyond the Launch

New to USB Device Driver Development

Started by Paulus August 28, 2006
Hi - I have an mechanical device which has 6 different operational
functions. I want to develop a USB interface for the device.
Effectively, I want to replace a manual "six position" switch with a
USB solution so I can control the device through software.

1. How should I select a USB controller
2. How should I select a Firmware solution
3. How best should I develop the software to communicate with the
firmware.

I am a novice and would appreciate any guidance. Is this possible?

Thank you

Paul

Paulus wrote:

> Hi - I have an mechanical device which has 6 different operational > functions. I want to develop a USB interface for the device. > Effectively, I want to replace a manual "six position" switch with a > USB solution so I can control the device through software. > 1. How should I select a USB controller
Any controller will do the job, it's a case of cost, tools, package and language of choice. IIRC there are PIC solutions, ARM solutions, 8051 solutions and proprietary solutions.
> 2. How should I select a Firmware solution
That depends entirely on the answer to #1 above.
> 3. How best should I develop the software to communicate with the > firmware.
Depends on your application and your OS. The simplest way is to create your device as a "HID" device - that way you won't have to write any device drivers at all, which is a *big* plus under windows. But HID devices have limitations. If it's a one-off lab environment and you don't need high-speed, high-bandwidth communications then HID will do the job.
> I am a novice and would appreciate any guidance. Is this possible?
Definitely. If you opt for the Cypress EZ-USB FX option (and I'm *not* suggesting it is the best, cheapest or easiest solution) there's example source on the net and you can write your firmware with the freeware SDCC C compiler. Others may know of easier, cheaper solutions!?! Regards, -- Mark McDougall, Engineer Virtual Logic Pty Ltd, <http://www.vl.com.au> 21-25 King St, Rockdale, 2216 Ph: +612-9599-3255 Fax: +612-9599-3266
Mark McDougall wrote:
> Paulus wrote: > > >>Hi - I have an mechanical device which has 6 different operational >>functions. I want to develop a USB interface for the device. >>Effectively, I want to replace a manual "six position" switch with a >>USB solution so I can control the device through software. >>1. How should I select a USB controller > > > Any controller will do the job, it's a case of cost, tools, package and > language of choice. IIRC there are PIC solutions, ARM solutions, 8051 > solutions and proprietary solutions. > > >>2. How should I select a Firmware solution > > > That depends entirely on the answer to #1 above. > > >>3. How best should I develop the software to communicate with the >>firmware. > > > Depends on your application and your OS. The simplest way is to create > your device as a "HID" device - that way you won't have to write any > device drivers at all, which is a *big* plus under windows. But HID > devices have limitations. If it's a one-off lab environment and you > don't need high-speed, high-bandwidth communications then HID will do > the job. > > >>I am a novice and would appreciate any guidance. Is this possible? > > > Definitely. > > If you opt for the Cypress EZ-USB FX option (and I'm *not* suggesting it > is the best, cheapest or easiest solution) there's example source on the > net and you can write your firmware with the freeware SDCC C compiler. > > Others may know of easier, cheaper solutions!?! > > Regards, >
http://www.dontronics-shop.com/home.php?cat=313 may have something to suit you lots of options. Don... -- Don McKenzie E-Mail Contact Page: http://www.dontronics.com/e-mail.html Micro,TTL,USB to 1.5" color LCD http://www.dontronics.com/micro-lcd.html USB,RS232 or TTL to VGA Monitor http://www.dontronics.com/micro-vga.html World's smallest USB 2 TTL Conv http://www.dontronics.com/micro-usb.html
In article <1156811090.167972.41490@i42g2000cwa.googlegroups.com>, 
pharper@nexidia.com says...
> Hi - I have an mechanical device which has 6 different operational > functions. I want to develop a USB interface for the device. > Effectively, I want to replace a manual "six position" switch with a > USB solution so I can control the device through software. > > 1. How should I select a USB controller > 2. How should I select a Firmware solution > 3. How best should I develop the software to communicate with the > firmware. > > I am a novice and would appreciate any guidance. Is this possible? > > Thank you > > Paul > >
Take a look at the U4x1 devices at www.usbmicro.com. Are you creating a one-of solution? -Rob
Paulus wrote:

> Hi - I have an mechanical device which has 6 different operational > functions. I want to develop a USB interface for the device. > Effectively, I want to replace a manual "six position" switch with a > USB solution so I can control the device through software. > > 1. How should I select a USB controller > 2. How should I select a Firmware solution > 3. How best should I develop the software to communicate with the > firmware. > > I am a novice and would appreciate any guidance. Is this possible? > > Thank you > > Paul >
http://www.xdimax.com/usb_i2c/u2c12.html
On 28 Aug, in article
     <1156811090.167972.41490@i42g2000cwa.googlegroups.com>
     pharper@nexidia.com "Paulus" wrote:

>Hi - I have an mechanical device which has 6 different operational >functions. I want to develop a USB interface for the device. >Effectively, I want to replace a manual "six position" switch with a >USB solution so I can control the device through software. > >1. How should I select a USB controller >2. How should I select a Firmware solution >3. How best should I develop the software to communicate with the >firmware. > >I am a novice and would appreciate any guidance. Is this possible?
For the simplest solution I would look at FTDI chips in particular FT245 to give 8 digital lines and their driver already done for you. Then you can take the lines to your logic, to replace the switch. Does not sound to me that you need an extra controller.
>Thank you > >Paul > >
-- Paul Carpenter | paul@pcserviceselectronics.co.uk <http://www.pcserviceselectronics.co.uk/> PC Services <http://www.gnuh8.org.uk/> GNU H8 & mailing list info <http://www.badweb.org.uk/> For those web sites you hate
On 28 Aug 2006 17:24:50 -0700, "Paulus" <pharper@nexidia.com> wrote:

>Hi - I have an mechanical device which has 6 different operational >functions. I want to develop a USB interface for the device. >Effectively, I want to replace a manual "six position" switch with a >USB solution so I can control the device through software.
What kind of switch is this. Does it ground a low power signal to ground in each position or is this switching mains voltages at several Amperes in each position ? You may have to consider isolation and safety issues. For this kind of simple one-of-six interfacing, I would suggest just using the PC parallel port. However, since you insist of using USB, I would suggest using some USB to LPT converter, which is supplied with some driver software that mimics a real parallel printer port. In this way, this device can be controlled just as a parallel printer. Your remote controlled switch can be used even with computers without USB by directly connecting it to the LPT port. Paul
On 28 Aug 2006 17:24:50 -0700, "Paulus" <pharper@nexidia.com> wrote:

>Hi - I have an mechanical device which has 6 different operational >functions. I want to develop a USB interface for the device. >Effectively, I want to replace a manual "six position" switch with a >USB solution so I can control the device through software. > >1. How should I select a USB controller >2. How should I select a Firmware solution >3. How best should I develop the software to communicate with the >firmware.
FTDI245: an USB interface chip with drivers for all popular OS. It has a bit-bang mode, so you have 8 i/o to control. There is no need to develop a driver, your app only has to talk to the d2xx dll. Mit freundlichen Gr&#4294967295;&#4294967295;en Frank-Christian Kr&#4294967295;gel
WOW - Thanks to everyone for their help. Really interesting and really
great to get all the feedback Thank you.

I think the solution which will probably work for me is the U421 USB
I/O interface.

Looks like I have a project!


Mark McDougall wrote:
> Paulus wrote: > > > Hi - I have an mechanical device which has 6 different operational > > functions. I want to develop a USB interface for the device. > > Effectively, I want to replace a manual "six position" switch with a > > USB solution so I can control the device through software. > > 1. How should I select a USB controller > > Any controller will do the job, it's a case of cost, tools, package and > language of choice. IIRC there are PIC solutions, ARM solutions, 8051 > solutions and proprietary solutions. > > > 2. How should I select a Firmware solution > > That depends entirely on the answer to #1 above. > > > 3. How best should I develop the software to communicate with the > > firmware. > > Depends on your application and your OS. The simplest way is to create > your device as a "HID" device - that way you won't have to write any > device drivers at all, which is a *big* plus under windows. But HID > devices have limitations. If it's a one-off lab environment and you > don't need high-speed, high-bandwidth communications then HID will do > the job. > > > I am a novice and would appreciate any guidance. Is this possible? > > Definitely. > > If you opt for the Cypress EZ-USB FX option (and I'm *not* suggesting it > is the best, cheapest or easiest solution) there's example source on the > net and you can write your firmware with the freeware SDCC C compiler. > > Others may know of easier, cheaper solutions!?! > > Regards, > > -- > Mark McDougall, Engineer > Virtual Logic Pty Ltd, <http://www.vl.com.au> > 21-25 King St, Rockdale, 2216 > Ph: +612-9599-3255 Fax: +612-9599-3266
In article <1156898369.391377.46490@p79g2000cwp.googlegroups.com>, 
pharper@nexidia.com says...
> WOW - Thanks to everyone for their help. Really interesting and really > great to get all the feedback Thank you. > > I think the solution which will probably work for me is the U421 USB > I/O interface. > > Looks like I have a project!
On the Dontronics message board this thread: <http://www.websitetoolbox.com/tool/post/dontronics/vpost?id=1332326> gave an example of interfacing the functionally similar U401 to some relay boards. The thread might provide some helpful information for you. If you have any questions, you can post in the Dontronics message board in the USBmicro forum. -Rob
> > > Mark McDougall wrote: > > Paulus wrote: > > > > > Hi - I have an mechanical device which has 6 different operational > > > functions. I want to develop a USB interface for the device. > > > Effectively, I want to replace a manual "six position" switch with a > > > USB solution so I can control the device through software. > > > 1. How should I select a USB controller > > > > Any controller will do the job, it's a case of cost, tools, package and > > language of choice. IIRC there are PIC solutions, ARM solutions, 8051 > > solutions and proprietary solutions. > > > > > 2. How should I select a Firmware solution > > > > That depends entirely on the answer to #1 above. > > > > > 3. How best should I develop the software to communicate with the > > > firmware. > > > > Depends on your application and your OS. The simplest way is to create > > your device as a "HID" device - that way you won't have to write any > > device drivers at all, which is a *big* plus under windows. But HID > > devices have limitations. If it's a one-off lab environment and you > > don't need high-speed, high-bandwidth communications then HID will do > > the job. > > > > > I am a novice and would appreciate any guidance. Is this possible? > > > > Definitely. > > > > If you opt for the Cypress EZ-USB FX option (and I'm *not* suggesting it > > is the best, cheapest or easiest solution) there's example source on the > > net and you can write your firmware with the freeware SDCC C compiler. > > > > Others may know of easier, cheaper solutions!?! > > > > Regards, > > > > -- > > Mark McDougall, Engineer

Memfault Beyond the Launch