8051 external ROM and RAM

Thread Starter

wave12

Joined Nov 29, 2021
14
Hi, I want to to copy the data of and external ROM adress to an external RAM adress,
my try :
CLR A
MOV DPTR, #8000H ; 8000H is the ROM Adress
MOVC A, @A+DPTR; A gets DPTR's data
MOV DPTR, #6000H ; 6000H is the RAM Adress
MOVX @DPTR, A

is this program correct? if yes is it the only method?
 

Papabravo

Joined Feb 24, 2006
21,225
Hi, I want to to copy the data of and external ROM adress to an external RAM adress,
my try :
CLR A
MOV DPTR, #8000H ; 8000H is the ROM Adress
MOVC A, @A+DPTR; A gets DPTR's data
MOV DPTR, #6000H ; 6000H is the RAM Adress
MOVX @DPTR, A

is this program correct? if yes is it the only method?
I believe that is correct.
The MOVC instruction uses PSEN* as the "READ" signal for the external ROM. Data from the ROM is latched on the rising edge of PSEN*
The MOVX instruction uses WR* as the "WRITE" signal for the external RAM. The transaction is complete on the rising edge of WR*

In the datasheets the active low signals for read, write, and program store enable are indicated with an overbar, which can also be indicated with a trailing asterisk.

I am kind of curious about what kind of memory you have at address 0000H, in your particular system. For data memory it is the internal registers, RAM, and SFR space.
 
Top