This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

AT91 HID problem

Hi,

i am currently trying to implement a USB HID device my at91sam7s64 chip and is having difficutlies. I am using keil uVision3. While i understand that theres is already some codes posted on the internet including the ATMEL website, i am having difficulties compiling them in keil. Any suggestions on how can i compile the codes in keil?

Thanks in advance.

  • Keil provides an USB HID example for Atmel AT91SAM7S-EK board.

    Look in your RealView MDK installation: Keil\ARM\Boards\Atmel\AT91SAM7S-EK\USB\HID.

  • Thanks! I have read through the examples and tried them; however, i am pretty new to USB so i am unable to understand it all. I am trying to implement to get the PC to recognise the board as a USB keyboard. Could i have some guidance on this please.

    Thank you

  • The USB keyboard implementation is fully described in the USB HID spec, with an example of descriptors.

    USB HID spec 1.11
    ">www.usb.org/.../HID1_11.pdf"
    HID Usage Table 1.12
    www.usb.org/.../Hut1_12.pdf

    Of course, the HID spec is massive one and it isn't written just for keyboard.
    Then, you have to extract the keyboard description from the spec.
    This topic on SiLabs USB forum guides you how to find it on the spec.

    USB HID KEYBOARD
    www.cygnal.org/.../001381.html

    "i am pretty new to USB so i am unable to understand it all."

    Before attacking to the HID spec, I recommend you to read the book,
    "USB Complete, Third Ed." by J.Axelson,
    especially on these chapters.
    11. HID: Using Control and Interrupt Transfers
    12. HID: Reports

    You can peek into a part of the book through Goooogle book.
    http://books.google.com
    - Search "USB Complete"
    - Under the contents (right column), select "more"
    - Select "Reports 351"

    Tsuneo

  • I have tried modifying the code from the Keil USB HID mouse example to try to make it into a keyboard. However, i have a problem.

    When i plug the device into the PC, the PC device manager shows a message (This device cannot start) under the HID devices section.

    Could i know if this is because there is a problem with my descriptors ?

    Thanks.