EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

uC with easy USB

Started by Atilla Filiz February 16, 2009
I want to play with USB and microcontrollers. Can you suggest some uC s 
that are easy to use as USB slaves to my laptop or embedded toys(like the 
GP2X or Freerunner). I want to make some simple toys that can act like 
USB keyboards etc.
Atilla Filiz wrote:
> I want to play with USB and microcontrollers. Can you suggest some uC s > that are easy to use as USB slaves to my laptop or embedded toys(like the > GP2X or Freerunner). I want to make some simple toys that can act like > USB keyboards etc.
Hi Atilla Look at this ftdi.com based RS232<->serial converter. The VCP drivers installed on your PC simply tunnels your RS232 serial port through USB to a virtual com-port in e.g. Windows. (This was found at the Web-shop: http://www.ftdichip.com/FTProducts.htm ): ?14.50, US232R-100 USB to RS232 Converter, 1m: http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=4&title=USB+RS232+cables Quote: "... The electronics, including the FT232RQ chip are housed in an attractive glossy white enclosure with blue, side-lit LED TX and RX traffic indicators. A matching white 1m USB cable uses gold plated USB and DB9 connectors. The US232R-100 evaluation cable is supplied in retail packaging which includes instructions together with a Drivers and Utilities CD complete with Microsoft WHQL certified VCP drivers for Windows XP. Drivers for the Apple Mac, Linux and other versions of Windows are also included on the CD. ...." Cables: UC232R: http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=45&title=UC232R Cables: TTL-232R and variants: http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=47&title=Cables%3A+TTL-232R+and+variants - The FT232BM RS232<->USB chips drivers for many platforms is found here: Virtual COM Port Drivers: http://www.ftdichip.com/Drivers/VCP.htm http://www.ftdichip.com/ - If the above was to easy, then look at: http://wiki.openmoko.org/wiki/Talk:Wishlist/Sensorbox Quote: "... For example, I wanted to change the number of buttons and add a couple of LEDs. To do this, you need to build new HID report descriptors and there you run into problems with incomprehensible standards documentation and inconsistent operating systems implementations...One last item that fits in under "firmware" better than anywhere else is the issue of vendor IDs. Like PCI and other "plug and pray" bus systems, your device presents a vendor ID and a product ID so that the host operating system can locate appropriate drivers. Unlike those other systems, there is no "experimental" vendor ID or apparently any way to get a legitimate vendor ID other than paying the USB Implementers Forum a minimum of $1500 every couple of years...If you want a host application of your own talking to a collection of custom peripherals you've designed, though, things are much harder. ... Es gibt bei Microchip mehrere Code-Beispiele wie man Programme f&uuml;r den PIC schreibt. Als HID (Human Interface Device), &uuml;ber eine spezielle DLL von Microchip oder als CDC-Device (Communication Device Class). Letzteres habe ich hier benutzt. CDC arbeitet [=works] &uuml;ber einen virtuellen COM-Port. Man schreibt seine Programme so als w&uuml;rde man eine serielle Schnittstelle [=interface] ansprechen. F&uuml;r CDC ist kein spezieller Treiber[=driver] erforderlich ..." /Glenn
Atilla Filiz wrote:
> I want to play with USB and microcontrollers. Can you suggest some uC s > that are easy to use as USB slaves to my laptop or embedded toys(like the > GP2X or Freerunner). I want to make some simple toys that can act like > USB keyboards etc.
Hi Atilla Look at this ftdi.com based USB<->serial converter. The VCP drivers installed on your PC simply tunnels your RS232 serial port through USB to a virtual com-port in e.g. Windows. (This was found at the Web-shop: http://www.ftdichip.com/FTProducts.htm ): ?14.50, US232R-100 USB to RS232 Converter, 1m: http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=4&title=USB+RS232+cables Quote: "... The electronics, including the FT232RQ chip are housed in an attractive glossy white enclosure with blue, side-lit LED TX and RX traffic indicators. A matching white 1m USB cable uses gold plated USB and DB9 connectors. The US232R-100 evaluation cable is supplied in retail packaging which includes instructions together with a Drivers and Utilities CD complete with Microsoft WHQL certified VCP drivers for Windows XP. Drivers for the Apple Mac, Linux and other versions of Windows are also included on the CD. ...." Cables: UC232R: http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=45&title=UC232R Cables: TTL-232R and variants: http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-null&prodCategoryID=47&title=Cables%3A+TTL-232R+and+variants - The FT232BM RS232<->USB chips drivers for many platforms is found here: Virtual COM Port Drivers: http://www.ftdichip.com/Drivers/VCP.htm http://www.ftdichip.com/ - If the above was to easy, then look at: http://wiki.openmoko.org/wiki/Talk:Wishlist/Sensorbox Quote: "... For example, I wanted to change the number of buttons and add a couple of LEDs. To do this, you need to build new HID report descriptors and there you run into problems with incomprehensible standards documentation and inconsistent operating systems implementations...One last item that fits in under "firmware" better than anywhere else is the issue of vendor IDs. Like PCI and other "plug and pray" bus systems, your device presents a vendor ID and a product ID so that the host operating system can locate appropriate drivers. Unlike those other systems, there is no "experimental" vendor ID or apparently any way to get a legitimate vendor ID other than paying the USB Implementers Forum a minimum of $1500 every couple of years...If you want a host application of your own talking to a collection of custom peripherals you've designed, though, things are much harder. ... Es gibt bei Microchip mehrere Code-Beispiele wie man Programme f&uuml;r den PIC schreibt. Als HID (Human Interface Device), &uuml;ber eine spezielle DLL von Microchip oder als CDC-Device (Communication Device Class). Letzteres habe ich hier benutzt. CDC arbeitet [=works] &uuml;ber einen virtuellen COM-Port. Man schreibt seine Programme so als w&uuml;rde man eine serielle Schnittstelle [=interface] ansprechen. F&uuml;r CDC ist kein spezieller Treiber[=driver] erforderlich ..." /Glenn
On Mon, 16 Feb 2009 13:36:34 +0100, Glenn M&oslash;ller-Holst wrote:

> Atilla Filiz wrote: >> I want to play with USB and microcontrollers. Can you suggest some uC s >> that are easy to use as USB slaves to my laptop or embedded toys(like >> the GP2X or Freerunner). I want to make some simple toys that can act >> like USB keyboards etc. > > > Hi Atilla > > Look at this ftdi.com based USB<->serial converter. The VCP drivers > installed on your PC simply tunnels your RS232 serial port through USB > to a virtual com-port in e.g. Windows. > > (This was found at the Web-shop: http://www.ftdichip.com/FTProducts.htm > ): > > ?14.50, US232R-100 USB to RS232 Converter, 1m: > http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-
null&prodCategoryID=4&title=USB+RS232+cables
> Quote: "... > The electronics, including the FT232RQ chip are housed in an attractive > glossy white enclosure with blue, side-lit LED TX and RX traffic > indicators. A matching white 1m USB cable uses gold plated USB and DB9 > connectors. > > The US232R-100 evaluation cable is supplied in retail packaging which > includes instructions together with a Drivers and Utilities CD complete > with Microsoft WHQL certified VCP drivers for Windows XP. Drivers for > the Apple Mac, Linux and other versions of Windows are also included on > the CD. > ...." > > Cables: UC232R: > http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-
null&prodCategoryID=45&title=UC232R
> > Cables: TTL-232R and variants: > http://apple.clickandbuild.com/cnb/shop/ftdichip?op=catalogue-products-
null&prodCategoryID=47&title=Cables%3A+TTL-232R+and+variants
> > - > > The FT232BM RS232<->USB chips drivers for many platforms is found here: > > Virtual COM Port Drivers: > http://www.ftdichip.com/Drivers/VCP.htm http://www.ftdichip.com/ > > - > > If the above was to easy, then look at: > > http://wiki.openmoko.org/wiki/Talk:Wishlist/Sensorbox Quote: "... > For example, I wanted to change the number of buttons and add a couple > of LEDs. To do this, you need to build new HID report descriptors and > there you run into problems with incomprehensible standards > documentation and inconsistent operating systems implementations...One > last item that fits in under "firmware" better than anywhere else is the > issue of vendor IDs. Like PCI and other "plug and pray" bus systems, > your device presents a vendor ID and a product ID so that the host > operating system can locate appropriate drivers. Unlike those other > systems, there is no "experimental" vendor ID or apparently any way to > get a legitimate vendor ID other than paying the USB Implementers Forum > a minimum of $1500 every couple of years...If you want a host > application of your own talking to a collection of custom peripherals > you've designed, though, things are much harder. ... > Es gibt bei Microchip mehrere Code-Beispiele wie man Programme f&uuml;r den > PIC schreibt. Als HID (Human Interface Device), &uuml;ber eine spezielle DLL > von Microchip oder als CDC-Device (Communication Device Class). > Letzteres habe ich hier benutzt. CDC arbeitet [=works] &uuml;ber einen > virtuellen COM-Port. Man schreibt seine Programme so als w&uuml;rde man eine > serielle Schnittstelle [=interface] ansprechen. F&uuml;r CDC ist kein > spezieller Treiber[=driver] erforderlich ..." > > /Glenn
Hmm, I wanted to do this without using usb<-->serial converters but it seems this is the only feasible way because you need to buy a vendor ID to make a custom usb device. Thank you Glenn. Atilla
On Feb 16, 11:30 am, Atilla Filiz <ati...@hotmail.com> wrote:
> On Mon, 16 Feb 2009 13:36:34 +0100, Glenn M=F8ller-Holst wrote: > > Atilla Filiz wrote: > >> I want to play with USB and microcontrollers. Can you suggest some uC =
s
> >> that are easy to use as USB slaves to my laptop or embedded toys(like > >> the GP2X or Freerunner). I want to make some simple toys that can act > >> like USB keyboards etc. > > > Hi Atilla > > > Look at this ftdi.com based USB<->serial converter. The VCP drivers > > installed on your PC simply tunnels your RS232 serial port through USB > > to a virtual com-port in e.g. Windows. > > > > /Glenn > > Hmm, I wanted to do this without using usb<-->serial converters but it > seems this is the only feasible way because you need to buy a vendor ID > to make a custom usb device. Thank you Glenn. > > Atilla
I don't think you need a unique vendor ID to roll your own. If you get an MCU with USB included I believe you can use their vendor ID. I don't know USB details, but I know that lots of companies use USB internally in custom products and don't bother with a vendor ID. Check out the app notes from any of the MCU makers that offer USB in their parts, Atmel, NXP, STMicro... Rick
On Feb 16, 11:16 am, rickman <gnu...@gmail.com> wrote:
> On Feb 16, 11:30 am, Atilla Filiz <ati...@hotmail.com> wrote: > > > > > On Mon, 16 Feb 2009 13:36:34 +0100, Glenn M=F8ller-Holst wrote: > > > Atilla Filiz wrote: > > >> I want to play with USB and microcontrollers. Can you suggest some u=
C s
> > >> that are easy to use as USB slaves to my laptop or embedded toys(lik=
e
> > >> the GP2X or Freerunner). I want to make some simple toys that can ac=
t
> > >> like USB keyboards etc. > > > > Hi Atilla > > > > Look at this ftdi.com based USB<->serial converter. The VCP drivers > > > installed on your PC simply tunnels your RS232 serial port through US=
B
> > > to a virtual com-port in e.g. Windows. > > > > /Glenn > > > Hmm, I wanted to do this without using usb<-->serial converters but it > > seems this is the only feasible way because you need to buy a vendor ID > > to make a custom usb device. Thank you Glenn. > > > Atilla > > I don't think you need a unique vendor ID to roll your own. If you > get an MCU with USB included I believe you can use their vendor ID. I > don't know USB details, but I know that lots of companies use USB > internally in custom products and don't bother with a vendor ID. > > Check out the app notes from any of the MCU makers that offer USB in > their parts, Atmel, NXP, STMicro... > > Rick
This is correct; you do not NEED a unique VID. Every USB device I've seen (Atmel,NXP, FX2, etc) has a default VID which is just fine for the OP's activity. In some situations, the MCU vendor will let you used their VID by assigning you a PID. Slapping a USB-Serial on the console of a uC is probably not what the OP was looking for. And don't get me started on FTDI's total lack of software quality. An ARM chip with an OTG port would be a lot more educational. Many exist. AL
Atilla Filiz <atiflz@hotmail.com> wrote:
> Hmm, I wanted to do this without using usb<-->serial converters but it > seems this is the only feasible way because you need to buy a vendor ID > to make a custom usb device.
You don't need your own VID/PID combo unless you're planning on distributing whatever it is you're making. If it's only for your personal use and amusement, just pick any numbers that don't conflict with any devices or drivers on your machine. This however doesn't change the fact that converter chips like FTDI's is the easiest way to get USB connectivity. Being able to skip all USB code both on the host and device side is a good thing, unless you specifically want to learn about USB in which case I suggest start by reading "USB Complete". -a
LittleAlex wrote:
> On Feb 16, 11:16 am, rickman <gnu...@gmail.com> wrote:
...
> And don't get me started on FTDI's total lack of > software quality. > > An ARM chip with an OTG port would be a lot more educational. Many > exist. > > AL
Hello Could you please tell me what sort of FTDI software errors you have encountered? /Glenn
Atilla Filiz wrote:

> I want to play with USB and microcontrollers. Can you suggest some uC s > that are easy to use as USB slaves to my laptop or embedded toys(like the > GP2X or Freerunner). I want to make some simple toys that can act like > USB keyboards etc.
Take a look here: http://www.obdev.at/products/avrusb/index-de.html Very easy to use. No special USB microcontroller needed. I use it for various small controlling applications. You even do not need a special kernel driver, just use the libusb to send and receive data. jbe
In article <gnbipp$5oi$1@news.motzarella.org>, atiflz@hotmail.com 
says...
> I want to play with USB and microcontrollers. Can you suggest some uC s > that are easy to use as USB slaves to my laptop or embedded toys(like the > GP2X or Freerunner). I want to make some simple toys that can act like > USB keyboards etc.
Perhaps something like this: http://www.circuitgizmos.com/products/cgu421/cgu421.shtml or: http://www.circuitgizmos.com/products/cgu401/cgu401.shtml Both can be used for USB interfacing of relays, LED, switches, SPI integrated circuits, 1-wire temperature, etc. Not keyboards though.

The 2024 Embedded Online Conference