Hi, Hippy
Thanks for your intervention.
But, it does not seem to me that there is a problem in the program of the "Mission" but only a problem of programming of the setup of the DS1307.
The fact that this flash does not work makes me think that the DS1307 does not program.
I tried with various DS1307 and the results are identical.
Below the code used:
---------------------------------
CODE
---------------------------------
' AXE110 PICAXE – RTC Setup
' Automatically generated by Picaxe Editor 6.0.9.2 DS1307 Wizard
#Picaxe 18M2
symbol secs = b0
symbol mins = b1
symbol hour = b2
symbol dow = b3 : symbol chkdow = b9
symbol day = b4 : symbol chkday = b10
symbol month = b5 : symbol chkmonth = b11
symbol year = b6 : symbol chkyear = b12
symbol century = b7
symbol control = b8 : symbol chkctrl = b13
high 5 ' write protect eeprom
' hi2csetup i2cmaster, %01101000, i2cslow, i2cbyte '$68 is the Non-configurable slave adress of a DS1307
hi2csetup i2cmaster, %11010000, i2cslow, i2cbyte '$D0 is the adress generated by the Wizard !?
' Note that I do not get the flash 1HZ either with one or with the other address !!!
century = $20
year = $17
month = $02
day = $04
dow = $07
hour = $11
mins = $30
secs = $49
control = $10 '$10 = Flash, $00 = No Flash
hi2cout 0, (secs, mins, hour, dow, day, month, year, control)
pause 50
hi2cin 3, (chkdow, chkday, chkmonth, chkyear)
if chkdow <> dow then fail
if chkday <> day then fail
if chkmonth <> month then fail
if chkyear <> year then fail
ok:
high 3
sertxd("Time set okay",cr,lf) ' For console debug
pause 1000
goto ok
fail:
high 2
sertxd("Time setting failed",cr,lf) ' For console debug
pause 1000
goto fail