2.4.2.2 Virtual Ports

The often-used PORT registers are also mapped into bit-accessible I/O memory space. The access to the Virtual PORT registers has the same outcome as the access to the regular registers, but it allows for memory-specific instructions, such as bit manipulation instructions. These instructions cannot be used in the extended I/O Register space where the regular PORT registers reside.

Regular Port RegistersVirtual Port RegistersDescription
PORTx.DIRVPORTx.DIRData direction - controls the data direction (output driver)
PORTx.OUTVPORTx.OUTData Out - controls the output driver level for each PORTx pin
PORTx.INVPORTx.INData In - shows the state of the PORTx pin
PORTx.INTFLAGSVPORTx.INTFLAGSPin Interrupt flag - is set when the change or state of the PORTx pin matches the pin’s Input/Sense Configuration (ISC) in PORTx.PINnCTRL