Keil Logo

Watch Variables

Watch Window ButtonYou can watch the contents of variables, structures, and arrays using the Watch Window, which updates at the end of each execution command. Enable View - Periodic Window Update for updates during program execution.

Watch Window

View and Modify On-Chip Peripherals

µVision provides several ways to view and modify on-chip peripherals. For example, to supply input to I/O pins:

Using Peripheral Dialog Boxes

µVision provides dialogs for: I/O Ports, Interrupts, Timers, A/D Converter, Serial Ports, and chip-specific peripherals. Open these dialogs from the menu Peripherals.

For the MEASURE application, open I/O Ports:Port2 and A/D Converter. The dialogs show the current peripheral status. You may directly change the input values.

Timer/Counter 0 Peripheral Dialog

A/D converter 0 Peripheral Dialog

Each of these dialogs lists the related peripheral register symbols and shows the current status of the peripherals. To change the inputs, change the values of the Pins or Analog Input Channels.

Using VTREG Symbols

Assign values to VTREG symbols using the Command window. Assignments to VTREGs are done in the same way as to variables or registers. For example:

PORT2=0xDA00 set digital input PORT2 to 0xDA00.
AIN1=3.3 set analog input AIN1 to 3.3 volts.

Using User and Signal Functions

VTREGs can be used with user-defined signal functions to create complex methods for providing external input to target programs. The Analog Example shows a signal function that provides input to AIN0. The signal function is included in the MEASURE example and can be invoked with the Toolbox button Analog0..3V. The method changes the voltage on the input AIN0 continuously.

Toolbox 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.