Pages: [1]   Go Down
Author Topic: Minimum hardware requirements 4 running ATMega328  (Read 472 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I plan to use my arduino Duemilanove to program the ATMega328 and use the chip on a reduced pcb. Aside from adding power and some capacitors, are there any other components needed for the chip to work?
Also, is the 16Mhz crysal needed for operation or is it only used for programming the chip?

-Eric
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you will need the crystal for normal operation unless you set the atmega fuses to work with internal oscillator
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5594
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
you will need the crystal for normal operation unless you set the atmega fuses to work with internal oscillator

I remember reading somewhere, also, that you need to set fuses differently if you are using an external crystal vs an external resonator, so you may want to check into that as well...
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For standard operation of an Atmel ATmega328 with the fuses as used in an Arduino, I would expect:
- 16 MHz crystal, 2x capacitors to make the crystal work
- 1x 100nF between Vcc-AVcc and GND, 1x 100nF between Aref and GND
- 10K resistor between  Reset and Vcc (+5V)

Yes, that ought to do it.

And keeping the crystal close to its two capacitors, will aid them work at their best.

Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5594
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I remember reading somewhere, also, that you need to set fuses differently if you are using an external crystal vs an external resonator, so you may want to check into that as well...

Starting on page 26 of the datasheet, "System Clock and Clock Options":

http://www.atmel.com/dyn/resources/prod_documents/doc8271.pdf

...details what to set fuse bits for various kinds of clocks, internal, external, crystal, or resonator. I seemed like the settings used for an external crystal or resonator were the same, whether you were using full swing or low power oscillation.

You would probably want to have this document handy if you were building a standalone implementation; I have a feeling that if you know the specs of your crystal, it would probably be fairly easy to figure out what size caps to use exactly. If you didn't have the specs to your crystal (and just "guessed" at the capacitor value - 22pF is a common choice, but you could try 18pF, 20pF, and 33pF), though, you might find that operation at low power might not work, versus "full swing" operation...?

I'm not really certain, to be honest; I just remember reading somewhere that fuse setting were different if you were using a crystal vs using a resonator, but maybe my memory is faulty, as it doesn't appear that the datasheet backs me up there...

 smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Simplest practical circuit is probably that of the RBBB which is helpfully in the public domain

http://www.moderndevice.com/products/rbbb-kit

I've never come across any differences needed between crystals and resonators. my personal experience is that I can swap chips between my homebrews (all with ceramic resonators) and my real and clone Duemilanoves with crystals entirely without issue. (Not entirely true, crystals are usually more accurate, but resonators are accurate enough to run without problems.)

Having experimented with using the internal oscillator, the extra cost / inconvenience of using a resonator is nothing against the problems caused by running it with a non standard, relatively unstable internal clock.
« Last Edit: June 27, 2010, 02:22:32 pm by stephen_t » Logged


Pages: [1]   Go Up
Jump to: