Can you try it with a variable instead of a constant in the I2C Address... eg...
RTC var Byte
RTC=$D0
I2CWRITE DPIN,CPIN,RTC,0,[0,0,0,0,0] ' intilization of ds1307
and likewise in reading...
I2CREAD DPIN,CPIN,RTC,0,[B0] 'ds1307 read
there is no need to change between $D0 and $D1 when reading or writing, because PBP manipulates bit zero for you automatically. You only need to concern yourself with the upper seven bits of the address.
Nobody reads FAQ's... makes me wonder why I spent the time doing them in the first place...http://www.picbasic.co.uk/forum/showthread.php?t=587
Bookmarks