??? 06/04/04 07:37 Read: times |
#71711 - RE: Serial EEPROM problem Responding to: ???'s previous message |
It seems odd that the following statement is the same in both read and write functions:
i2c_SendAddress(ROM, 0); Why odd? , you need to write address in both cases. In writeAt(), i2c_Stop() presumably initiates the self-timed write (5ms or thereabouts?). thats right. Without seeing the bigger picture, I'd ask whether you could be trying to read before the write has finished. I thought about that so I waited for 10msec, even 100msec but still unable to write. How soon are you turning back around to read? Are you using a simple write completion timeout or are you write-busy polling elsewhere to pace EEPROM operations after the write? good suggestions but for now I only write one test byte and read it to verify. I even implemented this pageWrite test routine and read the eeprom through external programmer and still no write! /****************************************************************************** * NAME: writePage * * DESCRIPTION: This function writes a page to a specified address * ******************************************************************************/ void writePage() { unsigned char xx; i2c_Start(); // start condition i2c_SendAddress(ROM, 0); // 0 = write, 1 = read, ROM is 0xA0 i2c_ReadAcknowledge(); // wait for acknowledge from EEPROM i2c_SendByte(0); // send upper address byte i2c_ReadAcknowledge(); // wait for acknowledge from EEPROM i2c_SendByte(0); // send lower address byte i2c_ReadAcknowledge(); // wait for acknowledge from EEPROM for(xx = 0; xx < 64; xx++) // write test page to read by external programmer { i2c_SendByte(xx); // write the data to EEPROM i2c_ReadAcknowledge(); // wait for acknowledge from eeprom } i2c_Stop(); // stop initiating the self-timed write |
Topic | Author | Date |
Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
RE: Serial EEPROM problem | 01/01/70 00:00 | |
Problem Solved!!!!!![]() | 01/01/70 00:00 |