We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Need you generous helps. Why my program only can read out the first block 's data of 24LC16? The other data have been read out are all 0xff. The following code is my program about how to set device address and word address. For page write: I plan to write data at the address 0 of every block. void WR_MEMO_PAGE(unsigned char PAGE_NUM, unsigned char *MEMO_DATA, unsigned char PAGE_ADD) unsigned char TEMP_DATA; TEMP_DATA = PAGE_START_ADD; DEVICE_WRITE = ( TEMP_DATA << 1 ) | 0xa0; START_MEMO(); SHIFT_MEMO(DEVICE_WRITE); if ( RECACK_MEMO() == 1 ) { TEMP_DATA = ( TEMP_DATA >> 8 ); SHIFT_MEMO(TEMP_DATA); For single data write: void WR_MEMO( unsigned char SHIFT_DATA, unsigned int START_ADD) unsigned char TRAN_DAT; DEVICE_WRITE = ((BEG_DAT >> 8)<<1) | 0xa0; START_MEMO(); SHIFT_MEMO(DEVICE_WRITE); if ( RECACK_MEMO() == 1 ) { TRAN_DAT = START_ADD ; SHIFT_MEMO(TRAN_DAT); Would you gently to give me some clues? Thanks.
Why my program only can read out the first block 's data of 24LC16? The other data have been read out are all 0xff. As Eric says ... it may be erased. This response is also given if the device returned a NAK when initially addressed and the program continued to try to read anyway.