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
10 CLS | |
30 [0]=31599:[1]=4681:[2]=29671:[3]=29647:[4]=23497 | |
40 [5]=31183:[6]=31215:[7]=29257:[8]=31727:[9]=31695 | |
50 [10]=1040:[11]=0:[20]=32:[21]=1 | |
100 N=0:P=0:Q=0 | |
210 X=P:Y=Q:GOSUB 500 | |
220 N=N+1:IF N=10 N=0 | |
230 P=P+4:IF P>31 P=0:Q=Q+6:IF Q >20 ?:END | |
240 GOTO 210 | |
500 B=12 |
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 'OLED Character Display DEMO | |
10 CLV | |
20 GSB @ショキカ | |
30 [0]="IchigoJam World" | |
40 [1]="ネ・コ・ニ・コ・ン・バ・ン・ワ" | |
50 X=0:Y=0:S=[0]:GSB @ヒョウジ | |
60 X=0:Y=1:S=[1]:GSB @ヒョウジ | |
70 END | |
500 @ショキカ | |
510 POKE #700,0,1,2,#C,1,#40 |
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) |
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
10 'RTC DS3231 | |
20 'T="16090407085800":GSB @SET | |
30 CLS:M=#700:A=#68:POKE M,0:L=0:S=M+16 | |
40 LET [0],31599,4681,29671,29647,23497,31183,31215,29257,31727,31695,0,1040,2184 | |
45 LET [20],11,11,10:X=2:Y=5 | |
50 FOR I=0 TO 12:FOR J=14 TO 0 STEP -1 | |
70 IF ([I]>>J)&1 D=1 ELSE D=32 | |
80 POKE S+L,D:L=L+1 | |
90 NEXT:NEXT | |
130 @LP:R=I2CR(A,M,1,M+1,7):GSB@PDG:GOTO @LP |
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
10 'RTC DS3231 | |
20 'T="16090805190630":GSB @SET | |
30 CLS:M=#700:A=#68:POKE M,0:L=0:S=M+16 | |
40 LET [0],31599,4681,29671,29647,23497,31183,31215,29257,31727,31695,0,1040,672 | |
50 LET [20],11,11,10,12,12,10:X=2:Y=13 | |
60 FOR I=0 TO 12:FOR J=14 TO 0 STEP -1 | |
70 IF ([I]>>J)&1 D=1 ELSE D=32 | |
80 POKE S+L,D:L=L+1:P=-1 | |
90 NEXT:NEXT | |
100 GOSUB @PDT |
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
// | |
// STM32 blue pill | |
// タイマー利用サンプル by たま吉 2017/01/05 | |
// オンボードと外部LEDを0.5秒周期で点滅させる | |
// 参考情報 | |
// HardwareTimer | |
// http://docs.leaflabs.com/static.leaflabs.com/pub/leaflabs/maple-docs/latest/lang/api/hardwaretimer.html#using-timer-interrupts | |
#define LED1_PIN PC13 | |
#define LED2_PIN PA1 |
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
// | |
// Arduino STM32 NTSCビデオ出力 サンプル V2.0 | |
// Blue Pillボード(STM32F103C8)にて動作確認 | |
// 最終更新日 2017/02/17 たま吉さん | |
// | |
#include <SPI.h> | |
#include <misakiUTF16.h> // 美咲フォントライブラリ | |
#define gpio_write(pin,val) gpio_write_bit(PIN_MAP[pin].gpio_device, PIN_MAP[pin].gpio_bit, val) |
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
/* | |
* Arduino STN32 | |
* Stm32ボード(STM32F103C8T6)で PWMで任意の周波数を生成する | |
* 作成日 2017/01/17 by たま吉さん | |
* | |
* 説明 | |
* ・PB9端子の圧電スピーカーを接続することで任意の周波数を音を出す | |
* ・Timer4 チャンネル 4 を利用しているため、PWM出力ピンはPB9固定 | |
* | |
* 参考にした情報 |
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
/* | |
* Arduino STM32 PWM制御中のGPIO出力の実験 | |
* 2017/02/07 by たま吉さん | |
* | |
* GPIOピンをPWMに設定した場合、digitalWite()による出力を行っても出力は変化しない | |
* GPIOピンをOUTPUTに設定した場合、TimerによるPWM出力は変化しなし。 | |
* PWMとGPIO出力を併用する場合は、pinModeを随時切り替えばよい。 | |
* | |
* ・HardwareTimer | |
* http://docs.leaflabs.com/static.leaflabs.com/pub/leaflabs/maple-docs/latest/lang/api/hardwaretimer.html |
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
/* | |
* Arduino STM32 ワンショットタイマー割り込み | |
* 2017/02/07 by たま吉さん | |
* | |
* | |
* |<----------->| 4sec Timer stop | |
* |<->| 1sec LED on | |
* |<----->| 2sec LED off | |
* | |
* ____|~~~|______ |
OlderNewer