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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/21/04 12:55
Read: times


 
#70820 - RE: How can I do MOVX in C?
Responding to: ???'s previous message
Hi! It is very important what is the length of external memory address: is it one or two bytes? The next step you should learn something about space qualifiers. Look at examples for Raisonance RC-51:

#define BYTE unsigned char;

at 0x34 pdata BYTE device_1; <- 8-bits address
at 0x34 xdata BYTE device_2; <- 16-bits address

...
device_1 = 0x55; <- MOV A,#55H , MOVX @R0,A
device_2 = 0x55; <- MOV A,#55H , MOVX @DPTR,A
...

Sometimes (if you are using some devices conected to P1) it is very important to keep P1 stable using 8-bit adressing. Because if you are using xdata memory space, address is 16 bits long and P1 outputs MSB.

Jacek

List of 16 messages in thread
TopicAuthorDate
How can I do MOVX in C?            01/01/70 00:00      
   RE: How can I do MOVX in C?            01/01/70 00:00      
   RE: How can I do MOVX in C?            01/01/70 00:00      
   use pointers            01/01/70 00:00      
      RE: use pointers - VERY CAREFULLY!            01/01/70 00:00      
      RE: use pointers            01/01/70 00:00      
      RE: use pointers            01/01/70 00:00      
         It all depends on the compiler...            01/01/70 00:00      
   RE: How can I do MOVX in C?            01/01/70 00:00      
   RE: How can I do MOVX in C?            01/01/70 00:00      
   What C?            01/01/70 00:00      
   RE: How can I do MOVX in C?            01/01/70 00:00      
   RE: How can I do MOVX in C?            01/01/70 00:00      
   Thanks            01/01/70 00:00      
      RE: Keil            01/01/70 00:00      
   RE: How can I do MOVX in C?            01/01/70 00:00      

Back to Subject List