Hey Ho, hope someone knows.
I have been amping my game up with XMEGAS(really starting to like them now that I have gotten past a few issues), and now I am experimenting with a MEga4809 XPLAIN kit and I am trying to understand the VPORTS.
THe Datasheets are COPY/PASTE explanations almost verbatim. Google searching this site has provided SOME help, but the part that I do not understand is:
From the MEGA AVR-0 Family Datasheet:
The Virtual PORT registers map the most frequently used regular PORT registers into the bit-accessible I/O space.
Writing to the Virtual PORT registers has the same effect as writing to the regular registers, but allows for memoryspecific instructions, such as bit-manipulation instructions, which are not valid for the extended I/O memory space
where the regular PORT registers reside.
And from the XMEGA E series datasheet:
Virtual port registers allow the port registers to be mapped virtually in the bit-accessible I/O memory space. When this is
done, writing to the virtual port 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, on a port register that normally resides in the
extended I/O memory space. There are four virtual ports, and so four ports can be mapped at the same time.
The descriptions are verbatim with the exception of the last sentence added to the XMEGA, which states that thee are 4 VPORTS so four ports can be mapped at the same time.
My question(s) are:
How does one map a VPORT to a physical port in AVR-0/1?
How does one map a VPORT to a physical port on the XMEGA?
From my reading, it seems that these VPORTS are geared more for speed/time critical access operations and I may not need them for my diddly purposes, but HEY, I wanna know!
Can anyone provide some clarity on the VPORTS. And some better reading for explanationos(and example code)?