uC with easy USB

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.

Reply to
Atilla Filiz
Loading thread data ...

Hi Atilla

Look at this ftdi.com based RS232serial 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:

formatting link
):

?14.50, US232R-100 USB to RS232 Converter, 1m:

formatting link
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:

formatting link

Cables: TTL-232R and variants:

formatting link

-

The FT232BM RS232USB chips drivers for many platforms is found here:

Virtual COM Port Drivers:

formatting link
formatting link

-

If the above was to easy, then look at:

formatting link
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ür den PIC schreibt. Als HID (Human Interface Device), über eine spezielle DLL von Microchip oder als CDC-Device (Communication Device Class). Letzteres habe ich hier benutzt. CDC arbeitet [=works] über einen virtuellen COM-Port. Man schreibt seine Programme so als würde man eine serielle Schnittstelle [=interface] ansprechen. Für CDC ist kein spezieller Treiber[=driver] erforderlich ..."

/Glenn

Reply to
Glenn Møller-Holst

Hi Atilla

Look at this ftdi.com based USBserial 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:

formatting link
):

?14.50, US232R-100 USB to RS232 Converter, 1m:

formatting link
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:

formatting link

Cables: TTL-232R and variants:

formatting link

-

The FT232BM RS232USB chips drivers for many platforms is found here:

Virtual COM Port Drivers:

formatting link
formatting link

-

If the above was to easy, then look at:

formatting link
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ür den PIC schreibt. Als HID (Human Interface Device), über eine spezielle DLL von Microchip oder als CDC-Device (Communication Device Class). Letzteres habe ich hier benutzt. CDC arbeitet [=works] über einen virtuellen COM-Port. Man schreibt seine Programme so als würde man eine serielle Schnittstelle [=interface] ansprechen. Für CDC ist kein spezieller Treiber[=driver] erforderlich ..."

/Glenn

Reply to
Glenn Møller-Holst

Hmm, I wanted to do this without using usbserial 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

Reply to
Atilla Filiz

s

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

Reply to
rickman

C s

e
t
B

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

Reply to
LittleAlex

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

Reply to
Anders.Montonen

...

Hello

Could you please tell me what sort of FTDI software errors you have encountered?

/Glenn

Reply to
Glenn Møller-Holst

Take a look here:

formatting link

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

Reply to
Juergen Beisert

Perhaps something like this:

formatting link

or:

formatting link

Both can be used for USB interfacing of relays, LED, switches, SPI integrated circuits, 1-wire temperature, etc.

Not keyboards though.

Reply to
Uniden

I've run into a bunch. The worst was a 'get device configuration' call that had the valid flag set to true, but had garbage in the information field.

Google for them - others have wasted countless hours working around them also.

AL

Reply to
LittleAlex

Jan Axelson (author USB complete) has a vendor ID, and allows you to use a block of her PIDs for experimental purposes. Here's a clip from her website that lists the terms.

formatting link
Search for 'For Lab Use Only'

-Urbite

Reply to
Paul Urbanus

Hello Alex

Have you tried to report your found errors? If they correct them, it should benefit others, however their "size".

/Glenn

Reply to
Glenn Møller-Holst

These look fun. Thank you.

Reply to
Atilla Filiz

Just the thing I was looking for. Thank you. ati

Reply to
Atilla Filiz

Yes, I tried to report them. I sent them a half-page C program that would expose one of the defects. (After a 7-exchange email thread that consisted mostly of one of their staff saying "prove it".)

The response I got was essentially "Yeah, so what's your point?".

I gave up and designed -all- FTDI product out.

AL

PS: Another bug I found was that if there were more than one 2232 devices connected, occasionally the driver would return the data from the wrong one. Or status from one, data from the other in the same call return.

Reply to
LittleAlex

That's... nice. For *nix users, there's a third-party library called libFTDI you can try instead of FTDI's own drivers.

-a

Reply to
Anders.Montonen

There's this from Freescale (cute website name):

formatting link

Woops, looks like they went up to $50, I bought on in December for $30. Cute Demo/"dev" board, Coldfire 32bit processor with USB port built in, pligging in USB automatically charges the 3V lithium coin cell that runs everything, LED array, 3-axis accelerometer, and some applications coded in. One cute one is activated by plugging the USB into a PC - it becomes a USB mouse. Two touchpads are of course the mouse buttons, and you move the cursor by tilting the board left/right/forward/back. It's crude in that the cursor moves at a fixed speed, but included CD's have C source and an IAR compiler/dev system for the board.

And I recall seeing 8-bit freescale microcontrollers with USB interfaces as well.

No, Freescale doesn't pay me to promote them, but perhaps they should ...

Reply to
Ben Bradley

The HC08 JB8.

It's USB (device only) interface is limited to low-speed IIRC (I switched to AVRs a while ago) with an 8 byte maximum buffer. It was well supported by CodeWarrior when I last used it, but open source toolkit support under Linux, which is what I was interested in, was very limited.

I ended up using SDCC as well a home-built programmer.

BTW, it's available (or at least it was the last time I used it) in a PDIP package as well so you can breadboard it.

Likewise, my only relationship with Freescale is that I've used their products.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980's technology to a 21st century world
Reply to
Simon Clubley

This might be interesting: .

Reply to
M.O.B. i L.

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.