Hi,
I'm using I2C command with 8564 RTC .
I2Cwrite is working ok.
I2CREAD is not giving me what I want.

ADCON1=127
sda var portb.4
scl var portb.5
dt var byte
I2Cwrite sda,scl,$A2,$0D,[80] 'write 80 hex in register 0D.
I2Cread sda,scl,$A3,$0D,$A2,[dt] 'This command should put 80 hex in dt
write 0,dt 'this puts dt i.e.80 hex in EEPROM location 0.

according to the datasheet of 8564 I2CREAD should be written as above control address (read) ,reg address ,control address (write).

When compiling the above patch, no error appears in PBP.
Can you suggest where the problem is or how I can modify/rewrite/rearrange I2CREAD.
Processor is 18F1320. PBPv2.46 ,IDE MCSP
Thanks
Suded.