Bailey O.H.Embedded systems.Desktop integration.2005
.pdf
Chapter 10 / The PSoC Prototype |
431 |
|
||
|
|
|
||
1. The first step is to install the software from the EZ-USB CD. |
|
|||
You can insert the CD or download the zip file from the |
|
|
||
Cypress web site. The most recent version supports several |
|
|||
EZ-USB boards. During the software installation process the |
|
|||
compiler and device driver will be installed for Windows. |
|
|
||
Some versions of Linux have built-in support for the EZ-USB |
|
|||
chip, while others require a separate device driver file. The |
|
|||
latest information is available in the downloaded companion |
|
|||
files. This allows me to keep these projects current while at |
|
|||
the same time keeping the book current. |
|
|
||
2. Once the software is installed, reboot the system if |
|
|
||
prompted. Usually Windows versions prior to 2000 will |
|
|
||
require a reboot. Next, plug in the USB cable and connect the |
|
|||
EZ-USB development board. A red light in the lower-left cor- |
|
|||
ner of the board will come on while the device driver is being |
|
|||
located. Eventually you should be prompted to press the Fin- |
|
|||
ish button to complete the installation. Once the driver is |
|
|
||
installed correctly, a green light on the development board |
|
|||
will become lit. |
|
|
||
If the installation went properly you can hold down the Reset |
10 |
|||
button on the EZ-USB development board for a few seconds. |
||||
Chapter |
||||
|
|
|
||
This will disconnect the board and unload the driver. Releasing the Reset button will reload the driver and re-attach the board. The intelligence of this board lies in the chip directly below the USB connector at the top of the board. The board has four additional buttons, several dip switches and jumpers, two serial ports, and a seven-segment LED display. The headers along both sides extend the I/O pins to the prototype board. To debug a program we need to also install an RS-232 cable between a COM port on the PC and SIO-1 on the EZ-USB board. SIO-1 is the nine-pin connector at the top-right side of the board next to the USB connector.
432Chapter 10 / The PSoC Prototype
3.If you have the EZ-USB board connected via the USB cable, disconnect it now. Next, go to Start | Cypress | USB | EZ-USB Control Panel. The following screen should be displayed.
Figure 10-19
4.This program allows the developer to interrogate, control, and even download new software to the EZ-USB. Click the Open All button. For each EZ-USB device detected and working, a child window will appear. The window title will be the EZ-USB device number. In Figure 10-19, we have one EZ-USB device attached, titled Ezusb-0. Within the child window a GetPipeInfo command was executed and the results appear in the open area of the child window. The interface size will be displayed as the last line of information for each child window. In this case the interface size is 16.
Chapter 10 / The PSoC Prototype |
437 |
|
|
The default COM port is 2 and the baud rate defaults to 38400. If you’re using the EZ-USB full speed board, the baud rate needs to be changed to 19200. If your system has only one COM port, set the port to COM 1. If these settings are incorrect, the debugger will not work and it will be unclear exactly what is wrong.
4.The next step is to initialize the debugger. This is done by selecting the Debug | Start/Stop Debugger menu item. This will initialize the debugger and connect to the EZ-USB debugging monitor. When fully initialized your screen will look similar to Figure 10-24.
Chapter 10
Figure 10-24
5.Before we begin our debug session let’s make the debug commands available from the main display. To do this, select View | Debug Toolbar and make sure there is a check next to it. If it isn’t checked, select the Debug toolbar; otherwise just exit this menu.
We are now ready to start a debug session. We can use the mouse and click the debug commands, which are on the
