- 2010-06-23 (水)
ミニマルなArduinoのように生のAVRを購入してArduinoのスケッチを書き込む場合、その前にブートローダを書き込む必要があります。
そこでUsing an Arduino as an AVR ISP (In-System Programmer)を参照しながら実際にブートローダを書き込んでみたいと思います。この方法だとArduinoを持っていればブートローダを書き込む事が出来ます。
本記事では、書き込みの条件として、Arduinoのボードを1枚と、ブレッドボード+ジャンパケーブル、そして生のAVR(ATmega168)が1つある物とします。
今回の条件に当てはめて書き直すと:
- Upload the ArduinoISP firmware (in Examples) to your Arduino board.
- Wire your Arduino board to the target as shown in the diagram below.
- Select the item in the Tools > Board menu that corresponds to the board on which you want to burn the bootloader (not the board that you're using as the programmer). See the board descriptions on the environment page for details.
- Use the Burn Bootloader > Arduino as AVRISP command.
- ArduinoISPと呼ばれる書き込み用のスケッチをArduinoボードにアップロードする(スケッチはExampleの中にあります)。これによりArduinoがブートローダ書き込み機になるわけです。
- Arduinoボード(書き込み機)と対象となるAVRをケーブルでつなぐ(つなぎ方は下図の通り)
- メニューのTools > Boardから書き込みたいブートローダの種類を選びます。今回はLilypad Arduino with ATmega168を選びます。
- メニューのBurn Bootloader > Arduino as AVRISPを選びます
書き込みが完了したらこちらのようにブレッドボードなどで配線して使用できます
- Newer: Arduinoのブートローダを書き込む方法 (補足)
- Older: 赤外線ビーコン