O.k
simply use WORD to get your result and then use 2 byte to convert and send them to eeprom.
By example (MSB, LSB will be value to send/receive from eeprom)
RESULT VAR WORD
MSB VAR BYTE
LSB VAR BYTE
ToConvert VAR WORD
addr VAR BYTE
cont VAR BYTE
addr=0
cont=$a0
;convert WORD size to 2 BYTEs before send to eeprom
RESULT=1234
LSB=RESULT.byte0
MSB=RESULT.byte1
I2CWRITE PORTC.0,PORTC.1,cont,addr,[MSB,LSB]
PAUSE 10
;now convert from eeprom to WORD size and send it
I2CREAD PORTC.0,PORTC.1,cont,addr,[MSB,LSB]
ToConvert.byte0=LSB
ToConvert.byte1=MSB
SEROUT SO,16468,[#ToConvert,10]
i didn't test it but it suppose to work.
let me know
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks