Issue to stop using eprom & continue using RAM in 8051 microcontroller - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Issue to stop using eprom & continue using RAM in 8051 microcontroller

Hi, I have a C51 using external eprom and RAM memory, but I want to start using the internal flash memory of the CI, but the external RAM memory.
The microcontroller I'm using is the Megawin MPC59E515A. (Datasheet: )

So, I changed the pin 31 (/EA) from gnd to 5V, changed these variables:
AUXR (08Eh) <- #11b (to stop using the internal RAM memory and use the external)
XICON (0C0h) <- #00 (external interrupt control)
P4 (0E8h) <- #00 (I/O Port)

and commented the code parts that uses the eprom memory.

Then I made the following code to test the external memory

mov a,#35h
mov dptr,#7ffeh ;tests the 62256 RAM memory
mov 08Eh,#03
mov 0C0h,#00
mov 085h,#00
mov 0E8h,#00
movx @dptr,a
mov a,#16h
mov dptr,#7fffh ;two bytes in the end
movx @dptr,a

mov dptr,#7ffeh
movx a,@dptr
clr c
subb a,#35h
jnz tram_loop
mov dptr,#7fffh
movx a,@dptr
clr c
subb a,#16h
jnz tram_loop

But it will never get out of the loop... not even the first jnz.
Any help, please?

Sign In or Register to comment.