1234567891011121314151617181920212223242526 |
- 100 REM **** Read MAX80 RTC ****
- 110 DIM T%(8%)
- 120 OUT 1%,54%
- 130 I%=0%
- 140 IF I%>8% THEN 340
- 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 340
- 200 OUT 2%,128%
- 210 IF (INP(1%) AND 130%)<>128% THEN 340
- 220 FOR I%=0% TO 7%
- 230 T%(I%)=INP(0%)
- 240 NEXT I%
- 250 D$=""
- 260 FOR I%=0% TO 7%
- 270 IF T%(I%)<10% D$=D$+"0"
- 280 D$=D$+RIGHT$(NUM$(T%(I%)),2%)
- 290 S0$=MID$("_-- ::._",I%+1%,1%)
- 300 IF S0$<>"_" THEN D$=D$+S0$
- 310 NEXT I%
- 320 ; D$
- 330 END
- 340 ; "No MAX80 RTC detected"
- 350 END
|