4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Arduinoを用いたArduinoへのプログラム~Arduino as ISP

Last updated at Posted at 2020-03-04

概要

Arduino as ISP のAVRへの書き方の説明はおおいですが、Arduinoへの使い方の説明が少なく、ちょっと試行錯誤してしまったのでメモを残します。

いろいろやってうまく行かない人へ

私は全然うまくいかなくて悩んだ結果、
CTRL+Shift+U で書き込む(Shiftが大事!!
または、「スケッチ」リボン->「書き込み装置を使って書き込む」で実行してみてください。

書き込み装置

通常時 ->[ AVRISP mkⅡ] (忘れてしまうので一応)
Arduino as ISP使用時 -> [ Arduino as ISP ]

配線

|Programmer |Target |
|---|---|---|--- |
|5V |5V |
|GND |GND |
|10|RESET|
|13|13|
|12|12|
|11|11|

Programmerのpin9にLEDを繫ぐと光が、強くなったり弱くなったりハートビートしてます。
Errorで失敗すると、強いままで停止します。そのときはProgrammer側のRESETをした方が良いです。

ボード

Targetのボードの種類にしてください

エラー

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

このエラーが出る場合、CTRL+Shift+U で書き込むとうまくいくかも知れません

「ボードへの書き込みが完了しました」は出るが、うまくいかない
Programmer側に書き込まれている可能性が高いです。

avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude: Expected signature for ATmega328P is 1E 95 0F
         Double check chip, or use -F to override this check.

このエラーは配線が間違っているか、供給電源が足りていない時に起きました。
書き込みの10をターゲットのResetにつなぐべきなところを、逆にして失敗しました。
また、ACアダプターをつなぐとうまくいった場合がありました。

ターゲットに書き込まれているプログラムが邪魔をしている可能性があるので、「ブートローダーを書き込む」をやり直すとうまくいく場合がありました。
書き込み機に「ArduinoISP」を書き直すのもいいかもしれません

4
1
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
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?