Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Mega162 crystal osc problem / CKOPT bit

Mega162 crystal osc problem / CKOPT bit

2006-10-17 by Tim Mitchell

I'm having an oscillator problem with a Mega162 device ... Dunno if
anyone has seen it before and might have some advice.

I've got 4 identical units with Mega162, 16MHz xtal with 15pf
capacitors. One of them will not start up on power up (no oscillator)
but the others are fine. If I reprogram the chip in the non-working one,
it then works fine for the rest of the day, power on and off as much as
you like, but the next morning when I come in, it does not work again.

Now I've had this situation before with some units using the Mega8, and
it turned out to be because I had not set the CKOPT fuse bit on the
Mega8. This changes the mode of the oscillator to give larger
oscillations. With CKOPT unprogrammed, they mostly worked but the odd
one failed to start on first power up as described above. With CKOPT
programmed everything was fine.

Unfortunately the Mega162 does not seem to have a CKOPT bit - any ideas
what I can do to the oscillator circuit to make it work reliably?

-- 
Tim Mitchell
tim@sabretechnology.co.uk
http://www.sabretechnology.co.uk

Re: [AVR-Chat] Mega162 crystal osc problem / CKOPT bit

2006-10-17 by Leon Heller

----- Original Message ----- 
Show quoted textHide quoted text
From: "Tim Mitchell" <tim@sabretechnology.co.uk>
To: <AVR-Chat@yahoogroups.com>
Sent: Tuesday, October 17, 2006 9:22 AM
Subject: [AVR-Chat] Mega162 crystal osc problem / CKOPT bit


> I'm having an oscillator problem with a Mega162 device ... Dunno if
> anyone has seen it before and might have some advice.
> 
> I've got 4 identical units with Mega162, 16MHz xtal with 15pf
> capacitors. One of them will not start up on power up (no oscillator)
> but the others are fine. If I reprogram the chip in the non-working one,
> it then works fine for the rest of the day, power on and off as much as
> you like, but the next morning when I come in, it does not work again.
> 
> Now I've had this situation before with some units using the Mega8, and
> it turned out to be because I had not set the CKOPT fuse bit on the
> Mega8. This changes the mode of the oscillator to give larger
> oscillations. With CKOPT unprogrammed, they mostly worked but the odd
> one failed to start on first power up as described above. With CKOPT
> programmed everything was fine.
> 
> Unfortunately the Mega162 does not seem to have a CKOPT bit - any ideas
> what I can do to the oscillator circuit to make it work reliably?

I'd try using changing the crystal and the capacitors.

Leon

Re: [AVR-Chat] Mega162 crystal osc problem / CKOPT bit

2006-10-17 by Mike Harrison

On Tue, 17 Oct 2006 11:29:21 +0100, you wrote:

>----- Original Message ----- 
>From: "Tim Mitchell" <tim@sabretechnology.co.uk>
>To: <AVR-Chat@yahoogroups.com>
>Sent: Tuesday, October 17, 2006 9:22 AM
>Subject: [AVR-Chat] Mega162 crystal osc problem / CKOPT bit
>
>
>> I'm having an oscillator problem with a Mega162 device ... Dunno if
>> anyone has seen it before and might have some advice.
>> 
>> I've got 4 identical units with Mega162, 16MHz xtal with 15pf
>> capacitors. One of them will not start up on power up (no oscillator)
>> but the others are fine. If I reprogram the chip in the non-working one,
>> it then works fine for the rest of the day, power on and off as much as
>> you like, but the next morning when I come in, it does not work again.
>> 
>> Now I've had this situation before with some units using the Mega8, and
>> it turned out to be because I had not set the CKOPT fuse bit on the
>> Mega8. This changes the mode of the oscillator to give larger
>> oscillations. With CKOPT unprogrammed, they mostly worked but the odd
>> one failed to start on first power up as described above. With CKOPT
>> programmed everything was fine.
>> 
>> Unfortunately the Mega162 does not seem to have a CKOPT bit - any ideas
>> what I can do to the oscillator circuit to make it work reliably?
>
>I'd try using changing the crystal and the capacitors.

A handy tip for checking the health of a xtal osc is to look at each side with a low-capacitance
scope probe (e.g. a x100, or a 10M R in series with a x10 probe). The signal on each side should be
a similar amplitude if the oscillator is happy. If they are signiifcantly different, something is
marginal. 

I've also seen poor startup caused by too much  capacitance between the pins due to bad PCB layout.
A last-ditch fix to startup problems can sometimes be to put a megohm or two across the xtal.

Re: [AVR-Chat] Mega162 crystal osc problem / CKOPT bit

2006-10-17 by David VanHorn

Those cap values are awfully small.
What value does the crystal spec say you should have for load capaacitance?
Take that value, double it, and subtract about 5 pf.  Use that value for
both caps and try again.


[Non-text portions of this message have been removed]

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.