Keil Logo

Peripheral Simulation

For STMicroelectronics ST10F272B — Port 0 (2 x 8-bit I/O)

Simulation support for this peripheral or feature is comprised of:

  • Dialog boxes which display and allow you to change peripheral configuration.
  • VTREGs (Virtual Target Registers) which support I/O with the peripheral.

These simulation capabilities are described below.

Parallel Port 0 Dialog

Parallel Port 0

This dialog displays the SFR and pins of Port 0. If this port is not used for the external data or address/data bus, it may be used as a 16-bit general purpose I/O port. It is programmed and accessed as two 8-bit ports.

  • P0H represents the P0H SFR. The HEX value and value of each bit is displayed and may be changed from this dialog.
  • P0L represents the P0L SFR. The HEX value and value of each bit is displayed and may be changed from this dialog.
  • DP0H is the port direction SFR for P0H. When DP0H.x=0, P0H.x is an input. When DP0H.x=1, P0H.x is an output.
  • DP0L is the port direction SFR for P0L. When DP0L.x=0, P0L.x is an input. When DP0L.x=1, P0L.x is an output.
  • Pins represents the states of the pins on the simulated MCU. When used as outputs, these have the same value as the P0H or P0L SFRs. When used as inputs you may set the level of the input pin to high (1) or low (0).

Data Type: unsigned char

The PORTxH and PORTxL VTREGs represent the I/O pins of the simulated MCU for Port 0 and Port 1. Most ports have a single VTREG (like PORT7 or PORT8) but some (like Port 0 and Port 1) have two VTREGs (PORT0H and PORT0L). You may read PORTxL or PORTxH to determine the state of the output pins of that port. For example, in the command window, you may type,


to obtain the value corresponding to the set pins of the lower 8 bits of Port 0. You may also change the input values of port pins by changing the value of the VTREG. For example,


sets bits 4-7 and clears bits 0-3 of Port 1. You may use the bitwise operators AND(&), OR(|) and XOR(^) to change individual bits of the PORTx VTREGs. For example:

PORT1L |=  0x01;  /* Set P1L.0 Pin */
PORT0H &= ~0x02;  /* Clr P0H.1 Pin */
PORT0L ^=  0x80;  /* Toggle P0L.7 Pin */
Get more information about the
Peripheral Simulation Capabilities
of the µVision Debugger.
  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.