I am trying to read and write to a 24LC65 eeprom.
I have checked all the hardware and its fine.
Something in my routine must be wrong.
The first 12 memory locations do not contain what I wrote to them
and only get 255 for the rest. Seems it is not writing properly.
I have read through the data sheet form Microchip
but I must have missed something.
To be honest, its a bit too technical for me.
Anybody want to leave me a clue as to where to go from here?Code:scl var PORTC.3 sda var PORTC.4 addr var byte y1 var byte x1 var byte start: addr = 0 loop: lcdout $FE, 1, "Eeprom Data ", #addr, " ", #y1 x1 = 255 - addr i2cwrite sda, scl, $A0, addr, [x1] pause 20 i2cread sda, scl, $A0, addr, [y1] addr = addr +1 pause 500 if addr =100 then goto start goto loop
Wilson




Bookmarks