Thanks for your reply!
"Also, write cycle time for 24LC512 is stated to be 5ms max. in datasheet but I would make it 10ms."
Yep I know, I actually used 10ms at first, even changing it to 500ms for test purposes. Doesn't make any difference: when I use the subroutine alone it always work, but not in my main program.
My circuit is powered by regulated 5V also...
I have attached the complete code where the I2CWRITE routines are not working. I'm still working on it so it may not be the cleanest and needs a bit of tweaking, but everything else work.
The part of the code where I read the eeprom is the subroutine "read_mode". This is also where I added lines to output the variables to LCD for debugging (they are now removed, but it worked as I could read correct values that I programmed manually with an I2C memory programmer).
Still investigating on my side...
Bookmarks