LoginSignup
1
0

More than 1 year has passed since last update.

Arduino MegaでATmega328P-AUに書き込みしてみた

Last updated at Posted at 2022-09-27

経緯

今回は手元にArduino unoがなかったのでMegaで書き込みしてみた。
ATMega328P-AUに書き込むにあたりDIP化するため
秋月電子通商のDIP化基板を使用した。
image.png
https://akizukidenshi.com/catalog/g/gP-09581/

配線

image.png
image.png

Arduino Megaを書き込み装置に変更

1、ArduinoISPをArduinoMegaに書き込み
image.png
image.png

2、ブートローダーをATmega328P-AUに書き込み
「ブートローダを書き込む」を選択する
image.png

3、スケッチを書き込み
以下のスケッチを書き込んだ。
ピンアサインの考え方にめちゃくちゃ苦労した。。。
このサイトのピンアサインを参考にした。
http://domoticx.com/atmega328-au-programmeren-met-arduino-als-isp/

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(9, OUTPUT);  //13pinが9になるらしい
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(9, HIGH); 
  delay(1000);                       // wait for a second
  digitalWrite(9, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

書き込みは以下の設定。
image.png
書き込みは「書込装置を使って書き込む」を選択。
image.png

これでLチカ完了です。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0