Вопрос

When I connect 8051 to an external memory, should I change the RD and WR signals in software or is this made by processor itself when I use the MOVX command?

For example I will read from some location at memory,

;CLR RD
MOV DPTR,#SOMELOCATION
MOVX A,@DPTR

is CLR read command required here or processor just clears that itself by looking if the code is

MOVX A,@DPTR ;or
MOVX @DPTR,A
Это было полезно?

Решение

If the processor has RD and WR lines, then yes, the processor will pulse the write line with timing as described in the data sheet as it executes the "movx @dptr,A" instruction. In addition, ALE would have been pulsed to latch the low byte of the address for the memory.

If for some reason it was necessary to operate the chip write using a clear bit instruction as you state above, you are doing it in the wrong place. You would need to set up address and data THEN pulse write low, then return it high, before any other change in address and data.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top