Site Tools


misc:avr-programming

Standalone AVR Chip Prep w/ Arduino Bootloader

AVR Chips on the arduino uno come loaded with a bootloader to run the usb communication & arduino stdlib. This is how to go from a blank chip to a flashed chip.

Chip Initial Prep

Pin connections:

Atmega328P DIP Pinout
16MHz Crystal across PB6/PB7
connect 22pF bipolar caps from the crystal to ground:

                             GND
PB6 ----------|-------[22pF]--|
          [Crystal]           |
PB7 ----------|-------[22pF]--|

Pin R10k pullup to +5V
AVCC connected to +5V
also might be useful to have pwr indicator LED

Arduino as ISP Setup & Burning

  • Start by Loading File → Examples → 11.ArduinoISP → ArduinoISP
  • Connect seperate Arduino UNO board (hereafter called the programmer) to pc via usb.
  • Upload the ISP sketch to the programmer.
  • Install the MiniCore library and install the MiniCore boards
  • Wire the following connections from the programmer:
10 -> MOSI  (17)
11 -> MISO  (18)
12 -> SCK   (19)
13 -> RESET ( 1)
Arduino as ISP wiring diagram
  • Select the programmer method as Tools → Programmer → Arduino as ISP
  • Select the Atmega328 in Tools → Board and make sure the variant based on the chip you have.
  • Set the clock to 16MHz external (or whatever you are using).
  • Burn the bootloader with Tools → Burn Bootloader

Programming with ISP

From the ISP dongle, make the connections to the chip

ISP Pin Atmega Pin
VCC VCC
GND GND
MOSI MOSI (17)
MISO MISO (18)
SCK SCK (19)
RST RESET (1)

Then upload the code with Sketch → Upload using Programmer.

misc/avr-programming.txt · Last modified: by theorytoe