Easy-to-grasp, step-by-step tutorials for creating firmware for the AVR family of microprocessors.
![]() |
![]() |
![]() |
|---|---|---|
| Breadboard | Microprocessor | BusPirate |
- Breadboard/prototyping board and power supply. These are usually sold together.
- Atmel (now Microchip) AVR processor. I use the ATmega88, but others will work fine. Older or second-hand ones are usually cheaper and plentiful. Optionally, also pick up a chip socket. If you need to remove the chip later, and the socket's pins are broken, it's not as big a deal to replace the socket.
- The processor's datasheet. These are readily available on Microchip's site; either go to the site and search, or simply type e.g. "ATmega88 datasheet" into your search engine of choice. This is the spec you'll work with to find out how to work with the chip, which pins are for what, etc. There are also application notes on how to do common tasks, such as read keyboard input or how to optimize C code for AVR use.
- Programmer (I use BusPirate and AVRDUDE. There are other ways of getting a binary onto a chip, including DIY circuits.
- Jumper wires.
All of these are cheap and easy to find. AVRDUDE is free from the above link.
- Attach the power supply to the breadboard.
- If adjustable, set the voltage on the breadboard to 3.3 V.
- Ground yourself by touching anything metal. Preferably, use a grounding strap attached to your wrist or workspace. The microscopic components within a microchip can be destroyed by static discharges.
- Check that the pins on the microchip are straight. If any are bent, carefully straighten them.
- Ease the chip's pins into the holes near the middle of the breadboard, such that the chip is straddling the channel
bisecting the breadboard lengthwise. Gently press the chip down until its bottom touches the breadboard.

- Find the pinout diagram in the chip's datasheet (make sure you're looking at the right chip format and number) and look for the two power pins: VCC (+) and GND (-). There are probably a couple of pairs depending on the chip you're using. The GND you use doesn't matter, and there will probably be one on each side to make life easier. Be sure you don't use AVCC for the (+); this is used for the analog-to-digital conversion functionality of some chips. For the ATmega 88, Pin 7 is VCC, and Pin 8 is GND. Use jumper wires to connect these to (+) and (-) on the power supply rails, respectively.
- Use jumper wires to connect BusPirate to the appropriate pins on the chip. For the ATmega88, these are:
| BusPirate | Chip name | ATmega88 pin |
|---|---|---|
| GND | GND | 8 |
| 3V3 | VCC | 7 |
| CLK | SCK | 19 |
| CS | RESET | 1 |
| MOSI | MOSI | 17 |
| MISO | MISO | 18 |
- Connect BusPirate to the computer with a USB cable.
- Download and install AVRDUDE. For best results, boot into your favorite flavor of Linux, and install it from your distribution's repository. (If you're not already running Linux, get out. Joking, of course. I can point you to myriad guides that will show you how to make a computer truly useful).
- Also install
binutils-avrandgcc-avrfrom your distro's repository. - Test the connection: open a Terminal, and as root enter:
avrdude -c buspirate -P /dev/ttyUSB0 -p m88p
There you go, your very own lab setup! Now it's time to move on to the next lesson (if not available yet, keep your eyes open)!
As always, please send questions, corrections, and/or snide remarks to xenloops at protonmail dot com.


