[Icc-avr] 32 KHZ Crystal problem, solved I think

Patrick Fletcher-Jones fletcherjones at worldonline.co.uk
Thu Aug 14 06:56:20 PDT 2008


Hi, Patrick Again the guy who had the crystal problems.

I¹ve used the 32 KHz crystal connected in async mode on many of the Atmel
processors, mainly Mega 8, 103 & 128 (all PCBs). Never having  a problem at
all.

It was only when we moved to using the mega 1280, upgrade in design from a
128 that these problems arose.

We have produced many pcbs using the the mega 1280 and they have all had the
same problem, with the 32 khz crystal not working so great.

Basically some boards would not oscillate at all, other would be the wrong
frequency and a few would work ok.

On all the boards the crystals have been at max 2mm from the processor,
protected with ground planes etc..

Since we have fitted 22pF caps to ground on the 32 KHz crystal we¹ve not had
a single problem. I¹ve read all the Atmel data sheets and not one of them
that I can find says you need to add caps to the 32 KHz crystal

We have spent months on and off with this problem, so I¹m just hoping our
experiences may well save someone else from from pulling their hair out just
as I ended up doing many times.

VBR,
Patrick


On 14/08/2008 14:28, "Paul Mateer" <paul.aa9gg at gmail.com> wrote:

> Whenever we use a crystal we always include 22pF caps from the xtal leads to
> ground.  Never had a problem.
> 
> 73 de Paul, AA9GG
> 
> 
> On Thu, Aug 14, 2008 at 1:45 AM, Bengt Ragnemalm <benra at imt.liu.se> wrote:
>> Sorry for lat answer but I couldn't resist.
>> 
>> Loading capacitors to crystal is a never ending story on AVR freaks among
>> others. But actually there is nothing like "trying with xxx values". Every
>> crystal you buy has a predefined value of the loading capacitors and this is
>> the one and only value you should use. There are exceptions though. First,
>> sometimes the datasheet of for example the AVR may say that loading caps are
>> not necessary. Ok, fine, I guess that must be correct so do not use any in
>> this case. Sometimes the board (if not using a PCB) may introduce so much
>> extra capacitance that you need to reduce the typical value.
>> 
>> This should be no big source for problems if you just follow the datasheet
>> of the crystal and the AVR.
>> 
>> /Bengt
>> 
>>> > -----Ursprungligt meddelande-----
>>> > Från: icc-avr-bounces at imagecraft.com [mailto:icc-avr-
>>> > bounces at imagecraft.com] För Patrick Fletcher-Jones
>>> > Skickat: den 31 juli 2008 11:05
>>> > Till: Discussion list for ICCAVR and ICCtiny Users. You do NOT need
>>> > tosubscribe to icc-announce if you are a member of this.
>>> > Kopia: Paul Mooney; Tom Byrne; Martin Pearce
>>> > Ämne: [Icc-avr] 32 KHZ Crystal problem, solved I think
>>> >
>>> > Morning all,
>>> >
>>> > As some of you are aware I've had a nightmare with the 32KHz crystal
>>> > oscillator connected to timer 2 on a mega 1280 (running at either 3.3V or
>>> > 5V)
>>> >
>>> > There is / was a bug in the apps builder which set the prescaler bits
>>> > wrong
>>> > which I fixed by manually. Even after that my nice little 32 kHz crystal
>>> > was
>>> > running at 192KHz, not good when trying to run a timer.
>>> >
>>> > After tons of playing around, trawling the AVRfreaks news groups, trying
>>> > different crystals etc.. I have found that you really need to add a 22pF
>>> > cap
>>> > on each side of the crystal to ground. Once I did this it runs fine, take
>>> > the caps off it stops working.
>>> >
>>> > I've now changed my circuit diagrams to include these caps.
>>> >
>>> > I am going to try a 6pF crystal, because years ago I had a similar problem
>>> > with a Dallas RTCC that only worked with a 6pF crystal and crystals
>>> > (correct
>>> > me if I'm wrong) are normally 12.5pF
>>> >
>>> > Anyway its taken me ages to fix this problem and a lot of stress (unhappy
>>> > customer, well they are being ok really, its just very late) so I just
>>> > wanted to share this with you guys and hope it saves someone else a lot of
>>> > trouble.
>>> >
>>> > Patrick
>>> >
>>> >
>>> > _______________________________________________
>>> > Icc-avr mailing list
>>> > Icc-avr at imagecraft.com
>>> > http://dragonsgate.net/mailman/listinfo/icc-avr
>> 
>> 
>> _______________________________________________
>> Icc-avr mailing list
>> Icc-avr at imagecraft.com
>> http://dragonsgate.net/mailman/listinfo/icc-avr
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080814/7e52a030/attachment-0001.html


More information about the Icc-avr mailing list