Keil Logo

USBHID - Human Interface Device

The Human Interface Device (HID) program allows the MCB2140 to act as a Windows HID while attached to your PC using a USB interface. With this program and the HIDClient.exe program, you can:

  • Control the LEDs on the MCB2140 board, and
  • Respond to presses of the INT1 button

all from a dialog box in a standard Windows program.

Loading USBHID

To load the USBHID project, select Open Project from the Project menu, and open the HID.UV2 project from the root\BOARDS\KEIL\MCB2140\USBHID folder.

Select Project File Dialog

Project Workspace

When the HID project opens, the µVision Project Workspace window displays the source files that make up the project.

  • Startup.s: CPU startup file for the NXP LPC214x devices.
  • usbcfg.h: USB custom configuration file for several USB features.
  • usbhw.c: USB hardware layer for NXP LPC2148.
  • usbcore.c: USB core module that implements the basic USB communication layer.
  • usbuser.c: USB common module.
  • usbdesc.c: USB device description.
  • hiduser.c: HID custom module.
  • demo.c: contains the main program and the HID report functions.

The Abstract.txt file contains documentation about the project.

Editing USBHID

You may edit or review the source code. Double click on the source code file in the Files page of the Project Workspace window. µVision loads and displays the contents in an editor window.

Running USBHID

Perform the following four steps to run the USBHID Example on the MCB2140 Evaluation Board:

  1. Building USBHID
  2. Downloading USBHID
  3. Running USBHID
  4. Debugging USBHID
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.