Last active
September 8, 2016 22:03
-
-
Save Tamakichi/d38abfa319604ba271cbd09a30576e9e to your computer and use it in GitHub Desktop.
IchigoJam RTC DS3231利用サンプルソースその1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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