"I wrote this, but does not work
a var word
b var word
a=1234
b=5678
I2CWRITE PORTC.0,PORTC.1,$a0,0,[A,B]
I2Cread PORTC.0,PORTC.1,$a0,0,[A,B]
It will read only one byte from the word.
Variable must be define as Byte
try this
cont VAR BYTE
addr VAR WORD
cont = %10100000
addr=1
I2CWRITE PORTC.0,PORTC.1,cont,addr,[A]
I2CWRITE PORTC.0,PORTC.1,cont,addr+1,[B]
PAUSE 10
I2CREAD PORTC.0,PORTC.1,cont,addr,[A,B]
then send A, B serial
one other things. Do you put pull up resistor to the SDA and SCLK pin 5&6 on your EEPROM??? If not use about 4.7K. They must be installed...
let me know
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks