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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/08/03 16:52
Read: times


 
#56340 - 8051 & External Ram
I have a Philips 8051 chip, P89C51RC2, and I am trying to interface it to external 16k x 8 Static RAM. I am having trouble getting it to work. I thought maybe someone could help. I have a dev board that I am using. So I tie Port 0 to a 74LS373 (Latch) to latch the address out, data out/in. From the output of the latch goes to the low 8 bit address on the RAM. The Port 2 goes to the upper 8 bit address on the RAM. I gave P3.6, P3.7 (Read, Write) connected to the RAM. I have the ALE line tied to the enable on the 74LS373 Latch. As far as I can tell, all my wiring is done correctly. I have triple checked it. In software, the P89C51RC2 has a register at 8Eh, that allows the EXTRAM bit to be set to 1, which means the MOVX instruction will access external ram, instead of internal ERAM. I have this bit set. I also set the bit next to it which makes ALE active only during a MOVX instruction, instead of its normal clock pulse. My code is simple:

ORG 00H
MOV P1, #00H ; CLEAR OUT P1 (LEDS)
MOV A, #0AAH ; LOAD A WITH AAh VALUE
MOV DPTR, #0000H ; LOAD ADDRESS IN DPTR
MOV 8EH, #00000011B ; SET EXTERNAL RAM ACCESS
MOVX @DPTR, A ; MOV AA out to 0000h
MOV A, #00H ; clear out A
MOVX A, @DPTR ; move AAh back into A
AGAIN: MOV P1, A ; display on LEDS
JMP AGAIN ; keep doing it
END

On my dev board, Port 1 is tied to eight LEDS, which allows me to hopefully see the AAh value on them. However it is not displaying the correct value. Short of my wiring being done wrong, does anyne have any suggestions. I appreciate everyones time and consideration.

List of 32 messages in thread
TopicAuthorDate
8051 & External Ram            01/01/70 00:00      
   RE: 8051 & External Ram            01/01/70 00:00      
   RE: 8051 & External Ram            01/01/70 00:00      
      RE: 8051 & External Ram            01/01/70 00:00      
         RE: 8051 & External Ram            01/01/70 00:00      
   RE: 8051 & External Ram            01/01/70 00:00      
      RE: 8051 & External Ram            01/01/70 00:00      
   RE: 8051 & External Ram            01/01/70 00:00      
      RE: 8051 & External Ram            01/01/70 00:00      
   RE: 8051 & External Ram            01/01/70 00:00      
      RE: 8051 & External Ram            01/01/70 00:00      
   RE: 8051 & External Ram            01/01/70 00:00      
      RE: 8051 & External Ram            01/01/70 00:00      
   RE: 8051 & External Ram            01/01/70 00:00      
      RE: 8051 & External Ram            01/01/70 00:00      
      RE: 8051 & External Ram            01/01/70 00:00      
         RE: 8051 & External Ram            01/01/70 00:00      
   RE: 8051 & External Ram            01/01/70 00:00      
      RE: 8051 & External Ram            01/01/70 00:00      
         RE: 8051 & External Ram            01/01/70 00:00      
   RE: 8051 & External Ram            01/01/70 00:00      
      RE: 8051 & External Ram            01/01/70 00:00      
         RE: 8051 & External Ram            01/01/70 00:00      
         RE: 8051 & External Ram            01/01/70 00:00      
         RE: 8051 & External Ram            01/01/70 00:00      
            RE: 8051 & External Ram            01/01/70 00:00      
               RE: 8051 & External Ram            01/01/70 00:00      
                  RE: 8051 & External Ram            01/01/70 00:00      
                  RE: 8051 & External Ram            01/01/70 00:00      
                     RE: 8051 & External Ram            01/01/70 00:00      
                        RE: 8051 & External Ram            01/01/70 00:00      
               RE: 8051 & External Ram            01/01/70 00:00      

Back to Subject List