今回は、ATtiny84に書込をしてみたのでそれの記録。
意外とATtiny84に書込をした記述は少ない!
なんで?!
配線
書込設定
1、まずはArduino unoに「ArduinoISP」を書き込む。
ファイル>スケッチ例>11.ArduinoISP>ArduinoISPを選択し、マイコンボードに書き込むボタンをクリック。
2、ボード環境の構築
Arduino>Prefrencesをクリックして、追加のボードマネージャのURLに以下を追加。
https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
3、ブートローダの書込
4、Lチカのサンプルプログラム書込
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(7, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(7, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(7, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
5、サンプル用の配線
注意点
ATtiny84のピン番号は少し変わっていますのでその点だけ要注意です。
ピン番号は以下のサイトを参考にして下さい。
https://create.arduino.cc/projecthub/Arnov_Sharma_makes/programming-attiny84-088482