|
FOR AN EMBEDDED PROCESSOR
by Stuart Allman
Start ý Typical
USB Solutions ý Required Components
ý An Easier Solution ý Following
the Rules ý Firmware ý Vendor-Specific
Requests ý Host Transfer Mechanisms
ý USB Transfers ý How
Does It Work? ý The Grand Conclusion
ý Sources and PDF
TYPICAL USB SOLUTIONS
Unlike RS-232, the USB is a master-slave
configured bus that must have a central host and can have up to 127
peripherals attached. In other words, only the USB host initiates
data transfers, and your device must be willing to share the bandwidth.
Currently there are only two speeds available for V.1.1 of the USB,
12 Mbps for full speed and 1.5 Mbps for low speed, with a third (480
Mbps) on the way for USB 2.0. Even with the fastest microcontrollers
on the market today, itýs impractical to try to bit-bang USB traffic
and remain within the USB timing specifications.
USB peripheral connectivity solutions
generally exist in three forms. First is the standalone serial interface
engine (SIE). Many vendors sell these so that an embedded processor
can set up packets at the transaction level and have the SIE format
the packet and send the data at the physical level. An SIE solution
has the drawback of making the embedded processor firmware have to
understand and communicate at the transaction level. Data cannot be
simply transferred without understanding the USB protocol.
The second common solution is to integrate
the SIE into a microcontroller. Literally dozens of silicon vendors
provide anywhere from bare-bones to high-power microcontroller solutions
for the USB. Typically these are used in peripherals in which a microcontroller
can act as the main system controller. This high level of integration
allows for cost-competitive solutions in a tiny package, however,
the microcontroller firmware still has to understand and interpret
data at the USB transaction level.
And, for this article, I will be examining
a third solution for systems that already have a central microprocessor
and want to easily integrate USB connectivity, similar to RS-232 connectivity.
This solution involves letting a separate USB microcontroller act
as a peripheral handling the transaction level, freeing the central
microprocessor to simply send and receive bytes at the application
level. The only drawback of this scheme seems to be a moderate hit
to throughput because the microcontroller must handle the transaction
level. Still, much larger throughput than RS-232 can easily be achieved.
PREVIOUS
NEXT
Circuit Cellar provides up-to-date information for engineers. Visit
www.circuitcellar.com for
more information and additional articles.
For subscription information, call (860) 875-2199, subscribe@circuitcellar.com
or subscribe online.
ýCircuit Cellar, the Magazine for Computer Applications. Posted with
permission. |