Bootload an ATmel ATmega88p with Arduino

The other day I was on Ebay looking for small microcontroller to put into my projects. I was looking for the cheapest, smallest (TQFP package), most bang for my buck microcontroller I could find. I came across this ATMega88P-20AU deal . Five for $11.45 or best offer. So I offered them $10 and two and a half weeks later my new ATMega88P-20AU chips arrived.

There was just ONE problem. I had no idea how to install the  bootloader and program it. So after a few hours of combing through sites looking to do this, I came across a couple that had some of what I needed, but not the full picture. So this post is to help walk you through how to install the  bootloader, and run your program on a ATMega88P-20AU (TQFP package) size shouldn’t matter in this case 😉

MATERIALS NEED:

  • ATmega88p (obviously)
  • jumper wire
  • SMT break out board (I got mine at adafruit)
  • Arduino (I used an Arduino Uno R3)
  • Solderless Breadboard

THE SETUP

The first thing you need to do would be solder your microcontroller to your break out board. I’m not going to cover that here its pretty straight forward.

After you have that complete, you will need to connect your ATmega88p to your UNO as follows:
UNO 5v –> POWER on your breadboard
UNO GND –> GND on your breadboard
UNO pin 10 —> ATmega88p pin 29 (RESET)
UNO pin 11 —> ATmega88p pin 15 (MOSI)
UNO pin 12 —> ATmega88p pin 16 (MISO)
UNO pin 13 —> ATmega88p pin 17 (SCK)

BreadBoard 5v —> ATmega88p pin 4,6 (VCC)
BreadBoard GND —> ATmega88p pin 3,5,21 (GND)

THE SOFTWARE

The next we need to do is put the bootloader on this chip. To do this you will need to place the attached code in the following location. The default location on a MAC is /Users/[YOUR USER NAME]/Documents/Arduino/

If you did it correctly you will see the following folder stucture

ROOT in this case is /Users/[YOUR USER NAME]/Documents/Arduino/ your root could vary.

ROOT
|-- atmega88p
|    |-- boards.txt
|    |-- bootloaders
|    |    +-- optiboot
|    |-- cores
|    |    +-- atmega88p
|    |-- variants
|    |    +-- standard

ARDUINO

Now lets open up the Arduino programmer app.

You need to set up your arduino first in order to program by choosing the sketch ArduinoISP:  File > Examples > ArduinoISP

Make sure you have your Arduino board correctly choosen: Tools > Boards > Arduino UNO

Then make sure your programmer is set to Arduino as ISP: Tools > Programmer > Arduino as ISP

Then load the sketch to your Arduino <Command+U>

Once that is complete you  are ready to bootload your chip. Assuming everything is connected correctly choose your ATmega88p board from the Boards menu: Tools > Boards > ATMega88p

Then run the Burn Bootloader command: Tools > Burn Bootloader

You should see your Arduino’s lights flicker for a few seconds with no errors in the console and that’s it. You have bootloaded your ATmega88p chip. Now with this same set up you can put any program you like on that chip. Then disconnect the Arduino and you should see your program running with only power supplied to it.

PROJECT FILES

Loading Facebook Comments ...