Go Down

Topic: breadboard atmega 328 oscilator not working, Why??? (Read 2 times) previous topic - next topic

zigaRupret

hello I  just bought:

2x atmega 328P-PU
4x ceramic resonator
5x crystal oscillator
both 16MHz
and
100x 22pF capacitor
E6 resistor kit
(so if i got any of the components that were faulty i would have no problem replacing them)

I hooked up my breadboard exactly the way it said here (http://arduino.cc/en/Tutorial/ArduinoToBreadboard)
Ive checked all the posts i could find on google, forums, everywhere, i also find that lot of people had the same problem, tried their solutions, nothing worked.

First i tried hooking up resonator pin(9, 10) and middle pin to GND, i checked with oscilloscope and i couldn't get any oscillations out of it, i tried replacing 328 with another one, still nothing, i tried 4 different resonators nothing.
Than i hooked up crystal resonator with 22pF capacitors on pin 9 and 10, again looked at oscilloscope, still couldn't get any oscillations, i switched again chip, oscillator, capacitors, still no oscillations.
than i solder all the components on a protoboard the same way i hooked them up on breadboard, than i repeated the switching of components process all over again, still nothing.

Than i thought maybe my oscilloscope is broken ( getting desperate) , i calibrated the probes with 1kHz signal which i get from frequency generator on scope, and it worked fine.
than i thought maybe it is not fast enough. so i hooked it up to 24MHz clock signal which i have on atmel 8051 and i could see the signal nicely, so this is not the problem.

I find it hard to believe that all the components that i bought are faulty, so i must be missing something, but what?

johnwasser

Have you burned the Arduino bootloader?

A factory fresh ATmega chip uses the internal 8MHz oscillator and a /8 prescaler so it runs at 1MHz.  As part of the Arduino bootloader burning process the chip is re-configured to use the external crystal/resonator.  I don't think you will see the crystal being used until those configuration fuses are set.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

retrolefty

A couple of random thoughts.

First a scope probe on the oscillator pins can load down the oscillator circuit such that it doesn't display correctly or even prevent oscillation. I have tried to use my analog Tek scope with a x10 probe and only see about 1/2 volt peak-to-peak clock signals.

If your 328P chips are in factory blank condition then it's normally has it's internal fuse bits set such that the internal 8 mhz clock is enabled and it won't utilize any external clock components even if wired up. If you bought chips that have the bootloader preinstalled then the fuse settings should be proper for use with external 16Mhz crystal or resonator to work.

Using a hardware programmer and uploading the arduino bootloader code into the chip via the ICSP pins also sets the fuse bits to utilize an external 16mhz crystal or resonator.

Lefty

zigaRupret

#3
Mar 31, 2011, 05:33 pm Last Edit: Mar 31, 2011, 05:35 pm by zigaRupret Reason: 1
ok, i am trying  to burn the bootloader now, but am having different problems, which i have not investigated yet,

i am using a paralell programmer from (http://arduino.cc/en/Hacking/ParallelProgrammer?from=Main.ParallelProgrammer)

avrdude: AVR device not responding
avrdude: initialization failed, rc=-1
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
avrdude: AVR device not responding
***failed;  
avrdude: verification error, first mismatch at byte 0x0000
        0xd9 != 0xff
avrdude: verification error; content mismatch

johnwasser


I hooked up my breadboard exactly the way it said here (http://arduino.cc/en/Tutorial/ArduinoToBreadboard)


ok, i am trying  to burn the bootloader now, but am having different problems, which i have not investigated yet,
i am using a paralell programmer from (http://arduino.cc/en/Hacking/ParallelProgrammer?from=Main.ParallelProgrammer)


If you are connecting your breadboard to an Arduino running ArduinoISP, like in the first page, what are you doing with the Parallel Programmer?!?
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Go Up