Mr. Jerson is very right on , make sure that the address pins are ground and in fact I have all pins at ground execpt for the data and clock lines, exception is if there is more than one memory chip connected,
read section 5.34 and 5.35 in the PicBasic pro compiler book it has a very good discription of how these commands work... also read the data sheet. try to use an error rutine at the end of the i2c statment, it will let you know if the write or read is successfull..
good luck
Mike
example of some code
addres var word
w var byte
cont con %10100000
for addres = 1 to 255
i2cwrite portb.var,portb,var,cont,addres,[w], error
pause 150
next addres
for reading just put in the 12cwread for the write statment
error:
lcdout $fe,1, "error no ack received"
end
Bookmarks