ATMega64A fails to start with cheap crystal

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

Recently ordered a bunch of cheap 16MHz crystals from china . Now I am observing following problem: about a half of those crystals won't launch ATMega64A, supplied by 3.3v with HFUSE set to 0xD9.  Even if MCU starts, the oscillation seems to be unstable. To make it work properly, I was forced to enable CKOPT, thus set HFUSE to 0xC9. Crystal is connected to MCU with short, symmetrical traces. Two 27 pF load caps are placed close to crystal pins. Reducing/increasing load caps makes no effect. Replacing those no-name crystal with Geyer KX-3 did the trick - MCU start even without CKOPT  enabled (HFUSE = 0xD9). Cant figure out why is that happening, because ATMega328p starts pretty good with the same chinese crystal, load caps and pretty similar board layout. Can anyone tell me, is it OK to run MCU with CKOPT fuse enabled, or should expect any problems?

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

Um. Don't buy any more of those crystals.

274,207,281-1 The largest known Mersenne Prime

In that awkward stage between preschool and death

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

Sounds like those crystals are marginal. You gets what you pays for! Electronic parts have a production tolerance - generally the tolerance is such that everything should work assuming a good design. Once you start getting parts out of tolerance, then it might work if you're lucky and the voltage/temperature etc are 'right' or any other number of combinations.

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

Vadym.Mishchuk wrote:
supplied by 3.3v with HFUSE set to 0xD9.
Surely D9 is wrong? For crystals 8MHz and above you MUST enable CKOPT so that would be C9 not D9.
Vadym.Mishchuk wrote:
To make it work properly, I was forced to enable CKOPT, thus set HFUSE to 0xC9.
Oops, I should have read on before I looked that up. Well, yeah, for 8MHz+ you *MUST* enable CKOPT. It switches the crystal oscillator into higher power, "full swing" mode. That is required to get fast crystals to resonate.

 

What on earth made you think you could use 16MHz without CKOPT? And what is your reluctance to use CKOPT? Is this about the power consumption (but if that were the case why would you be using an ancient design like mega64?)?

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

clawson wrote:
What on earth made you think you could use 16MHz without CKOPT?

Maybe absence of mind: on all my boards, I've previously built Geyer 16 MHz crystals worked nicely without CKOPT (those devices were tested for month). Looks like I missed something, when reading docs.

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

Vadym.Mishchuk wrote:
Looks like I missed something, when reading docs.
It does indeed....

 

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

clawson wrote:
Well, yeah, for 8MHz+ you *MUST* enable CKOPT. It switches the crystal oscillator into higher power, "full swing" mode. That is required to get fast crystals to resonate.

"For resonators, the maximum frequency..."

No mention of "crystals" in that paragraph.

 

But indeed, CKOPT always [for us at least] if the app can stand the extra power draw.

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

I have a sneaking suspicion that is a documentation error in this ancient old document as I am pretty sure that later models with CKOPT made the point clearer.

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

You should stop overclocking  your chips!

 

 ATMega64A need 4.5 V for 16MHz

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

about a half of those crystals won't launch ATMega64A, supplied by 3.3v

In fact it's an accident that ANY worked at 3.3V as sparrow2 above is hinting at.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly