USB has become a bit cluttered with feature-itis, and maybe some cronyism. But in its original form at only 11Mbps and with the "huge" connectors, it was a pretty brilliant solution to real problems that were plaguing the industry.
USB has definitely suffered from feature creep
I will say, though, that as a hardware/firmware/software Engineer USB has definitely suffered from feature creep.
USB has become a bit cluttered with feature-itis, and maybe some cronyism. But in its original form at only 11Mbps and with the "huge" connectors, it was a pretty brilliant solution to real problems that were plaguing the industry.
Yes, for an engineer, serial is far easier to work with. But for an end user, it's much, much more complex. And conversely, for a user, serial is a nightmare, but USB is simple. Why? Because in getting things to work, the effort has to come into play somewhere in the process. And when it comes to user-friendliness, the effort comes on the engineering side. (I'm a usability guy, bear in mind.)
A serial port is still simpler though ... No drivers, no handshaking
you can put a scope on it and see the bits, decode them by hand if you like.
>Remember, the original USB 1.0/1.1 spec was intended only for low-speed devices like input devices (keyboards, mice, joysticks, etc), basic printers, and random gadgets. It was not intended as a high-speed bus for high-bandwidth or latency-sensitive applications.
[You can bit-bang RS232]
Hmm. So you never used a serial mouse or more than two uarts on a PC, eh? Drivers required. Separate drivers for deep FIFO UARTs. Interrupt conflicts, and separate drivers for different vendors that handle them differently.
No you can't. You can bit-bang the uart part, and you still need external drivers to get rs232 (theoretically, anyway.) I can go to sparkfun, or aliexpress, and the cost of a uart-to-rs232 adapter (including official connector) and a uart-to-usb adapter (with official connector) are about the same. And you can still bit-bang the uart side from your "simple" micro. (Hmm. I wonder why there aren't any GP micros that have a full bridge for fixed USB protocols (HID or UART.) Seems like it would be quite popular with the "doing all the USB stuff is too complicated" crowd...)
Quote from: james_s on Yesterday at 10:13:14 pmA serial port is still simpler though ... No drivers, no handshaking
Hmm. So you never used a serial mouse or more than two uarts on a PC, eh? Drivers required. Separate drivers for deep FIFO UARTs. Interrupt conflicts, and separate drivers for different vendors that handle them differently. Inherent performance issues because it's fundamentally a byte-at-time protocol not well suited toward being handled by DMA/etc. No "msg" or packet modes, leading to added overhead and protocols (drivers) for anything that isn't a single-byte protocol. Thousands of interrupts per second, per port, usually on legacy buses that do horrible things to modern high speed CPUs.
Is there any case not to just stick with RS232 or the TTL equivalent for applications where you need a really basic low level solution....
Is there any case not to just stick with RS232 or the TTL equivalent
can be implemented by bit-banging
Have you written a mouse driver for both serial and USB at a low level?
Have you tried to work with the USB stack in Android, for example? There's a nasty bug in its logical disconnect routines that cannot be worked around except with a physical disconnect. The bug has been acknowledged by the dev team... it's in the buglist... but in the three years since it was first reported and confirmed, there's been absolutely ZERO work done on it. Sure one could fork your own version of the Android source and fix it (the fix is trivial, literally already documented in the buglist!) but then you're condemned to repeat the fix with every release, for every platform.... Ugh.
Have you tried to work with the USB stack in Android, for example? There's a nasty bug in its logical disconnect routines that cannot be worked around except with a physical disconnect.Surely that is an Android bug, rather than a problem with the USB spec itself ?
QuoteIs there any case not to just stick with RS232 or the TTL equivalentI mentioned "performance issues" and the difficulties with "substantial" numbers of serial ports on the host...Y'all are not realizing just how horrible host-side UARTs can be. (Sure, you can use USB/Serial on the host side, and it's a little better. Do you consider that "USB" or "RS232"? I guess "host-side" USB on a microcontroller is equally problematic, making non-USB protocols more desirable for micro-to-micro communications.Quotecan be implemented by bit-bangingI'm not sure I understand the desire to "bit bang." It used to be that a $4 microcontroller (Q1 from hobbyist sources) like the PIC16F84 could bit-bang a UART. Good, I guess. It's been a long time since a $4 micro hasn't included UART hardware, and more recently it will come with a full-speed 6-endpoint USB peripheral controller (and a software library that makes that somewhat easier to use.)(and of course, bit-banging more than one port at a time gets problematic.)QuoteHave you written a mouse driver for both serial and USB at a low level?Yeah, I think I did, back in the DOS days. More "library" than "driver", since DOS didn't do interrupts for COM ports, each program that wanted to do anything "moderately real" with the UARTs had to diddle the vectors and handle the interrupt itself. (I wrote "several" terminal emulators and related programs - Almost made me rich and famous (perhaps.)) Programs in general were tiny in those days. One of the "requirements" for the most complex of the com programs I wrote was that it run off of a single 360k floppy, including the extensive help text... (The basic H19 terminal emulation code with built-in serial driver was... about 700 lines of x86 assembly language, including comments.)
I'm just trying to insist that people recognize that the simplicity of "rs232" comes with a pretty substantial cost. At one "cpu involvement" per millisecond, USB gets you something like 512kbps, a UART gets you about 10kbps, and bit-banging gets you about 1kbps. All those settings and things that "USB Complexity" adds, you now have to be sure to do correctly, manually.
I can tell you this... the next clean-sheet design I do that doesn't require full USB bandwidth I will push hard for SPI or I2C as its serial interface
I used external COM chips, cranked up, fiber drivers with tristate buffers and ... FIFO buffers with trigger latches. ...
It's not rocket science
Doesn't sound "simple" any more, though. :-)
Christ on a cracker, man...
What produced the modern USB connectors (culminating in USB-C) isn’t magic new materials. It’s simply ordinary engineering done to improve upon the shortcomings of what came before. The number of devices with USB today is probably orders of magnitude larger than all the computers in the world in 1995, and the use cases cover things never anticipated before. At this kind of scale, you discover issues that you wouldn’t have otherwise. And the economies of scale involved mean that you can amortize much more expensive R&D than you could have before, so we could spend more money designing better connectors to improve upon the last. And at this kind of scale, manufacturers can afford the more expensive tooling for higher-precision parts.