Hello,
I have an led display program that works fine with an 8031, but will not work with the 89S52. I'm missing something simple, I know it but I can't find it. Been trying for 3 days now.
all I want to do is put numbers in memory that correlate to numbers on the 7 segment led display. Here's a code example I've been using for years with the 8031 that won't display correctly with the 89S52. 89S52 EA is hi. I write to the led latch with a write pulse and address select line (74LS138). A51 assembly language.
.org H'00 Ljmp H'100
.org H'200 .db H'06, H'5b, H'4F, H'07, H'6D, H'3f, H'66, H'7F etc.
.org H'100
mov dptr, #H'200
movx A,@dptr
mov dptr, #LedDisplay
movx @dptr,A
.end
So breifly, my problem is somewhere with using .db and movx @dptr,A and Movx A,@dptr. I don't get the same number back as I put in.
Thankyou

Not all 8051 type processors have memory in the same locations. I would expect that an 8031 system is built exclusively with external memory. There are two different strobes that are used to read external memory, RD* and PSEN* but there is only one external memory write strobe WR*

I would need to see a schematic of the two systems to help you further.