What value pull-up's have you got on the SCL & SDA lines?
Try dropping them to say 1K.
BTW... you don't need 10mS pauses after I2CREADs, just I2CWRITEs.
What value pull-up's have you got on the SCL & SDA lines?
Try dropping them to say 1K.
BTW... you don't need 10mS pauses after I2CREADs, just I2CWRITEs.
and make sure your clock is lower than 400KHz & multiplexed stuff disabled as well.
As usual, without code, config fuse, it's impossible to say the exact solution... have you ever tried to find a needle in a field with your eye closed?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Melanie,
Thanks very much - your advice worked.
Original pull-up resistors were 10k.
Changed to 5k and all works OK - without DEFINE I2C_SLOW.
I sould have taken note of the PBP handbook that advises 4.7k!
Regards Bill Legge
Bill, if speed is an issue, you might also consider reading the eeprom datasheet section on polling the chip. On a recent one I worked on, the spec was something like 5ms write time max, but there was an option to poll to see if it was done. I put that in with a 50uS delay between polls, and it ended up only taking three polls to finish!
Bookmarks