Professional Documents
Culture Documents
Note that you do this at your own risk. I don't take any responsability for the use of the information given here.
This page describes how to setup a breadboard with an atmega644p or atmega1284p microcontroller, using an Arduino Duemilanove board as bootloader burner
and sketch uploader. You don't really need a Duemilanove, you can use any Wiring or Arduino board (even another breadboard with a microcontroller). You only
need to locate the SS, MISO, MOSI and SCK pins of the board/microncontroller, and connect them as described here.
Here [[1] (http://wiring.org.co/learning/tutorials/atmegaDIPbootloader/) ] is another tutorial equal to this one (I recommend reading it as it has more explanations),
using a Wiring board as programmer and an atmega328p as target device.
You can also program any AVR microcontroller that is supported by Wiring. See the list in the menu Tools->Board->Atmel.
The setup of the microcontroller involves two steps: burning the bootloader (done once) and uploading a sketch (done every time you want to change the program
in the microcontroller)
Each of the two steps involves a different connection scheme between the programming (host) board and the target microcontroller (the one to be programmed). It
is important that in the second step you remove the microcontroller from the Arduino board, so that the FTDI USB chip can talk directly to the target
microcontroller.
http://wiki.wiring.co/wiki/Creating_your_own_Wiring_board_with_a_DIP_atmega1284p_using_Duemilanove 1/6
14/04/2018 Creating your own Wiring board with a DIP atmega1284p using Duemilanove - Wiring
Here are the connections to be made beetween the host Duemilanove (with Arduino pin numbering) and the target atmega1284p (in DIP pinout, not Wiring
numbering).
Duemilanove atmega1284p
10 (SS) yellow 9 (RESET)
11 (MOSI) green 6 (MOSI)
12 (MISO) purple 7 (MISO)
13 (SCK) orange 8 (SCK)
Vcc (5V) pins 10 and 30 (Vcc)
GND (0 V) pins 11 and 31 (GND)
http://wiki.wiring.co/wiki/Creating_your_own_Wiring_board_with_a_DIP_atmega1284p_using_Duemilanove 2/6
14/04/2018 Creating your own Wiring board with a DIP atmega1284p using Duemilanove - Wiring
Once you've got your circuit connected, connect the USB to the Duemilanove and open the Wiring IDE:
3 - Select the Duemilanove to program the ISP sketch in menu Tools->Board->Arduino->Arduino Duemilanove (or the board you're using as host)
5 - Select the target micro to be burned. In this case, an atmega644p or an 1284p in Tools->Board->Atmel
After a while the console will (hopefully) display a "Done burning bootloader" message.
This is the circuit. Note that it has less connections than the previous one. You can make a connector for the host board that is easy to connect to the breadboard or
circuit where you have the target microcontroller, as you will be uploading sketches a lot of times.
I'm doing the classic test of blinking a LED. You will need a 330 ohm resistor, and a LED. And for the reset: a switch and a 10 KOhm resistor. The reset is
optioinal, though: you can connect directly the RESET pins on both boards, and use the reset switch on the Duemilanove to reset the microcontroller before
uploading the sketch.
http://wiki.wiring.co/wiki/Creating_your_own_Wiring_board_with_a_DIP_atmega1284p_using_Duemilanove 3/6
14/04/2018 Creating your own Wiring board with a DIP atmega1284p using Duemilanove - Wiring
Duemilanove atmega1284p
0 (RX) 14 (RX)
1 (TX) 15 (TX)
Vcc (5V) pins 10 and 30 (Vcc)
GND (0 V) pins 11 and 31 (GND)
http://wiki.wiring.co/wiki/Creating_your_own_Wiring_board_with_a_DIP_atmega1284p_using_Duemilanove 4/6
14/04/2018 Creating your own Wiring board with a DIP atmega1284p using Duemilanove - Wiring
2 - Edit the pin used to control the LED. In this case, change the line "int ledPin = 8;" by "int ledPin = 15;". The pin 15 as defined by Wiring is the pin 29 in the
DIP chip.
4 - compile and upload the sketch, you will have to push the reset button just at the same time.
Here is the correspondence between physical pins of the microcontroller (either atmega644p or atmega1284p) and the numbering of the pins in Wiring for this
chip. Note that the analog pins have pin number as well as A + number (i.e. A0 to A7). Also the pins that can output PWM signal are marked.
http://wiki.wiring.co/wiki/Creating_your_own_Wiring_board_with_a_DIP_atmega1284p_using_Duemilanove 5/6
14/04/2018 Creating your own Wiring board with a DIP atmega1284p using Duemilanove - Wiring
17 2
18 3
19 4 PWM
20 5 PWM
21 6
22 7
23 8
24 A0 40
25 A1 39
26 A2 38
27 A3 37
28 A4 36
29 A5 35
30 A6 34
31 A7 33
http://wiki.wiring.co/wiki/Creating_your_own_Wiring_board_with_a_DIP_atmega1284p_using_Duemilanove 6/6