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:
http://www.brighteamtech.com.tw/UpLoad/572/006090100010/MPC89E515A_A9.pdf )
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
tram_loop:
mov a,
#35hmov dptr,
#7ffeh ;tests the 62256 RAM memory
mov 08Eh,
#03mov 0C0h,
#00mov 085h,
#00mov 0E8h,
#00movx
@dptr,a
mov a,
#16hmov dptr,
#7fffh ;two bytes in the end
movx
@dptr,a
mov dptr,
#7ffehmovx a,
@dptrclr c
subb a,
#35hjnz tram_loop
mov dptr,
#7fffh movx a,
@dptrclr c
subb a,
#16hjnz tram_loop
But it will never get out of the loop... not even the first jnz.
Any help, please?
Helder