logo elektroda
logo elektroda
X
logo elektroda

24C04 I2C EEPROM read issue after several words with 89C52 microcontroller assembly

63 6
ADVERTISEMENT
  • #1 21667426
    Debdas Choudhury
    Anonymous  
  • ADVERTISEMENT
  • #2 21667427
    Boi Okken
    Anonymous  
  • ADVERTISEMENT
  • #3 21667428
    Mark Harrington
    Anonymous  
  • ADVERTISEMENT
  • #4 21667429
    Debdas Choudhury
    Anonymous  
  • #5 21667430
    ganesh Bhosle
    Anonymous  
  • ADVERTISEMENT
  • #6 21667431
    Debdas Choudhury
    Anonymous  
  • #7 21667432
    Debdas Choudhury
    Anonymous  

Topic summary

An assembly language program was developed for an Atmel 89C52 microcontroller to save and read words from a 24C04 I2C EEPROM using data from a PS2 keyboard. The writing process to the EEPROM functions correctly, but during reading, after successfully retrieving several words, the system hangs. The PS2 keyboard input is processed by counting scan codes on each clock pulse. The issue was suspected to be related to stack overflow or insufficient RAM. After reinitializing the stack pointer with the instruction MOV SP,#5FH, the hanging problem was resolved, indicating that proper stack management is critical when interfacing the 89C52 with the 24C04 EEPROM and PS2 keyboard in assembly.
Summary generated by the language model.
ADVERTISEMENT