TOP Contributors

  1. MIKROE (2662 codes)
  2. Alcides Ramos (357 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137036 times)
  2. FAT32 Library (70167 times)
  3. Network Ethernet Library (56037 times)
  4. USB Device Library (46360 times)
  5. Network WiFi Library (41976 times)
  6. FT800 Library (41305 times)
  7. GSM click (29079 times)
  8. mikroSDK (26519 times)
  9. PID Library (26452 times)
  10. microSD click (25449 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

USB HID Demo

Rating:

0

Author: MIKROE

Last Updated: 2024-04-04

Package Version: 2.0.0.8

mikroSDK Library: 2.0.0.0

Category: USB

Downloaded: 55 times

Not followed.

License: MIT license  

The application demonstrates USB HID functionality.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "USB HID Demo" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "USB HID Demo" changes.

Do you want to report abuse regarding "USB HID Demo".

  • Information
  • Comments (0)

mikroSDK Library Blog

USB HID DEMO

This example demonstrates HID Generic raw Input & Output. It will receive data from Host (In endpoint) and echo back (Out endpoint). HID Report descriptor uses vendor for usage page (using template TUD_HID_REPORT_DESC_GENERIC_INOUT). Connect to a USB HID terminal and send data to the connected device.

Hardware Support

Before starting, put switches PSW and ID on your board to ON position like this:

image

Connect USB-C to USB connector on the right side of the board.

Software Support

We provide demo code for testing USB HID functionality. For example to work, proper clock setup is needed. To create a setup with the adequate clock scheme, follow these steps:

  1. Click on Setups and select New.
  2. Select GCC ARM or RISC-V compiler and click Next.
  3. Select Board you are using.
  4. Select your MCU and click on Advanced.
  5. Select Config scheme from drop down menu, it will have MCU_NAME_USB name.
  6. If you dont see MCU_NAME_USB scheme for your MCU then USB module is not supported.
  7. Click Save, then Next.
  8. Select desired display, and choose programmer/debugger tool.
  9. Click Finish.
  10. Program the MCU.
  11. Open Tools view (Ctrl + 7) and select HID Terminal.
  12. Click on Options and select MikroElektronika MikroSDK TinyUSB Device, and press Configure.
  13. Click on Connect.
  14. You can now send some data and it will be echoed back like in example below.

example


ALSO FROM THIS AUTHOR

Expand 3 click

0

Expand 3 Click is a compact add-on board providing general-purpose I/O expansion. This board features the DS2408, an 8-channel programmable I/O expander from Analog Devices. The DS2408 has a factory-lasered 64-bit registration number, enabling multiple Expand 3 Click boards™ to be connected on the same data line, communicating with the host MCU through a standard Dallas Semiconductor 1-Wire interface (15.3kbps or 100kbps). PIO outputs are configured as open-drain and provide a maximum on-resistance of 100Ω.

[Learn More]

SPI Isolator 6 click

0

SPI Isolator 6 Click is a compact add-on board representing a digital isolator optimized for a serial peripheral interface. This board features the MAX22345, a fast, low-power 4-channel digital galvanic isolator from Analog Devices. This device comes with a maximum data rate of 200Mbps and transfers digital signals between circuits with different power domains featuring reinforced isolation for a withstand voltage rating of 3.75kVRMS for 60 seconds.

[Learn More]

CAN Isolator 3 click

0

CAN Isolator 3 Click is a compact add-on board that provides isolated CAN communication. This board features the MAX14882, an isolated CAN transceiver with an integrated transformer driver from Analog Devices. It is galvanically isolated between the device's CAN-protocol controller side (TDX, RDX) and the physical wires of the CAN network (CANH, CANL) cable-side/bus-side of the transceiver.

[Learn More]