EmbeddedRelated.com
Forums

MCU + USB

Started by Mochuelo December 10, 2005
Hi,

I don't know if there is a better group to ask about USB.

I want to create a device that will communicate with a PC via USB. I
prefer USB to RS232 because I plan to power the device from the USB
supply.

I guess I have (at least) two options:
1) I use an MCU with integrated USB interface.
2) I use any MCU, plus an FTDI FT232R (USB-UART device), or
equivalent.

Option 2 makes programming very simple (I don't need to write firmware
to manage USB), but its hardware is more expensive than that of option
1 (those FT232R's are quite expensive (2.50 GBP + taxes)).

Option 1 would allow the cheapest hardware, but coding would be
harder. And here is where I start needing your help.
- Do I need to write a new USB windows driver, to communicate with my
hardware? Are there predefined "classes" of drivers that already allow
something so simple as asynchronously sending bytes back and forth?
- If I need to write a new driver, how difficult is this?
- Does anyone know of a MCU which includes: USB (even low speed would
be ok) + ADC (8 ch x 10 bit, min) + PWM (4 ch x 8 bit, min) + flash +
ISP?

For me, the best would be to find an MCU that connects directly to the
USB bus, but including an USB-UART converter inside, so that I don't
need to write USB code, but only UART code. That would really simplify
things.

Thanks a lot,
Mochuelo
Mochuelo wrote:
> Hi, > > I don't know if there is a better group to ask about USB. > > I want to create a device that will communicate with a PC via USB. I > prefer USB to RS232 because I plan to power the device from the USB > supply. > > I guess I have (at least) two options: > 1) I use an MCU with integrated USB interface. > 2) I use any MCU, plus an FTDI FT232R (USB-UART device), or > equivalent. > > Option 2 makes programming very simple (I don't need to write firmware > to manage USB), but its hardware is more expensive than that of option > 1 (those FT232R's are quite expensive (2.50 GBP + taxes)). > > Option 1 would allow the cheapest hardware, but coding would be > harder. And here is where I start needing your help. > - Do I need to write a new USB windows driver, to communicate with my > hardware? Are there predefined "classes" of drivers that already allow > something so simple as asynchronously sending bytes back and forth? > - If I need to write a new driver, how difficult is this? > - Does anyone know of a MCU which includes: USB (even low speed would > be ok) + ADC (8 ch x 10 bit, min) + PWM (4 ch x 8 bit, min) + flash + > ISP? > > For me, the best would be to find an MCU that connects directly to the > USB bus, but including an USB-UART converter inside, so that I don't > need to write USB code, but only UART code. That would really simplify > things. > > Thanks a lot, > Mochuelo
You missed out the most important critera to answer your question. How many units are you going to sell? How fast do you need to get it to the market place? What percentage of the final unit cost does the USB costs represent?
"Mochuelo" <cucafera@RE_MO_VE_THIStelefonica.net> wrote in message
news:3ullp1hlpo5ggai358mm5s4lcuddtav8r4@4ax.com...
> Hi, > > I don't know if there is a better group to ask about USB. > > I want to create a device that will communicate with a PC via USB. I > prefer USB to RS232 because I plan to power the device from the USB > supply. > > I guess I have (at least) two options: > 1) I use an MCU with integrated USB interface. > 2) I use any MCU, plus an FTDI FT232R (USB-UART device), or > equivalent. > > Option 2 makes programming very simple (I don't need to write firmware > to manage USB), but its hardware is more expensive than that of option > 1 (those FT232R's are quite expensive (2.50 GBP + taxes)). > > Option 1 would allow the cheapest hardware, but coding would be > harder. And here is where I start needing your help. > - Do I need to write a new USB windows driver, to communicate with my > hardware?
I uyse the cypress FX series of 8051/USB devices. FX2LP.. They give you the driver and the api. It does work. I have three products using it right now. Not _that_ hard to get up and running but not a simple task either. I chose not to go the FTDI route because in the end.. it would have simply been a slow serial interface. After the initial learning curve I can now implement USB anywhere. I believe the cypress parts are actually cheaper than the FTDI part. YOu can also get a little FX2 Usb development board from bitwise systems. google it.
On Sat, 10 Dec 2005 16:39:39 GMT, "Nappy" <noemail@all.com> wrote:

>I uyse the cypress FX series of 8051/USB devices. FX2LP.. They give you the >driver and the api. It does work. I have three products using it right now. >Not _that_ hard to get up and running but not a simple task either. I chose >not to go the FTDI route because in the end.. it would have simply been a >slow serial interface. After the initial learning curve I can now implement >USB anywhere.
I would gladly accept some learning curve. I do like challenges, but I would prefer taking them with a core newer than the 8051.
> >I believe the cypress parts are actually cheaper than the FTDI part.
Yes, and so are some 8-bit (e.g. Freescale 908JBx) and 32-bit (e.g. Philips LPC214x) MCUs. I specially like the LPC214x option because those MCUs are cheap, powerful, and already include the other peripherals I mentioned I need. If someone tells me that Philips provides similar tools to develop the USB driver, I could go for option 1. Is there anything similar to http://www.jungo.com/usb_device.html but for ARM7 LPC214x devices?
> >YOu can also get a little FX2 Usb development board from bitwise systems. >google it. > >
On Sat, 10 Dec 2005 16:39:39 GMT, "Nappy" <noemail@all.com> wrote:

> >"Mochuelo" <cucafera@RE_MO_VE_THIStelefonica.net> wrote in message >news:3ullp1hlpo5ggai358mm5s4lcuddtav8r4@4ax.com... >> Hi, >> >> I don't know if there is a better group to ask about USB. >> >> I want to create a device that will communicate with a PC via USB. I >> prefer USB to RS232 because I plan to power the device from the USB >> supply. >> >> I guess I have (at least) two options: >> 1) I use an MCU with integrated USB interface. >> 2) I use any MCU, plus an FTDI FT232R (USB-UART device), or >> equivalent. >> >> Option 2 makes programming very simple (I don't need to write firmware >> to manage USB), but its hardware is more expensive than that of option >> 1 (those FT232R's are quite expensive (2.50 GBP + taxes)). >> >> Option 1 would allow the cheapest hardware, but coding would be >> harder. And here is where I start needing your help. >> - Do I need to write a new USB windows driver, to communicate with my >> hardware? > >I uyse the cypress FX series of 8051/USB devices. FX2LP.. They give you the >driver and the api. It does work. I have three products using it right now. >Not _that_ hard to get up and running but not a simple task either. I chose >not to go the FTDI route because in the end.. it would have simply been a >slow serial interface. After the initial learning curve I can now implement >USB anywhere. > >I believe the cypress parts are actually cheaper than the FTDI part. > >YOu can also get a little FX2 Usb development board from bitwise systems. >google it. > >
Also, is it true that if I go for option 1 I need to buy a (USB) vendor ID, and that this is expensive?
"Mochuelo" <cucafera@RE_MO_VE_THIStelefonica.net> wrote in message
news:2m2mp1lv02sne0559dl3qvs88hr3uu46e9@4ax.com...
> On Sat, 10 Dec 2005 16:39:39 GMT, "Nappy" <noemail@all.com> wrote: > > >I uyse the cypress FX series of 8051/USB devices. FX2LP.. They give you
the
> >driver and the api. It does work. I have three products using it right
now.
> >Not _that_ hard to get up and running but not a simple task either. I
chose
> >not to go the FTDI route because in the end.. it would have simply been a > >slow serial interface. After the initial learning curve I can now
implement
> >USB anywhere. > > I would gladly accept some learning curve. I do like challenges, but I > would prefer taking them with a core newer than the 8051.
4 clock/48Mhz device. Pretty quick for most things.
"Mochuelo" <cucafera@RE_MO_VE_THIStelefonica.net> wrote in message
news:6m3mp1lvudamc67sjetl287qfpr7quhk3a@4ax.com...

> Also, is it true that if I go for option 1 I need to buy a (USB) > vendor ID, and that this is expensive?
NOt necessarily. I am not sure what you are doing but a Vendor ID is $1500. Although you can run with the Cypress VID using their driver.. or you can fake your own for in-house use.
> >
I'm using the PIC18F2455 for a USB interface. It's available in DIL,
which makes it easy for prototyping, and includes the transceivers. I'm
designing the PCB, so I won't know how easy or difficult it is until I
have the prototype hardware working.

Leon

Mochuelo wrote:
> Hi, > > I don't know if there is a better group to ask about USB. > > I want to create a device that will communicate with a PC via USB. I > prefer USB to RS232 because I plan to power the device from the USB > supply. > > I guess I have (at least) two options: > 1) I use an MCU with integrated USB interface. > 2) I use any MCU, plus an FTDI FT232R (USB-UART device), or > equivalent. > > Option 2 makes programming very simple (I don't need to write firmware > to manage USB), but its hardware is more expensive than that of option > 1 (those FT232R's are quite expensive (2.50 GBP + taxes)). > > Option 1 would allow the cheapest hardware, but coding would be > harder. And here is where I start needing your help. > - Do I need to write a new USB windows driver, to communicate with my > hardware? Are there predefined "classes" of drivers that already allow > something so simple as asynchronously sending bytes back and forth? > - If I need to write a new driver, how difficult is this? > - Does anyone know of a MCU which includes: USB (even low speed would > be ok) + ADC (8 ch x 10 bit, min) + PWM (4 ch x 8 bit, min) + flash + > ISP? > > For me, the best would be to find an MCU that connects directly to the > USB bus, but including an USB-UART converter inside, so that I don't > need to write USB code, but only UART code. That would really simplify > things.
SiLabs C8051F320 have FLASH + USB, and Atmel AT89C513x series have Flash/USB, but are light on the ADCs. Cypress have a number of choices, with good maturity. .. but if the F232R WILL do all you need, without development times, you need to look at the volumes carefully to justify using something else. ( and then, FTDI caim $1.80/10K) -jg
Jim Granville wrote:
> SiLabs C8051F320 have FLASH + USB, and Atmel AT89C513x series have > Flash/USB, but are light on the ADCs. > Cypress have a number of choices, with good maturity.
I should add the ST uPSD34xx series, with full speed USB, and Maxim have an interesting SPI<->USB device, the MAX3420, if you want serial (low pin count), but faster than FT232R. -jg