True Atmega Standalone, Running Without Crystal Oscillator (Arduino)

117,043

143

77

About: I am a young electronics hobbyist, interested in computers, rapid prototyping and electronics.

Intro: 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.

Share

Recommendations

  • Audio Contest 2018

    Audio Contest 2018
  • Tiny Home Contest

    Tiny Home Contest
  • Furniture Contest 2018

    Furniture Contest 2018

77 Discussions

0
None
robotsaregood

Question 5 months ago

will this work on 1.8.5?

0
None
LiboAhmed

10 months ago

Thanks
I can use xtl1 xtl2 output or input?

0
None
vanofham

2 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?

2 replies
0
None
AlistairMvanofham

Reply 2 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.

0
None
trugloditeAlistairM

Reply 1 year 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

;)

0
None
truglodite

1 year 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!).

0
None
vikas vijayan

2 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?

0
None
monusuthar2016

2 years ago

is this work with atmgea8????
please reply

0
None
JEWELJ5

2 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

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).

5 replies
0
None
ArifSaevictor.valadez.547

Reply 2 years ago

indeed, this is simple and less hassle, tried on 16MHz standalone, going to try on 8MHz now

0
None
ArifSaevictor.valadez.547

Reply 2 years ago

indeed, this is simple and less hassle, tried on 16MHz standalone, going to try on 8MHz now

0
None
ArifSaevictor.valadez.547

Reply 2 years ago

indeed, this is simple and less hassle, tried on 16MHz standalone, going to try on 8MHz now

0
None
AlistairMvictor.valadez.547

Reply 3 years ago

the idea here is to have an atmega that can be programmed easily from the arduino ide, using no external parts.

The tutorial "Arduino Uno R3 as a true ISP programmer for any Attiny and Atmega AVR" is also valid for programming a stand alone AVR that uses its internal oscillator and has no external crystal and capacitors attached.

0
None
Axinarb

3 years ago on Introduction

hi, i have the 1.6.1 version. i get an error message:

Error while burning bootloader: missing 'bootloader.tool' configuration parameter

any ideas?

4 replies
0
None
ArifSaeAxinarb

Reply 2 years ago

check last part

https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard

0
None
aditya jindalAxinarb

Reply 3 years ago

I have the version 1.5.1. I also get the same error

0
None
AlistairMaditya jindal

Reply 3 years ago

The only solution I found was to revert to the older version. I know the arduino companies are having issues and software versions are doing funny things. I got exactly the same issue myself.

0
None

Until they have fixed it to work with the standard way of adding custom hardware to the arduino IDE here's what you can do:
1. Locate your arduino installation folder
2. Inside the hardware directory, find the boards.txt file. Mine (on Ubuntu) is at (/arduino-1.6.1/hardware/arduino/avr/)
3. Append the following at the end of the boards.txt file and it will work as instructed here. :)

##############################################################

atmega328bb.name=ATmega328 on a breadboard (8 MHz internal clock)

atmega328bb.upload.protocol=arduino
atmega328bb.upload.maximum_size=30720
atmega328bb.upload.maximum_data_size=2048
atmega328bb.upload.speed=57600

atmega328bb.bootloader.tool=arduino:avrdude
#atmega328bb.bootloader.tool=avrdude

atmega328bb.upload.tool=avrdude

atmega328bb.bootloader.low_fuses=0xE2
#atmega328bb.bootloader.low_fuses=0xFF
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x05

atmega328bb.bootloader.file=atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F

atmega328bb.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
#atmega328bb.build.core=arduino:arduino
atmega328bb.build.core=arduino
#atmega328bb.build.variant=arduino:standard
atmega328bb.build.variant=standard
###Experimental name:
atmega328bb.build.board=AVR_BARE

IMG_0376.JPG