tekart,
With the 24LC08, the address needs to be a BYTE.
There are also 4 "blocks" of 256 bytes that can be selected in the "control" byte.
And the address should increment (STEP) by 2 for word sized data.
I ran this in Proteus ... seems to work.
Code:
Temp VAR BYTE
Mode VAR WORD
for temp = 0 to 38 STEP 2
Mode = temp
i2cwrite ee_dat,ee_clk,$A0,Temp,[Mode] ' write
pause 400 ' hold for display
i2cread ee_dat,ee_clk,$A0,temp,[Mode] ' read it back
lcdout lcdcmd,lcdline2 ,#temp," ",#Mode ' display it
pulsout piezo,10 ' diagnostic "tic" sound
next temp
Bookmarks