Introduction: Burning Arduino Bootloader to Atmega 32A-PU Using Arduino As ISP
To burn the bootloader onto this chip I used Mighty Core; this is an Arduino core for non Arduino AVR microcontrollers. So head over to the site below and install Mighty Core onto your computer, there are also instructions on how to install this -> https://github.com/MCUdude/MightyCore
With a bit of work I got this to function like an Arduino
Step 1: Materials
Things you'll need:
1) 1 Arduino Uno
2) A breadboard
3) LED(This is optional, only necessary if you want to test out a sketch)
4) 220 ohm resistor
4) Male to Male Jumper Wires
5) 16 MHz Crystal Oscillator
6) And obviously the Atmega 32A microcontroller
Step 2: Setting Your Arduino As ISP
We need to tell our Arduino that whatever that it is sending is not for it but for another micro controller. To do this is we need to set the Arduino as an ISP(in-system programmer)
1) Plug the Arduino into your computer USB port
3) Open the Arduino IDE
2) Ensure that Arduino Uno/Genuino is selected from Tools > Board
3) Open up the ArduinoISP sketch from File>Examples
4) Then hit the upload button
The uploading may take a while, once finished close the IDE and disconnect the Arduino from your computer
Step 3: Preparing the Hardware
First put the microcontroller on the breadboard(ensure that all the pins are inserted properly) and look at the pinouts of the chip above and use jumper wires to connect to arduino as required
Notes:
- Connect pins 10 and 30 on IC to 5V on Arduino
- Connect pins 11 and 31 to Ground on Arduino
- Connect 16 MHz crystal to pins 12 and 13 on IC
- Connect pin 6 on IC to pin 11 on Arduino (MOSI)
- Connect pin 7 on IC to pin 12 on Arduino (MISO)
-Connect pin 8 on IC to pin 13 on Arduino (SCK)
-Connect pin 9 on IC to pin 10 on Arduino
Step 4: Burning the Bootloader!
Once all the connections between the chip and Arduino are set up. Plug the Arduino to your computer and open up the IDE.
There:
1) Select Atmega 32 from Tools>Boards
2) Select Arduino as ISP from Tools>Programmer
3) Finally click Burn Bootloader from Tools
This should take about a minute or less.
Step 5: Uploading a Blink Sketch
Look at the pin outs above. As you may notice, this chip has a different pin layout than your usual Arduino.
Connect an LED to pin 18(corresponds to pin 13 on arduino board) and upload the standard blink sketch from File>Examples.
Hope you liked this tutorial!
23 Comments
Question 3 years ago on Step 4
I've taken all of these steps but don't see ATMega32 on the list of boards when I reconnect the UNO and fire up Arduino IDE. What might I be doing wrong?
Answer 2 years ago
you need to edit the boards.txt so Arduino IDE is compatible with ATMEGA32, check these:
https://www.instructables.com/Programming-ATMEGA32-or-Any-Other-AVR-Using-Arduin/
https://www.instructables.com/Using-Atmega32-with-Arduino-IDE/
Reply 12 months ago
That page does not even exist. i`ve tried the link. What do i do now?
2 years ago
hi.
even though i did everything right,
When I upload the arduino ısp file it gives the following error:
Could not find tool avrdude.
2 years ago
The arduino pin 13 is actually pin 19, not pin 18!
Question 3 years ago
Great post ! I have a question.
When are you using mighty core?
Or why do you mention mighty core?
It is not clear at all.
Hope you can help me :)
Answer 2 years ago
I think he just didn't post the pictures and instead posted pictiures of the Arduino UNO board
Question 3 years ago on Step 4
Hey, I have successfully uploaded the blink code example but the led isn't lighting up. What could be the issue ?
Answer 2 years ago
you need to make sure the clock speed is correct with the crystal you're using, or if you're using the internal clock, make sure everything matches. If you got that right, maybe it's your protoboard wiring
3 years ago
Sir thanks
all your tutorial improving this tutorial is also good but earthing is good i done Burn Bootloader after bootload i can't upload the program some time is upload to ardino uno or coming error pleas help to after bootload programing process pleas
Question 4 years ago
i did everything as mentioned above.bootloading was success.but when i tried to upload blink sketch to the Atmega32 following error occurs.plz help me.
Expected signature for ATmega32 is 1E 95 02
Double check chip, or use -F to override this check.
Wrong microcontroller found. Did you select the right board from the Tools > Board menu?
Answer 3 years ago
It suggest you loaded the wrong bootloader
Reply 3 years ago
Or have wrong chip
4 years ago
"efuse" memory type not defined for part "ATmega32"
Error while burning bootloader.
Reply 3 years ago
Wrong bootloader or wrong chip
5 years ago
blink sketch is compiling (no error) but when uploading am getting this error while uploading
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x1c
An error occurred while uploading the sketch
Reply 5 years ago
any one have idea to solve tz problem
Reply 3 years ago
Are you pressing the reset on time?
4 years ago
"efuse" memory type not defined for part "ATmega32"
Önyükleyici yazdırılırken hata oluştu.
5 years ago
When i try to upload a program to the chip it always says it's not in sync please help.