| ??? 01/28/09 14:58 Read: times |
#161787 - Accessing internal EEPROM of 89S8253 |
Hello sir,
For my project, I want to use internal EEPROM of IC AT89S8253. So I have written a dummy code to access internal EEPROM of IC 89S8253. But I am facing the following probem: I am not getting the desired output after retrieving data from EEPROM.I am storing 5 in EEPROM and reading the same from it. But 4 is displayed on LCD. THe bits EEMEN (Access enable) and EEMWE (Write enable) are set while writing into the EEPROM. Even if change value from 5 to 6, 7 or any other value, I am getting 4 displayed on LCD. The code has been implemented as follows:
WRITE: MOV DPTR,#96H ;ADDRESS OF EECON
MOV A,#1BH
MOVX @DPTR,A ;SET WRITE AND ACCESS ENABLE
CHECK: MOVX A,@DPTR
CJNE A,#01BH,COMP ;CHECK IF EEPROM IS BUSY
MOV DPTR,#10H ;LOCATION IN EEPROM
MOV A,#05
MOVX @DPTR,A ;STORE 5 AT 10H LOCATION
SJMP CHECK
COMP: MOV A,#0BH ;RESET WRITE ENABLE
MOV DPTR,#96H
MOVX @DPTR,A
READ: MOV DPTR,#10H
MOVX A,@DPTR ;READ DATA FROM 10H
ACALL DISPLAY
END: SJMP END
Please, could someone help me out by pointing out where I could be going wrong and as to why I am not able to get the same data on LCD. I have checked on Pseudomax Simulator that the code works fine. My LCD routines are working fine as I have used them for other codes of project. |
| Topic | Author | Date |
| Accessing internal EEPROM of 89S8253 | 01/01/70 00:00 | |
| EECON is SFR | 01/01/70 00:00 | |
| Thanx for the help. | 01/01/70 00:00 | |
| Always a good starting point... | 01/01/70 00:00 | |
89s8253 | 01/01/70 00:00 |



