ATmega32 External Clock Not Working

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have an ATmega32 which I'd like to use with a 16 MHz crystal clock oscillator. I didn't have a problem until I set the low fuse from 0xE1 (internal 1 MHz) to 0xE0 (external). Then I connected a 16 MHz clock oscillator between XTAL1(12) and XTAL2(13) and two 22 pF capacitors between ground and those pins. This setup has worked for me before every time but this time it didn't work. I got the classical bad connection error on the USBASP. Then I set an ATmega8A with the clock and connected its clock signal output (connected to XTAL1) to the XTAL1 of the ATmega32. And it worked! So I'm assuming that the oscillator's amplifier circuit is broken or is it the fuses? Please let me know if you've ever had such a problem with similar AVRs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tunahankaratay wrote:
Then I connected a 16 MHz clock oscillator between XTAL1(12) and XTAL2(13) and two 22 pF capacitors between ground and those pins.

 

There is a difference between an oscillator and a crystal. An oscillator module has only one output and the 22pF are not needed. If you have connected a crystal, be sure to set the fuses for an external crystal not oscillator.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It says External Clock; Start-up Time 6 CK + 64 ms; so I guess it is a crystal? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Clock != Crystal

 

If it's a little metal can with 2 legs it's almost certainly a "crystal".

 

You can use the mega8 to repair the damage - while it provides the clock do ISP again to either put things back to the way they started or to go direct to the CKSEL choice for "crystal" nor "external clock".

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


tunahankaratay wrote:
Then I connected a 16 MHz clock oscillator between XTAL1(12) and XTAL2(13) and two 22 pF capacitors between ground and those pins.

External xtal:

or external clock:

Which are you really using?

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is there any way to use the crystal oscillator configuration for ATmega32? Or do I use the classical single transistor amp circuit?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ohh I see. I didn't see that the list on the fuse calculator goes down. smh. Which one should I choose? High or the medium frequency?

 

Last Edited: Tue. Jun 25, 2019 - 12:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Choose 8-16MHz xtal.

 

But the important lesson is:

 

crystal has 2 pins

ceramic resonator has 3 pins

clock module has 4 pins (sometimes 6 pins)

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

crystal has 2 pins  and needs two 18pf caps

ceramic resonator has 3 pins  the caps are built in, so none are needed

clock module has 4 pins (sometimes 6 pins) no caps, but module needs vcc/gnd

 

bold notes added.

 

Jim

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks. I absolutely know what's going on with those. I only got confused when I saw the External Clock option and I didn't understand that they meant a complete oscillator circuit. I think this will be helpful the others who are in confusion too.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is such a common problem. Probably averages one a week or more, through the year. Big surge when university projects are due!

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net