t
69行目 |
修正前 OCR2A = 8 - 1; // 16MHz/8/2=1000kHz (radio-freq) 修正後 OCR2A = 4 - 1; // 8000000Hz/4/2=1000000.00 (radio-freq) |
設定周波数 | プログラムの設定 | 周波数の計算値 |
504Hz | OCR2A = 8 - 1; | 8000000Hz/8/2= 500000.00 (radio-freq) |
567Hz | OCR2A = 7 - 1; | 8000000Hz/7/2= 571428.57 (radio-freq) |
666Hz | OCR2A = 6 - 1; | 8000000Hz/6/2= 666666.67 (radio-freq) |
801Hz | OCR2A = 5 - 1; | 8000000Hz/5/2= 800000.00 (radio-freq) |
999Hz | OCR2A = 4 - 1; | 8000000Hz/4/2=1000000.00 (radio-freq) |
1332Hz | OCR2A = 3 - 1; | 8000000Hz/3/2=1333333.33 (radio-freq) |