not sure what version of pbp you are using but you could try
DEFINE I2C_SLOW 1
your original CODE LOOKS PRETTY GOOD TO ME
I2CWrite SDA, SCL, $D0, $00, [RTCSec, RTCMin, RTCHour, RTCDay, RTCDate, RTCMonth, RTCYear, RTCCtrl]
I2CWrite SDA, SCL, $D0, 0, [RTCSec, RTCMin, RTCHour, RTCDay, RTCDate, RTCMonth, RTCYear] would do
Return
' Subroutine to read time from RTC
gettime:
I2CRead SDA, SCL, $D0, $00, [RTCSec, RTCMin, RTCHour, RTCDay, RTCDate, RTCMonth, RTCYear, RTCCtrl]
I2CRead SDA, SCL, $D0, 0, [RTCSec, RTCMin, RTCHour, RTCDay, RTCDate, RTCMonth, RTCYear] would do
Return
sometime the rtc osc needs a wake up
i2cwrite sda,scl,$D0,0,[%10000000] ' FORCE CLK OSC TO START st bit
i2cwrite sda,scl,$D0,0,[0] ' FORCE CLK OSC TO START
if you don't have a battery on the 1307 the vbatt pin nees to be grounded , if left floating the chip can be difficult
ps this is for pbp 3 not sure about earlier verrsions
Bookmarks