66
EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D
EZ-USB Development Kit Firmware Examples
8.1
Method to Verify the Firmware Example Functionality
The firmware examples provided with the kit can be verified using the EZ-USB development board
provided with the kit. There are different types of firmware download mechanisms for the EZ-USB
devices. After the firmware is successfully downloaded, the EZ-USB device re-enumerates and
prompts for a relevant windows USB driver. You must bind to the appropriate
cyusbxxx.inf
and
cyusb.sys
files provided with the kit. Finally, when the driver binding is complete, use the relevant PC
tools to test the firmware functionality. To demonstrate each of these firmware examples, the entire
process is divided into various stages for each example.
8.2
hid_kb Firmware Example
This example describes the implementation of a 4-button virtual HID-Class keyboard using the EZ-
USB DVK board. Open the hid_kb.Uv2 project file in Keil µVision2 IDE.
provides the proj-
ect snapshot in the IDE.
Figure 8-1. hid_kb Project View in keil uVision2 IDE
The firmware example detects if any of the four push buttons are pressed (on the development
board) and sends the relevant fixed data to the Host PC. For the HID-class devices, such as key-
board and mouse, the USB bandwidth requirements is typically 64 KB/sec. Most of the HID devices
are either low-speed or full-speed devices. Due to this low data rate requirement of the device, only
the endpoint EP1 (64-byte buffer) is selected for both IN and OUT interrupt transfers. The high-
speed data endpoints EP2, EP4, EP6, and EP8 are disabled, as shown in the following code snip-
pet:
EP1OUTCFG = 0xB0; // valid, interrupt OUT, 64 bytes, Single buffered
EP1INCFG = 0XB0; // valid, interrupt IN, 64 bytes, Single buffered
EP2CFG = EP4CFG = EP6CFG = EP8CFG = 0; // disable unused endpoints
For a typical HID device, the data related to events, such as button press, key strokes, and mouse
clicks, are transferred to the Host in the form of Input Reports using an Interrupt IN endpoint. Simi-
larly, the Reports can be requested by the Host PC using the control endpoint or an Interrupt OUT
endpoint. The firmware sets EP1IN and EP1OUT as Interrupt endpoints for data transfers. The fol-
Summary of Contents for CY3674
Page 18: ...18 EZ USB Development Kit User Guide Doc 001 66390 Rev D Getting Started...
Page 34: ...34 EZ USB Development Kit User Guide Doc 001 66390 Rev D Development Kit Contents...
Page 54: ...54 EZ USB Development Kit User Guide Doc 001 66390 Rev D Cypress USB Drivers for EZ USB Kits...
Page 110: ...110 EZ USB Development Kit User Guide Doc 001 66390 Rev D Resources...
Page 113: ...EZ USB Development Kit User Guide Doc 001 66390 Rev D 113 A 2 Board Layout...