Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Jan Waclawek
04/10/06 09:52
Read: 757 times
Bratislava
Slovakia


 
#113983 - MOVX @Ri
Responding to: Markus Kammersberger'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,@R1
you 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


List of 28 messages in thread
TopicAuthorDate
unclarity with movx instruction      Markus Kammersberger      04/10/06 09:32      
   Speed up      Kai Klaas      04/10/06 09:39      
      Mistake      Kai Klaas      04/10/06 09:48      
   Clarity prevails!      Andy Neil      04/10/06 09:48      
      Quicker?      Kai Klaas      04/10/06 09:54      
         Quicker!      Andy Neil      04/10/06 10:11      
            assumption...      Andy Neil      04/10/06 10:19      
            Finally, you are right!      Kai Klaas      04/10/06 10:21      
   MOVX @Ri      Jan Waclawek      04/10/06 09:52      
      since you did not have the time to find      Erik Malund      04/10/06 10:01      
      wrong answer      Erik Malund      04/10/06 10:03      
         Typo      Abhishek Singh      04/10/06 11:03      
         thanks Erik for the correction      Jan Waclawek      04/10/06 14:14      
   It is set to P0      Neil Kurzman      04/10/06 10:01      
      wrong again      Erik Malund      04/10/06 10:04      
         Yes I am      Neil Kurzman      04/10/06 11:55      
   an example      Jan Waclawek      04/10/06 14:21      
      Internal XRAM      David Smith      04/11/06 14:29      
         not really      Erik Malund      04/11/06 14:38      
            Ports' SFR are set to 1      Kai Klaas      04/11/06 19:54      
               not a port, a "page SFR"      Erik Malund      04/12/06 05:59      
         P2?      Kai Klaas      04/11/06 19:49      
            Doh!      David Smith      04/12/06 03:06      
   which derivative      Oleg Sergeev      04/11/06 00:06      
      do not allow?      Jan Waclawek      04/11/06 01:30      
         AT89S8252      Oleg Sergeev      04/11/06 23:58      
            Aaaaah, so. Thanks.      Jan Waclawek      04/12/06 00:49      
   Tanks      Markus Kammersberger      04/11/06 01:43      

Back to Subject List