; ; DS1307 RTC test routine ; ; I ran this with no battery on the DS1307 ; to use: choose picaxe|run. Once it gets going you should see a debug dialog box ; with the values of the clock in the b registers as setup in the symbols lines ; it should count forward about every 4 seconds. ; copyright 2006, singlespoon ministries. Released under GPL v2 symbol seconds = b1 symbol mins = b2 symbol hour = b3 symbol day = b4 symbol date = b5 symbol month = b6 symbol year = b7 symbol control = b8 i2cslave %11010000, i2cslow, i2cbyte pause 100 start_clock: let seconds = $00 let mins = $13 let hour = $11 let day = $06 let date = $04 let month = $08 let year = $06 let control = %00010000 writei2c 0,(seconds,mins,hour,day,date,month,year,control) main: pause 4000 readi2c 0,(seconds,mins,hour,day,date,month,year) debug b1 goto main