Simple generic HID example demonstrating bidirectional communication. The firmware is compatible with the AN82072 Application note of Cypress so that we could use that PC application to test the USB communication.

Dependencies:   USBDevice mbed

You are viewing an older revision! See the latest version

Homepage

13_USBHID_demo

Simple generic HID example demonstrating bidirectional communication. The firmware is compatible with the AN82072 Application note of Cypress so that we could use that PC application to test the USB communication. We send and receive 8 byte packages, however not all of this data is really used.

Input report data (received by the PC):

  • Byte0: button status (0: pressed, 1: released)
  • Byte1-Byte4: raw ADC data (32 bit, big Endian format) - actually we use only the lowest 16 bits...

Output report data (sent by the PC):

  • Byte0: LED control for LED_RED (0: off, 1: on)
  • Byte1: PWM duty cycle control for LED_GREEN (0-100: duty cycle in %)

Hardware requirements:

  • FRDM-KL25Z board
  • MCP9700A analog thermometer connected to the A0 (PTB0) analog input AN82072.zip

/media/uploads/icserny/05_analog_thermometer_bb.png


All wikipages