TOP Contributors

  1. MIKROE (2659 codes)
  2. Alcides Ramos (356 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 (136998 times)
  2. FAT32 Library (70115 times)
  3. Network Ethernet Library (56027 times)
  4. USB Device Library (46347 times)
  5. Network WiFi Library (41966 times)
  6. FT800 Library (41286 times)
  7. GSM click (29053 times)
  8. mikroSDK (26489 times)
  9. PID Library (26447 times)
  10. microSD click (25413 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: 54 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

RTC 5 click

5

RTC5 click carries MCP79510, a real-time clock/calendar with an SPI interface. The example sets and reads the time, and displays it on the Lcd.

[Learn More]

UT-L 7-SEG B click

0

UT-L 7-SEG B Click is a compact add-on board that presents an easy solution for adding a numeric or hexadecimal display to your application. This board features two blue JSS-5611BUB-21s, ultra-thin single-digit numeric displays from Ningbo Junsheng Electronics. The displays are medium (0.56 inches in height) and can display letters, numbers, and symbols in a highly readable form. The host MCU can control the light intensity of the red segments of the display.

[Learn More]

Ammonia click

5

Ammonia click is an Ammonia detection (NH3) sensor, based on the MQ-137 gas sensor. This gas sensor has a sensitive layer made of SnO2, which changes its resistance when exposed to ammonia. The sensor is able to sense NH3 concentration in the range of 5 ppm to 200 ppm.

[Learn More]