EDIT2: Thought i saw that before...
One thing i discover in your code...
Code:
LOOP:
I2CRead DS_SDA,DS_SCL,$D0,$00, [sec,MINs,hr,day,date,mon,yr] ' Read Ds1307
If sec.7=1 then goto coldstart
If setbutton = 0 then 'if setbutton is pressed
_hr=hr
_min=MINs
_sec=sec
gosub SetButtonRelease
Gosub SetTimeAndDate 'after release
endif
counter3=0
repeat 'show the segments for 5 times.
pauseus 10
until counter3 > 5
GoTo Loop
You don't increment Counter3 variable.. so it will never jump to Loop... hence maybe why it works when you're using RESUME LOOP...
Same thing in PauseLoop
Code:
Pauseloop: 'some timedelay
counter3=0
repeat
pauseus 10
until counter3 > 50
return
and
Code:
'------------------------------------
SetButtonRelease: 'delay for button
counter3=0
while setbutton=0
pauseus 10
Wend
if counter3=>29 then
repeat
pauseus 10
until counter3 > 70
else
goto loop
endif
Return
I'll wait before building it
Bookmarks