Hello,
USB and say, RS-232/485 are all serial mediums to deliver data. What makes USB so much faster? Why can't the same data transfers rate be achieved with say, RS-232? Sorry for asking a non-Keil specific question.
Thanks
but possible with 485
232 is high voltage, non-terminated
485 is low voltage, terminated
CAN 'is' 485
Erik
thanks.
I can add that USB hardware in many controllers normally has a larger buffer - up to 4 [KB] on a LPC2468/78 - which shields the application from frequent interrupts.
... DMA which will 'help' equally much regardless of USB or 485. Likewise, regardless of DMA or not, buffer size helps equally for the two. In comparison - compare under same circumstances.
PS In my first post I 'forgot' a thing: RS232 is single ended which is not conductive to long cables or high speed.
That's like saying a F1 car and a pickup truck are both motor vehicles.
The basics are the same, but the specific design details are different - resulting in very different speeds!
I can understand where your question comes from.
A short answer would be - The techniques( h/w and s/w ) used in USB standard is much much better than those used in other serial comm, hence the speed difference.
A more technical answer would be - The ability for the controller to clock at comparable speed to system clock, the usage of large buffers, a more efficient data encoding technique( read NRZI ), optimized ack and data flush features make it achieve faster rates.
Hope this helps
The techniques are "better" in giving higher speed, but "worse" in covering long distances and far worse in terms of the amount and complexity of the hardware & software required.
As ever, it's all a tradeoff.
Nowadays, the required levels of HW & SW complexity are (relatively) easily achievable - but that has only quite recently been the case...
Back at the F1 car analogy, much of the technology that is now an everyday part of run-of-the-mill cars was originally only viable in "top-end" high-performance specials...
The complexity of USB comes from the fact that the USB spec covers multiple layers of protocol stack, though RS-232/485 define just the bottom, Physical and a part of Data Link Layer. Then, the direct comparison of complexity of these serial protocols doesn't have so much mean, unless you are aware of the covered range.
For example, USB defines intrinsic error detection and recovery. This mechanism is implemented on the USB hardwares. If you would implement it over RS-232/485, your firmware and host app should become much complex. USB defines four transfer types, control, interrupt, bulk and isochronous. The feature of these transfer types fit well to the requirement variety of real-world communications. Upon these transfer types, USB defines class. USB class defines the way to carry upper protocol over USB transfer types; Mass storage class carries SCSI protocol, CDC-ACM for MODEM, etc. Of course, you could make up a protocol stack upon RS-232/485 to this extent. If you would code it, how complex the firmware would be?
USB is a standardized compile of technology at present. I believe the major concepts on USB are succeeded by future protocols.
Tsuneo