Reading page from eeprom 24lc64 with at89c52

Thread Starter

mahi12

Joined Sep 20, 2022
1
having problem reading from page in eeprom
C-like:
Unsigned int

      read_page_from_eeprom(unsigned char

       addr)

       {

       StartI2c();

       While(writeI2c(device_addr + 0)==1)

       {

       StartI2c();

       }

       writeI2c(addr>>8)

       writeI2c(unsigned char) addr);

       Repeated_start_i2c();

       writeI2c(device_addr + 1);

       Delay();

       rxdata=readI2c();

       SendNak();

       Stopi2c();

       }
Kindly tell me what's the problem

Here is the debugging of eeprom
Red line indicates reading from page is not correctScreenshot_20220920-011756_Word.jpg
 

Attachments

Last edited by a moderator:
Top