| ||||||||
Technical Support Support Resources Product Information | µVISION: WATCH THE IO-PORTS OF CYPRESS USB CONTROLLERInformation in this article applies to:
QUESTIONI am using µVision for debugging a project with a Cypress USB device (EZ-USB, FX, FX2). However, the µVision peripheral dialogs contain only standard 8051 peripherals and do not show the memory mapped I/O ports of the Cypress USB devices. Is there a way to display the I/O port values? ANSWERYes, you may use Watch Window of µVision which opens with the menu command View -> Watch & Call Stack Window. Now enter the I/O variables. When you are using the Cypress header file (i.e. EZRegs.h), then you can enter the I/O variables as described in the Cypress documentation (for example OUTB or PINA). You may also replace the I/O port definitions PORTxCFG, OUTx and PINSx in this register definition file. For example, in EZRegs.h just add a struct that contains all these registers as shown below:
struct IOports {
unsigned char PORTACFG;
unsigned char PORTBCFG;
unsigned char PORTCCFG;
unsigned char OUTA;
unsigned char OUTB;
unsigned char OUTC;
unsigned char PINSA;
unsigned char PINSB;
unsigned char PINSC;
};
EXTERN volatile struct IOports xdata IOports _at_ 0x7F93; // define Cypress I/O ports
Now you can add this single struct to the µVision Watch Window which allows you to review all port values while debugging. MORE INFORMATIONLast Reviewed: Wednesday, August 03, 2005 | |||||||
| ||||||||