--- In AVR-Chat@yahoogroups.com, rakesh modi <get_rak20ec@...> wrote: > ... the problem is that my crystal > frequency is not stable everytime ... There's some confusion here about how to pick the load capacitors for a parallel reasonant crystal. It is certainly *not* true that "A higher value cap gives greater stability." I agree that "the crystal is dead or unconnected, and the oscillator is running on capacitance only" is worth investigating and that "Something is squirrely, that's for sure". David has described how to pick the load capacitors if a) the crystal is parallel reasonant (otherwise, the data sheet won't give a capacitance), b) 5 pF is a good estimate of the parasitic capacitance at each terminal (I don't think it is, according to the ATmega32 data sheet, the pins themselves can have up to 10 pF of capacitance) and c) you really, really care about the exact frequency to withing a hundred parts per million. A more pragmatic way to pick the load capacitors would suggest that 22 pF is just fine. To generate the bit rate for a UART, you only need to be close, not dead-on. Of course, 27 pF is just fine too. Which gets us back to the point that the frequency should not swing wildly due to this change in the load capacitors. Both should work and give a frequency within a few hundred p.p.m. of the rated frequency of the crystal. There is something very wrong here, such as a broken crystal or, in spite of what you say, wrong fuse settings. Graham.
Message
Re: Help for circuit design
2008-04-16 by Graham Davies
Attachments
- No local attachments were found for this message.