123456789101112131415161718192021222324 |
- 100 REM **** Set MAX80 RTC ****
- 110 DIM T%(8%)
- 120 OUT 1%,54%
- 130 I%=0%
- 140 IF I%>8% THEN 320
- 150 IF (INP(1%) AND 130%)=2% THEN 190
- 160 Z%=INP(0%)
- 170 I%=I%+1%
- 180 GOTO 140
- 190 IF INP(0%)<>211% THEN 320
- 200 ; "YYYY,MM,DD,HH,MM,SS";
- 210 INPUT T%(1%),T%(2%),T%(3%),T%(4%),T%(5%),S6
- 220 T%(0%)=T%(1%)/100%
- 230 T%(1%)=T%(1%)-T%(0%)*100%
- 240 T%(6%)=S6 : T%(7%)=(S6-T%(6%))*100
- 250 OUT 2%,64%
- 260 IF (INP(1%) AND 65%)<>65% THEN 320
- 270 FOR I%=0% TO 7%
- 280 OUT 0%,T%(I%)
- 290 NEXT I%
- 300 OUT 2%,4%
- 310 END
- 320 ; "No MAX80 RTC detected"
- 330 END
|