Create a gist now

Instantly share code, notes, and snippets.

IchigoJam RTC DS3231利用サンプルソースその1
1 'RTC DS3231
10 CLS:M=#700:A=#68:POKE M,0:D="// : "
20 'T="16090407085800":GSB @SET
30 @LP:LC 0,0:GSB @PRN:WAIT 30:GOTO @LP
40 @SET
50 N=M+7
60 FOR I=T TO T+13 STEP 2
70 POKE N,(PEEK(I)-48)<<4+PEEK(I+1)-48:N=N-1
80 NEXT
90 R=I2CW(A,M,1,M+1,7)
100 RTN
110 @PRN
120 R=I2CR(A,M,1,M+1,7): ?"20";
130 FORI=0 TO 6
140 IF I<>3 ?HEX$(PEEK(M+7-I),2);STR$(D+I,1);
150 NEXT
160 RTN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment