1
\$\begingroup\$

I'm trying to run an ATtiny2313 on this 32KHz crystal. The load capacitors I've used are 22pF. The crystal does not oscillate unless I touch capacitors with a finger or just touch one of the capacitors with isolated tweezers.

What could be a problem?

\$\endgroup\$
2
  • \$\begingroup\$ Did you set the crystal configuration in the fuses correctly? IIRC, there is a different oscillator fuse setting for low frequencies. This should all be laid out clearly in the datasheet, you know. \$\endgroup\$ Commented Aug 27, 2013 at 4:23
  • \$\begingroup\$ yes, I did set the fuses correctly \$\endgroup\$
    – miceuz
    Commented Aug 27, 2013 at 6:53

3 Answers 3

4
\$\begingroup\$

The oscillator of the ATTINY2313 has a minimum crystal frequency of about 400 kHz. Your 32 kHz crystal is far off and thus unlikely to work.

The datasheet is a bit misleading: You can operate the 2313 with 32 kHz, but you'd need an activly driven clock signal (external oscillator) and not a simple passive crystal.

\$\endgroup\$
3
\$\begingroup\$

The load capacitance stated on the "brochure" is 12.5pF. I didn't mean to add this as answer but as a comment. Show us your circuit for minimal confusion please. Once you have "touched" the crystal, does it carry on oscillating? If so then maybe your attiny213 isn't "equipped" to handle this type of crystal i.e. its circuit doesn't provide enough gain during power-up to get it to begin running? What does the attiny2313 info state about this sort of situation?

\$\endgroup\$
5
  • \$\begingroup\$ it keeps oscillating only while I touch one of the xtal pins. not when I've tried - even without a crystal. so, probably attiny2313 does not work with crystals as low as 32KHz... \$\endgroup\$
    – miceuz
    Commented Aug 26, 2013 at 21:54
  • \$\begingroup\$ @miceuz check the spec!!! \$\endgroup\$
    – Andy aka
    Commented Aug 26, 2013 at 22:15
  • \$\begingroup\$ Yes, check the data sheet! You may not have set the fuse bits correctly. You may be using an inappropriately matched crystal (ESR, capacitance, etc.) 22 pF capacitors, connected correctly, match pretty well with a 12.5 pF crystal -- but what capacitance does the oscillator in the AVR need? \$\endgroup\$
    – Jon Watte
    Commented Aug 27, 2013 at 3:12
  • \$\begingroup\$ @Andyaka which spec? I didn't find anything about crystal max frequency or load capacitance in the attiny2313 dtasheet. \$\endgroup\$
    – miceuz
    Commented Aug 27, 2013 at 6:57
  • \$\begingroup\$ @miceuz I can't really help any more - if the specs you have don't specify what xtals they can use it's a case of trying things out - maybe reduce the capacitance from 22p to 10p. \$\endgroup\$
    – Andy aka
    Commented Aug 27, 2013 at 7:15
1
\$\begingroup\$

Conditions for oscillation only require gain>1 at resonance and can occur with any low frequency as the inverter gain is at least 10 down to DC. The input and output must be at Vcc/2 dc, if it is not oscillating. Touching adds hum which satisfied the initial condition to make oscillations.

The tuning fork is a high Q band pass filter that should filter the noise to a 32kHz sine wave on one side with a square wave from the output on the other. The tweezer with hand would be much larger than 20 pF so the other side cap in series limits the load capacitance across the resonator. Try placing a new part on top of the old one and hold in place with a toothpick. It could be cracked but not visible.

By design, the two 20pF caps act as two series caps with an equivalent 10pF load across the resonator. Chip input and board capacitance adds a few more pF.

The cause could be but unlikely that both caps are damaged from excess solder heat. Check the DC voltage, & inspect the caps. If using SMD, look for wet looking ceramic between the end conductors.

If hand soldered and they sweat, this a bad sign they have been overheated and may crack. Check also by raising the supply voltage 10% to see if there is any clues, there to trigger oscillation such as low gain in the chip. The resonator is spec'd at 65k series impedance, but if defective will be much higher. Make sure there is a supply decoupling cap nearby.

How is the chip powered and what is the supply voltage? 2.7V? 3.3? 5V? ESD can damage the chip input as it is high impedance on one side with a 1M feedback or so.

\$\endgroup\$
1
  • \$\begingroup\$ The chip is powered from USB via a programmer - 5V. The chip is not damaged as it works ok with 16MHz oscillator and we've tried changing crystal and caps. This seems to be a case of combination of particular crystal and attiny2313 or attiny2313 simply does not support this low frequency crystals. The least fuse setting is 0.4 - 0.9MHz \$\endgroup\$
    – miceuz
    Commented Aug 27, 2013 at 8:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.