If you read carefully page 48 of the manual, you will find that you should first declare a variable for the values you want to write. Either a byte or word variable. Then you use this variable within the I2CWrite command.
Most EEPROM have page write and byte write capability. Your should either try to write a full page, or go one byte/word after the other (that's a single 'value' at a time). Anything else will result in 'strange' problems. See your EEPROM datasheet to make sure it support page write first, you will also find the size of the write buffer for your chip. But to stay on the safe side I would suggest you to go one byte or word at a time.
This: I2CWRITE SDA,SLC,I2CDevice,I2CAddress,[%10101010, %01010101]
should then be:
WordVar VAR WORD
...
WordVar = put any value here
I2CWRITE SDA,SLC,I2CDevice,I2CAddress,[WordVar]
OR
ByteVar VAR BYTE
...
ByteVar = put any value here
I2CWRITE SDA,SLC,I2CDevice,I2CAddress,[ByteVar]
Also, without the schematic I can only point some area for you to check:
-Since I2CDevice = $A0 = %10100000, you should make sure the A2,A1 and A0 pins of your EEPROM are at Vss (Ground)
-Are you using pull-up resistors on SCL and SDA line ?
-Did you make sure you turned off analog mode for SDA an SCL pins you're using? (if applicable)
Hope this will help.
J-P




Bookmarks