TOP Contributors

  1. MIKROE (2657 codes)
  2. Alcides Ramos (355 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 (136901 times)
  2. FAT32 Library (70035 times)
  3. Network Ethernet Library (56005 times)
  4. USB Device Library (46308 times)
  5. Network WiFi Library (41934 times)
  6. FT800 Library (41235 times)
  7. GSM click (29024 times)
  8. PID Library (26434 times)
  9. mikroSDK (26402 times)
  10. microSD click (25387 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: 53 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

Hall Current 10 click

0

Hall Current 10 Click is a compact add-on board that provides economical and precise AC or DC current sensing solutions. This board features the ACHS-7194, a fully integrated Hall-effect-based isolated linear current sensor designed for the current range of ±40A from Broadcom Limited. Inside ACHS-7194 is a precise, low-offset, linear Hall circuit with a copper conduction path located near the surface of the die. Applied current flowing through this copper conduction path generates a magnetic field that the differential Hall sensors convert into a proportional voltage, where after that, the user is given the option to process the output voltage as an analog or digital value. This Click board™ is suitable for AC or DC current-sensing in industrial, commercial, and communications systems.

[Learn More]

Temp-Log 7 click

0

Temp-Log 7 Click is a compact add-on board used to measure and record the temperature of an environment over time. This board features the TMP1826, a high-accuracy, 1-Wire® compatible digital output temperature sensor from Texas Instruments with integrated 2-kbit EEPROM. It supports a wide operating temperature range from –20°C to +85°C with its high accuracy of ±0.1°C (typical)/±0.3°C (maximum) and comes with a factory-programmed 64-bit unique identification number for addressing and NIST traceability. Besides a programmable alarm function that outputs an interrupt signal to the MCU when a specific temperature event occurs, it also has three digital I/O pins configurable for general purposes or to identify the device's position on a shared bus.

[Learn More]

CAN Isolator click

5

CAN Isolator click provides isolated CAN communication. It carries the ADM3053 signal and power isolated CAN transceiver with an integrated isolated DC-to-DC converter. The click is designed to run on either 3.3V or 5V power supply. CAN Isolator click communicates with the target microcontroller over UART interface.

[Learn More]