Keil Logo

Simulate I/O Ports

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

PIOA Simulation Dialog

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

Breakpoints that you define in the µVision Simulator:

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

During program execution, µVision asks for a Port5 input value. If a new output value is written to Port3, a message is printed in the Output Window. Refer to CPU Pin Registers (VTREGs).

Port Input Dialog

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.