Implement USB enumeration process in 8051

Discussion in 'Embedded Systems and Microcontrollers' started by curious_mind, Aug 16, 2013.

  1. curious_mind

    Thread Starter New Member

    Aug 16, 2013
    1
    0
    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.
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,137
    1,786
    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.
     
  3. nigelwright7557

    Senior Member

    May 10, 2008
    487
    71
    It is very involved and complicated doing USB on any micro.

    I used a PIC project I FOUND AT WWW.WAITINGFORFRIDAY.COM
     
  4. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    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.
     
Loading...