Breadboard Arduino Problems

I am trying to implement my arduino on a breadboard. I have tested my setup on the dev board that I used to program it and it worked.

Now I have used this as a guide:

to put my atmega328 on a breadboard. I don't have any of the caps or the indication diodes. I'm wondering if the caps are critical? They don't seem like they should be.

I have power to the correct pins and my chip is behaving erratically.

I have a 16Mhz oscillator and I'm reading 4.98VDC to VCC and AVCC. I have my grounds connected on the chip.

Do you have the two capacitors for the oscillator?

It is an ceramic package with internal caps. It's a three pin device.

If you are using ceramic resonator then you don't need the caps on pin 9 and 10.

Aye I am using a ceramic resonator and I'm not using any of the caps. :slight_smile:

I should just plug the outer two pins of the resonator into pins 9 and 10. Then the middle pin goes to ground correct?

Are you working with just the processor or do you have other electronics (LEDs, servos) involved?

I have some other electronics involved.
HOWEVER; I have tested them with the Duemilanove development board and they worked fine.
Everything falls apart when I try to put the ATMega328 on the breadboard instead.

I've had very good results from following the breadboard writeup at the following site:

http://www.imagearts.ryerson.ca/sdaniels/physcomp/tutorials/Arduino_standalone/ard_hack.html

Its always good to start with the basic blinking LED sketch too, just to make sure the breadboard setup works before getting too ambitious with additional components.

I don't have any of the caps or the indication diodes. I'm wondering if the caps are critical? They don't seem like they should be.

I have power to the correct pins and my chip is behaving erratically.

Decoupling capacitors are a must for any, repeat any digital circuitry.

Oh and the voltage regulator may well need its decoupling capacitors to prevent oscillation. You've probably made a low power radio transmitter :wink:

This is of note and should be made into a sticky: the 328 has internal caps on the clock inputs.
It works with a a 16mhz crystal installed between the two pins. There is no need for caps and a ceramic oscillator doesn't work.

the 328 has internal caps on the clock inputs.

Why do you say this? the data sheet shows external capacitors (page 29)
and on the same page give start up data for ceramic resonators.

I use capacitors on 328 stand alone systems without problems.

Am I missing something?

This is of note and should be made into a sticky: the 328 has internal caps on the clock inputs.
It works with a a 16mhz crystal installed between the two pins. There is no need for caps and a ceramic oscillator doesn't work.

While you may have got yours to work, we shouldn't let this statement stand for others to use in the future, let alone make it a sticky.

  1. While the 328 AVR pins 9 & 10 each do exhibit some amount of capacitance to ground, it is not generally enough to let crystals work accurately at their specified frequency, and may cause fail to start up or sluggish starting. Even if a crystal will oscillate without using external padding caps, accuracy will suffer somewhat without the use of external padding caps such that the total capacitance (internal + external) are what the crystal was specified to work with.

  2. Three pin ceramic resonators do work with the 328 processor, and yes they have internal padding capacitors wired from the outside pins to the middle pins, just be sure to ground the middle pin. I have at least two 328 processors using ceramic resonators and they work just fine, they just don't quite have the accuracy of a crystal resonator, but in most cases that is not an important issue.

Lefty

I have 4x 328s here.
I can't get ANY of them to work with a three pin resonator or a crystal with two caps.

They only work when I have the two pin crystal plugged in.

If other people have other results, I can't explain the phenomena

I have 4x 328s here.
I can't get ANY of them to work with a three pin resonator or a crystal with two caps.

They only work when I have the two pin crystal plugged in.

If other people have other results, I can't explain the phenomena

It's possible the fuse settings for your 328 chips are set such as not to be proper for the standard oscillator settings. Check out an AVR datasheet for the fuse options offered for oscillator function and if you have the means to read your fuse settings, see if it is set up correctly.

The standard fuse setting for an Aduino 328 are:

low_fuses=0xFF
high_fuses=0xDA
extended_fuses=0x05

Lefty

If you are mounting then in a breadboard, the board itself may have enought capacitance to let the cristal work properly, but when you add the caps it as too much and can't work, using high clock signals in a breadboard is always asking for troubles.

I moved the chip to a PCB and had the same effect.
I mean... It's not a problem for me because it's working just fine. I just wish I new why. :slight_smile:

I have tested my setup on the dev board that I used to program it and it worked.

What dev board did you use to program it?

Are the 4 328's you tried from a regular Arduino board, or did you just buy them as parts? Maybe the chips don't have the Arduino bootloader / fuses set and instead is operating off the internal 1MHz oscillator?

No i used the standard arduino dev board to program them. IF they were programmed to run off of the internal clock, adding an external ceramic oscillator wouldn't make them malfunction anyways right?

It really seems to be an odd situation as right now I feel like my reality is not congruent with everyone else's...