4.3 Virtual Ports
Virtual port (VPORT) registers allow some PORT registers to be mapped
virtually in the bit accessible I/O memory space. When this is done, writing to the
VPORT register will be the same as writing to the real PORT register. This enables the
use of I/O memory specific instructions, such as bit manipulation instructions
(SBI
/CBI
), on a PORT register that resides in the
extended I/O memory space. The number of available virtual ports is, in most cases,
limited to four or six, resulting in a smaller number of available virtual ports than
the number of PORT modules. The advantages of using virtual ports are a smaller and less
complex program and less Flash memory used.
A compatibility diagram is presented in Figure 4-1, which explains what coding styles are available for specific AVR product families.