Adjust RTC using pushbuttons
Moskog
Posts: 554
Came into a difficult problem trying to adjust a DS1302 by using switch and LCD display instead of DEBUG terminal.
Example adjusting date with DEBUGIN:
My code so far, that is not working: (S1 = normally open pushbutton)
How can I count the date with HEX2 inside the loop?
Example adjusting date with DEBUGIN:
DEBUGIN HEX2 date
My code so far, that is not working: (S1 = normally open pushbutton)
GOSUB AdjDate DO date = date + 1 if date > 31 then date = 1 GOSUB AdjDate PAUSE 750 LOOP UNTIL S1 = 0 AdjDate: SEROUT TX, LcdBaud, [LcdCls, LcdLine1, "Date: ",HEX2 date] SEROUT TX, LcdBaud, [LcdLine2, "Set: Press S1"] RETURN
How can I count the date with HEX2 inside the loop?
Comments