Quote Originally Posted by richard View Post
I will say again pbp will set bit 0 of the i2c device address as required
by running :-
I2CRead SDA, SCL, $D0, 0, [RTCSec, RTCMin, RTCHour, RTCDay, RTCDate, RTCMonth, RTCYear]

it will write 0 to the control address logic of the 1307 and then read 7 bytes
try it !
$D0 is write

I2CRead SDA, SCL, $D1, 0, [RTCSec, RTCMin, RTCHour, RTCDay, RTCDate, RTCMonth, RTCYear]

Is read according to the data sheet and the example in #9.

Interestingly the data sheet extract shown in #8 says to do

I2CWrite SDA, SCL, $D0, 0

reset the write pointer then

I2CRead SDA, SCL, $D1, [RTCSec, RTCMin, RTCHour, RTCDay, RTCDate, RTCMonth, RTCYear]

to read the time.

But the example code in #9 works by using

I2CRead SDA, SCL, $D1, 0, [RTCSec, RTCMin, RTCHour, RTCDay, RTCDate, RTCMonth, RTCYear]

So I am curious to find out from Sabahan what works in his case.