Double Mapped Port Bits
pjv
Posts: 1,903
Hello Chip;
In certain instances, such as the instruction to select a certain port bit for a counter, the port bit appears to be doubly mapped; once in it's native number, and once·into the space 20 Hex locations above it.
For example to select·portA bit1·for counterA:······ movs··· ctra,#$01
appears also is equally effected by writing: ·········· movs··· ctra,#$21
The ctrA/B pin assignments are selected with 6 bits, permitting port bits 63 ($3F)·through 0 ($00) to be addressed; $3F through $20 belonging to port B, and likewise $1F through $00 to port A.
My question is.. what·other registers/peripherals·are·similarily doubly mapped? I ask this because I'm considering to·use some in an unorthodox manner, and hence we may need to stay alert about them.
Cheers,
Peter (pjv)
·
In certain instances, such as the instruction to select a certain port bit for a counter, the port bit appears to be doubly mapped; once in it's native number, and once·into the space 20 Hex locations above it.
For example to select·portA bit1·for counterA:······ movs··· ctra,#$01
appears also is equally effected by writing: ·········· movs··· ctra,#$21
The ctrA/B pin assignments are selected with 6 bits, permitting port bits 63 ($3F)·through 0 ($00) to be addressed; $3F through $20 belonging to port B, and likewise $1F through $00 to port A.
My question is.. what·other registers/peripherals·are·similarily doubly mapped? I ask this because I'm considering to·use some in an unorthodox manner, and hence we may need to stay alert about them.
Cheers,
Peter (pjv)
·
Comments
I believe this is the only case of 'ghosting' in regards to a future 64-pin version of the current architecture. Oh, wait, the video peripheral has only two bits to specify which 8-bit pin group the video hardware should affect. In the 64-pin version, there will be one more bit added for this purpose (bit 11 in VCFG).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.