Lab 4: USB Device
57
Chapter
8
Chapter 8
Lab 4: USB Device
Most USB applications/products are running as a USB device instead of host. In
this lab, we are implementing DE2 as a USB device and we can use Software in
PC to control the USB Device (DE2).
8-1
Design Descriptions
The DE2 Board also provides a USB Device port for users to connect the DE2
board to a PC using the USB cable. In this project, we implemented a USB device
using the DE2 board – the NIOSII CPU will communicate with PC via the Philips
ISP1362 and its host port. Please refer to Figure
First, users must use a USB A->B cable to connect the DE2 board to a USB port
in the PC. Then users should execute the NIOSII software to initialize the Philips
ISP1362 chip. Once the software program is successfully executed, the PC will
find the new device in its USB device list and ask for the associated driver (Philips
PDIUSBD12 SMART Evaluation Board). After the completion of the installation of
the driver, users can use ISP1362DcUsb.exe to communicate to the DE2 board.
When users click the ADD button in the window panel of the software driver
(ISP1362DcUsb.exe), the PC side will send a packet with an ADD command. The
packet will be received by NIOS II CPU and NIOS II CPU will increment the value
of a counter register by one. The value of the counter register is displayed on the
7-SEG display and green LEDs. If users click the Clear button in the window
panel of the software driver, the PC side will send a packet with a Clear command
to NIOS II CPU, the NIOS II CPU will clear the content of the counter register and
display ZERO on 7-SEG and LEDs.