??? 04/10/06 15:52 Read: times |
#113983 - MOVX @Ri Responding to: ???'s previous message |
This instruction is an example of the 8048 heritage in '51.
It works simply so that it emits the value from Ri to low address bus, while the high address bus (=P2) remains unaltered (=P2). So if you have an external data memory connected in the standard way, by mov P2,#LOW_ADDRESS mov R1,#HIGH_ADDRESS movx A,@R1you read from the memory in the same way as if you performed mov DPTR,#LOW_ADDRESS+256*HIGH_ADDRESS movx A,@DPTR Caution, this does not apply for some of the derivatives having "internal external" XRAM, where it usually accesses only the lowest 256 bytes of the internal external XRAM (e.g. the 8xC51RDx sub-family, e.g. AT89C51RD2). As for your second question: IRAM is the indirectly accessed RAM (i.e. by mov @Ri, or as a stack), which consists from the lower 128 bytes which are also directly addressable, plus the upper 128 bytes which are not directly addressable (not present in 8051). Jan Waclawek |
Topic | Author | Date |
unclarity with movx instruction | 01/01/70 00:00 | |
Speed up | 01/01/70 00:00 | |
Mistake | 01/01/70 00:00 | |
Clarity prevails! | 01/01/70 00:00 | |
Quicker? | 01/01/70 00:00 | |
Quicker! | 01/01/70 00:00 | |
assumption... | 01/01/70 00:00 | |
Finally, you are right! | 01/01/70 00:00 | |
MOVX @Ri | 01/01/70 00:00 | |
since you did not have the time to find | 01/01/70 00:00 | |
wrong answer | 01/01/70 00:00 | |
Typo | 01/01/70 00:00 | |
thanks Erik for the correction | 01/01/70 00:00 | |
It is set to P0 | 01/01/70 00:00 | |
wrong again | 01/01/70 00:00 | |
Yes I am | 01/01/70 00:00 | |
an example | 01/01/70 00:00 | |
Internal XRAM | 01/01/70 00:00 | |
not really | 01/01/70 00:00 | |
Ports' SFR are set to 1 | 01/01/70 00:00 | |
not a port, a "page SFR"![]() | 01/01/70 00:00 | |
P2? | 01/01/70 00:00 | |
Doh! | 01/01/70 00:00 | |
which derivative | 01/01/70 00:00 | |
do not allow? | 01/01/70 00:00 | |
AT89S8252 | 01/01/70 00:00 | |
Aaaaah, so. Thanks. | 01/01/70 00:00 | |
Tanks | 01/01/70 00:00 |