Implement USB enumeration process in 8051

Thread Starter

curious_mind

Joined Aug 16, 2013
1
Hi,

I have read about USB basics and the enumeration process, also I have a theoretical knowledge of 8051 microcontroller.

I want to write 8051 C program which would handle the enumeration process, but dont know how and where to start. I just want to understand the firmware/program for enumeration process. I dont have a complete development board to implement it.

Can anyone kindly help me with the program flow to implement USB enumeration / or provide any links that might help.
 

Papabravo

Joined Feb 24, 2006
21,159
The basic idea as described in the USB documentation is:
Query ==> Response

You send a query message and the "Function" (Device) sends a response. You parse the response and use the information contained in the response to send the next query.

You should imagine two C functions, Send() and Receive()
Send() will look at its arguments and other "state" information, determine which message it wants to send, load up a buffer, and hit the "GO" switch.

Receive() will look at its arguments and other "state" information and wait for an incoming response. It will move the data into memory and proceed to decode the message. Based on that decoding it will fire off the next message.
 

GetDeviceInfo

Joined Jun 7, 2009
2,192
does your 8051 variant have a USB controller or are you implementing a stand alone controller? Either way, your device supplier should have sample firmware for such efforts.
 
Top