On Aug 18, 2012, at 8:18 PM, Dave McGuire wrote:
On 08/18/2012 06:43 PM, David Riley wrote:
For what it's worth, at work, I've taken
to putting an FT232 (or 2232
or 4232, depending on how many ports) on new boards instead of real
RS232 for the simple reason that our clients have a hard time finding
PCs with serial ports and are too clueless to buy proper serial
adaptors. Plus, a mini-USB port takes up a lot less room on the panel
than one DE9 (let alone four), and the chips generally cost about the
same as a decent RS232 level converter.
Yeah, y'know, I'm doing a bit of that myself lately. I feel awfully
silly putting an FT232 on a board connecting it to a pair of UART pins
on a microcontroller that already HAS a damn USB controller, but the
FTDI drivers are available for lots of platforms, and they work well,
and the USB VID/PID situation sucks. Do you have any thoughts here?
Just how "unclean" is it to waste the on-chip USB controller just
because of the suitly crap surrounding the Vendor IDs and stuff?
It's absolutely the VID/PID stuff. If there had been a generic USB
serial class (like there is for HIDs), we wouldn't have to worry
about it, but VID/PID rules all. I'd love to have just a simple
byte-by-byte FIFO using the built-in USB controller, but we'd have
to make drivers available for every platform under the sun, and that
wouldn't be worth the trouble. Spending $5 or less on a USB chip
(some of which have very few external passives) seems like the next
best thing, since FTDI drivers are available for nearly everything.
As usual, it's Windows that's the problem; it's difficult to have
generic, user-space-accessed USB devices like you can have under
libusb under most Unix flavors (including OS X). As soon as you
plug your device in under Windows, it starts demanding a driver.
I believe there may be a filter-based approach for using libusb's
Win32 port, but it does require manual user intervention, and I
can't count on our users being smart enough to do it (more likely,
they reject it out of hand as "too difficult" before trying it).
That said, if you're never targeting Windows, just say "screw it"
and try and find a VID/PID that doesn't exist elsewhere and let
libusb do the work in userland. No driver headaches.
And of course, if you're doing a data-intensive application, using
the native USB controller is the obvious choice because the FT232
and cousins top out at about 10 Mbps, if memory serves. At that
point, it's usually worth mucking about with a real controller.
- Dave