Introduction: True Atmega Standalone, Running Without Crystal Oscillator (Arduino)
I recently ordered a bunch of Atmel Atmega chips, 328 to be precise and as soon as i got them i realised i was lacking some very important components to make these chips function. The 16mhz crystal and the two 22pf capacitors to accompany it. From previous knowledge of the Atmel chips i knew some of them contained internal clocks, i hoped that the atmega did to. After some research i found it was possible to run an atmega completely on its own, save power and a sketch of course.
This instructable will inform you how to run any atmegaxx8 series chip on its own.
Requirements:
Arduino
Atmegaxx8 (doesnt matter which one but i prefer the 328)
Breadboard (circuit on bottom left is irrelevant)
Jumpers
Computer
USB Cable
USB-FTDI/USB-TTL (optional)
LED and resistor (optional)
Step 1: Breadboard
The breadboard setup is fairly simple and requires minimal components, none at all.
I have included a resistor on pin 14 or digital pin 8, purely to test my chip.
Step 2: Computer Setup
The computer side of things consists of a few easy steps but many people seem to get the wrong folders, make sure you are sure.
STEP 1.
Download the bootloader files from here.
STEP 2.
Go to wherever your arduino sketchbook is and create a new subfolder titled 'hardware'.
STEP 3.
Extract the downloaded file Breadboard.zip into the new hardware folder you created.
STEP 4.
Restart/start you arduino programming environment and you should see in tools-boards a new entry called arduino on breadboard
Step 3: Computer-Arduino Setup
Make sure to plug in your Arduino with the breadboard setup and have the ide running when doing these steps.
STEP 1.
Under boards select the new arduino on breadboard entry.
STEP 2.
Under programmers set it to arduino as isp
STEP 3.
Under examples you will find an example called 'arduino isp' upload to your board.
STEP 4.
Under tools click burn bootloader, this can take a few minutes so dont think its not working.
When this is all complete, you should have a chip that can function like a normal arduino but without the clock.
Step 4: Uploading Sketches
There are two ways of doing this, either with an Arduino or a USB breakout board type thing.
The Arduino way is detailed in the image.
The USB way is to connect TX to RX and RX to TX between the chip and your breakout board and just upload from there.
This is where you may want and LED, just to test its working.
I also like to print out a sticker for the chip so i know which pins are which, if the one below doesn't work inbox me and ill fix it.

Participated in the
123D Circuits Contest
83 Comments
1 year ago
Hi,
thank's for this great information - I've got it running with the DIP-housing. Does this also work for the ATMega328p AU - the SMD version <=> IDE-Boardmanager - has anybody experience?
Question 2 years ago
I could not understand so far that can a microcontroller (AVR ATTiny,ATmega,XMega) be used with sketch only and no bootloader?
Answer 2 years ago
Thats not what this tutorial is covering but yes you can run an AVR 8 bit micro without a bootloader by flashing a .hex file directly
Reply 2 years ago
Thanks AlistairM
I am new in Microcontroller Programming so this was the question in my mind,
but well I am a Software Engineer and so I have in mind that this will be possible.
Thanks once again.
Regards
Question 2 years ago on Step 1
in the circuit diagram you have not mensioned resistor and led
Answer 2 years ago
That's because it isnt relevant to flashing the bootloader onto the Atmega328p, as such, it is listed as optional and not included in the circuit diagram.
Question 5 years ago
will this work on 1.8.5?
5 years ago
Thanks
I can use xtl1 xtl2 output or input?
6 years ago
Hello, I was wondering if this would work for an atmega168-PU. I tried, but when I got to the burn bootloader step, it gave me an error. The error was:
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
Is there something in the file I need to change?
Reply 6 years ago
Well I've never worked with the 168-PU but my guess is you need to edit the bootloader file to match the specs of the 168, seeing as it is slightly different to the 328. I'm sorry i cannot help much more than that I'm afraid.
Reply 6 years ago
The 168 and 328 use the same bootloader:
ATmegaBOOT_168_atmega328_pro_8MHz.hex
I believe vanofham's problem was in the coding:
avrdude -m328p
should be something like (for the 168):
avrdude -m168
;)
6 years ago
Just a heads up... I discovered a missing line in the linked board file (boards.txt inside Breadboard.zip). I added this line to the file and now I'm happily uploading to my 328p chips with IDE 1.6.8:
atmega328bb.upload.maximum_data_size=2048
Hopefully others may read this and avoid the hours of headache I went through troubleshooting serial upload errors. Regardless, thanks to the OP for sharing... this instructible taught me how to do custom boards with the new IDE (I was using 1.0.5 for custom boards until your I read this LOL... so much easier now THANKS!).
6 years ago
Can I use any sketch unloaded atmega328 through breadboard without arduino? How can I do that ? How can I power the microcontroller? Which pin?
6 years ago
is this work with atmgea8????
please reply
7 years ago
Hi,
i'm using an ATmega328 with its internal 8MHz clock for my project.
While bootloading there was a signature mismatch error.I just changed the sinature in the avrdude.conf file and overcame that error.
Now the chip is working perfectly ,and i can program it using a FTDI breakout.
but the problem is i cant receive or transmit nothing using the serial monitor.
can this be the problem in baud rate mismatch?
please help,i cant do myproject without serial monitor
8 years ago on Introduction
Actually there is a much simpler way to program a stand alone AVR using an Arduino board. Read this tutorial:
"Arduino Uno R3 as a true ISP programmer for any Attiny and Atmega AVR"
see:
No hardware removal is needed. No boot-loader has to be first loaded in your target AVR. You can simply program the Attiny or Atmega micro-controllers, existent on the breadboard, directly with the hex file generated from the source code you wrote (Blink a led, for example).
Reply 7 years ago
indeed, this is simple and less hassle, tried on 16MHz standalone, going to try on 8MHz now
Reply 7 years ago
indeed, this is simple and less hassle, tried on 16MHz standalone, going to try on 8MHz now
Reply 7 years ago
indeed, this is simple and less hassle, tried on 16MHz standalone, going to try on 8MHz now
Reply 8 years ago
the idea here is to have an atmega that can be programmed easily from the arduino ide, using no external parts.