ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

IMPLEMENTING A SIMPLE USB INTERFACE FOR AN EMBEDDED PROCESSOR


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

IMPLEMENTING A SIMPLE USB INTERFACE

Lessons from the Trenches 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

AN EASIER SOLUTION

The USB microcontroller Iýll discuss is the Cypress Semiconductor CY7C64013. This microcontroller has a bidirectional parallel interface called HAPI (hardware assisted parallel interface) that easily connects to most standard embedded processor buses (see Figure 1).

Figure 1ýHere you can see the connection from the embedded processor to the HAPI.

 

With a bit of firmware magic in the CY7C64013, all the embedded processor has to do to communicate on the USB is read a byte when it gets interrupted by the HAPI DREADY# signal and write a byte at its leisure when the LEMPTY# is asserted. Using this interface you should be able to achieve data rates of around 60 to 80 kBpsýmore than enough bandwidth to run circles around RS-232. This is obviously less than the theoretical maximum throughput of about 1 MBps required by the USB V.1.1 specification, but there are a lot of embedded systems out there that donýt require ultra-high speed.

The CY7C64013 microcontroller handles the USB start-up process. This is known as USB enumeration. During this time, the USB host queries the peripheral for data about what the device is and which logical communication channels the peripheral will communicate on. Then the main USB driver on the host connects the peripheral to the device-specific driver using the VID and PID acquired from the peripheral.

An obstacle when using USB is making a device enumerate on the bus and be "Chapter 9" (commonly used to refer to Chapter 9 of the USB specification) compliant. The enumeration process consists mainly of two types of transactionsýcontrol read and no-data controlýand a list of associated device descriptions transferred during this time, aptly called descriptors.

PREVIOUSNEXT


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.
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ