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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/25/05 10:44
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#93877 - the error...
Responding to: ???'s previous message
...is in the dump routine - you don't increment the EEPROM address in dptr.
dump_eep:
  lcall Chk_Dev ;
  MOV   DPTR,#0000H
dump:
  mov   count,#010h
  mov   R0,#030h
dump1:
  LCALL EEPROM_READ
  inc   dptr   ;missing 
  MOV   A,DYTA ;read byte in DYTA
  mov   @R0,a
  inc   R0
  djnz  count,dump1
  lcall PrintLine

But I would object a lot of things in your program.
The delay is there, the DELAY_STOP routine. Nevertheless, it depends on EEPROM type/brand and '51 type and clock, whether this is sufficient or not. Most EEPROMs implement a "polling" scheme so they "tell" you when the write is done. Read the EEPROM datasheet.

Jan Waclawek

PS. For formatted look of you program in the forum - just as above - enclose the program into <pre> and </pre> tags.


List of 9 messages in thread
TopicAuthorDate
movx a,@dptr!            01/01/70 00:00      
   I think your problem is...            01/01/70 00:00      
   No Michael            01/01/70 00:00      
   DYTA EQU 10H?            01/01/70 00:00      
   movx a,@dptr            01/01/70 00:00      
      code format            01/01/70 00:00      
      WHICH EEPROM            01/01/70 00:00      
      the error...            01/01/70 00:00      
         movx a,@dptr            01/01/70 00:00      

Back to Subject List