Pins allows you to manually set or clear
individual pins for this port.

Digital I/O Ports A-D (16-Bit) VTREGData Type: unsigned short

The PORTx VTREGs represent the I/O pins of the simulated
MCU for Port A, Port B, and so on. PORTA represents Port A, PORTB
represents Port B, etc. You may read PORTx to determine the
state of the output pins of that port. For example, in the command
window you may type,

PORTA

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

PORTA=0x000000F0

sets the upper four port pins of Port A to a value of 1 and all
other port pins to a value of 0. You may use the bitwise operators
AND(&), OR(|) and XOR(^) to change individual bits of the PORTx
VTREGs. For example:

Important information

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.