| ??? 12/16/03 06:29 Read: times |
#60697 - Problems with XRAM access in ATMEL chip |
I searched through this forum and found similar queries, but none solved my problem.
I am using an ATMEL chip AT89C5122 and it has expanded RAM 1k accessed with EXTRAM=0 and XRAM (for external devices) accessed with EXTRAM=1. I tried to access an external chip connected at address 0x0000 of XRAM. MOV P1, #00H ; Clear the PORT 1 MOV A, #0AAH ; Move some content to acc MOV DPTR, #0000H ; Set the DPTR with address MOV 8EH,#00000010b ; Set EXTRAM MOVX @DPTR, A ; Put data in XRAM MOV A, #00H ; Make sure A is 0 MOVX A, @DPTR ; Get the data back At this point A is having 0. If I try with some other location like 0x0001 then A is 1 ie A reflects the lower address bits !! I saw a similar thread which suggested that i use delay between the MOVX instructions. I did that too but to no effect. Also I can find that ALE/addr/data are proper in oscilloscope. Is there anything else to be done other than setting EXTRAM? Is a latch required? Please help me. |



