Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/02/06 19:50
Read: times


 
#117644 - Problem with eeprom AT89S8253
Hello friends,

After years with the at89s8252 I started using the at89s8253.
I have problem writing its EEPROM.
I use the following program:
EEMEN     EQU 00001000b
EEMWE     EQU 00011000b
EEPREADY  EQU 00000010b

; ********************************************
;DN WREP8252
;D  Read 8252 EEPROM @DPTR in A
; ********************************************
RDEP8252: ORL   WMCON,#EEMEN    ; Enable EEPROM
          MOVX  A,@DPTR         ; EEPROM @DPTR > A
          XRL   WMCON,#EEMEN    ; Disable EEPROM
          INC   DPTR
          RET

; ********************************************
;DN WRITEEEP 
;D  Write 8252 EEPROM @DPTR 
 ;********************************************
WREP8252: ORL   WMCON,#EEMWE ; Enable write
          MOVX  @DPTR,A
WREEPR1:  MOV   A,WMCON      ; Status
          ANL   A,#EEPREADY  ; Check RDY/BSY'
          JZ    WREEPR1      ; Wait for RDY high
          XRL   WMCON,#EEMWE ; Disable write
          RET

It worked fine with the 8252 but with the 8253 I have the following problem.
Directly after the write(WREP8252) I read it back (RDEP8252) and test if the value written equals the value read back.
The high bit is inverted: FF > 7F 00 > 80
But when I look again the value is correct written.
I know that some EEPROM'S used the inversion of the high bit to indicate that the write is not completed but there is nothng in the manual about this method in de 8253.
I think that the RDY/BSY' bit is to indicate the end of the write.
As a result my Edit function returns an error, displays what is found, wich is the correct value
 <M> Edit EEPROM
 <1> 0100
 <*>      1   2  3
 0100: .  FF 00 80
 0100: .  00 <4
 0101: .  00 FF 7F
 0101: .  FF
 1 the old value
 2 new value typed by user
 3 new value returned by system
 4 new value of memory location (correctly changed)
 

Please Help

List of 5 messages in thread
TopicAuthorDate
Problem with eeprom AT89S8253            01/01/70 00:00      
   Maybe here            01/01/70 00:00      
      To Jon            01/01/70 00:00      
   Crude way to solve the problem            01/01/70 00:00      
      No problem - glad you shared ...            01/01/70 00:00      

Back to Subject List