I've some problem with an I2C EEPROM (24LC64T).
If I do single Read/Write of one byte / page all works well.
If I try do due consecutive Read or Write I notice some malfunctions with writing the bytes in the wrong position.
Even introducing delays between one writing and another respecting the times indicated in the datasheet (I also tried with very large delays beyond 10ms) the problem remains.
What am I doing wrong?
Must the delay be by chance between the address byte and the data byte?
I am attaching the examples that I have used. They are for a custom board with the k22 microcontroller but can also be used on other micro.
thanks but I should have solved it.
From what I have seen you must always wait 5 ms after an operation and as regards writing a page you must always write from a multiple address of a page itself (in my case 32 bytes) otherwise it does not increase the internal counter but starts overwriting the same page.
I hope it will be useful to others too :smileyhappy:
is specified as 5ms but can be shorter. The best way to handle it is by using the acknowledgement method advised by the chip manufacturer.
[uTasker project developer for Kinetis and i.MX RT]