External ROM access - 8051

Thread Starter

wave12

Joined Nov 29, 2021
14
How can I set to zero the external rom memory? I know about MOVC instructions but in which way shall I use them here?
Thanks in advance
 

Papabravo

Joined Feb 24, 2006
21,159
How can I set to zero the external rom memory? I know about MOVC instructions but in which way shall I use them here?
Thanks in advance
You can't. The MOVC is a one-way instruction. It can only READ from the Program Memory Space. The "Chip Select" for the Program Memory Space is called PSEN* (Program Store Enable - Active Low). In the datasheet you might see it with an overbar, using a star after the name means the same thing. The RD* and WR* signals from the 8051 refer to External DATA Memory Only.

You might want to try explaining what you are up to, because it seems you are suffering from some misconceptions.
 

Thread Starter

wave12

Joined Nov 29, 2021
14
I tottaly agree, I'm facing a lot of misconceptions, I just wanted to set the external ROM of a specific adress to zero, as I learned that the only way to Access to external program memory is to use MOVC, that's why I thought using it
 

DrBearEE

Joined Feb 3, 2020
9
On 8051 family chips, most commonly, a ROM is used for the program, and any fixed data, such as lookup tables and such, that are known when the program is written. The code and this fixed data is "burned" into the ROM out of the system, then plugged into the system. The 8051 reads the ROM to get its program.

The program might use some MOVC instructions to get to some of that fixed data (such as a lookup table) from the ROM.

The data the program is using and changing as it runs is either a small amount included on the chip, or an external RAM chip seperate from the ROM.

Does that help?

Several of the previous posters have said this, but I'll say it again: If you tell us what you are trying to do, we can help more. A question with no context and no details can only get a general answer.
 
Top