AVR Hardware Design Considerations [APPLICATION NOTE]
Atmel-2521M-AVR-Hardware-Design-Considerations_ApplicationNote_092014
13
4.4 Unbalanced External Capacitors
In noisy environments the oscillator can be affected crucially by the noise. If the noise is strong enough the
oscillator can “lock up” and stop oscillating. To make the oscillator less sensitive to noise the size of the capacitor
at the high impedance input of the oscillator circuit, XTAL1 can be increased slightly. Increasing only one of the
capacitors does not affect the total capacitive load much, but unbalanced capacitors can affect the resonant
frequency to a higher degree than the change of the total capacitive load. However, unbalanced capacitive loads
will affect the duty cycle of the oscillation and therefore one should in general not use unbalanced capacitive
loads. This is especially critical if running the Atmel AVR close to its maximum speed limit.
4.5 RTC Crystals
Many AVR devices have the possibility use asynchronous clocking of the built-in timer/counter. The counter can
through this feature be used for real time functions. A 32.768kHz crystal should then be connected to the TOSCx
pins of the AVR.
In some AVRs the internal oscillator circuit used with the real time counter provides a capacitive load of
approximately 20pF, which should be appropriate for common 32.768kHz crystals. Refer to the data sheet for the
relevant device for info about capacitors/size. External capacitors can be applied if the internal load is insufficient
for the applied crystal.
4.6 PCB Layout
Finally, the importance of the physical location of the resonator in relation to the AVR should be stressed. Always
place the resonator as close to the AVR as possible and shield the resonator by surrounding it with a ground
plane.
5
Example Layout
(A-C) shows a schematic and PCB layout using a crystal oscillator for Atmel ATxmega32A4; this
example assumes a multilayer design with supply and ground plane on separate layers. Decoupling of all digital
supply pairs from VCC and isolating AVCC from VCC is seen. Note the short distance between the
crystal/capacitors and the ATxmega32A4, the ground plane surrounding the crystal and how close the vias that
connect to the planes are to the ATxmega32A4 pins in the layout.