Keil™, An ARM® Company

µVision® User's Guide

Simulate I/O Ports

µVision3 provides dialogs that show the status of all I/O ports. The I/O Pins are represented with VTREGs. You may use this VTREGs also together with signal functions or breakpoints as shown in the following example program.

PIOA Simulation Dialog

µVision3 provides dialogs that show the status of all I/O ports. The I/O Pins are represented with VTREGs. You may use this VTREGs also together with signal functions or breakpoints as shown in the following example.

// in your C user program
PortAvalue = PIOA_PDSR; // read Port A input

Breakpoints that you define in the µVision3 simulator:

bs write PORT3, 1, "printf (\"Port3 value=%X\\n\", PORT3)"
bs read PORT5, 1, "PORT5 = getint (\"Input Port5 value\")"

When you execute your C program, µVision3 asks you for a Port5 input value. If a new output value is written to Port3, a message is printed in the Output Window — Command page. Refer to CPU Pin Registers (VTREGs).

Port Input Dialog