4
\$\begingroup\$

I am running my ATtiny85 with an external 32.768 kHz crystal because I need to keep accurate time. I also need to use the ADC in my application. However, the datasheet specifies that the minimum ADC frequency is 50 kHz. Furthermore, the minimum divisor for the ADC prescaler is 2, so the effective clock to the ADC would end up being 16.384 kHz.

Now, I have tested this with the mentioned 32.768 kHz crystal, and the ADC seems to work. I am getting good enough results. However, is what I am doing "allowed" or am I setting myself up for failing big-time? The plan is that if this device is something people want, I would make maybe 100 of them, and it would suck if I assume this would work when in fact there might be a problem later.

Does anyone have any wise words?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Find out why the manufacturer specifies the lower frequency of 50kHz - it might be the sample and hold capacitor's leakage inductor starts eroding the signal too much. \$\endgroup\$
    – Andy aka
    Commented Nov 1, 2013 at 16:41

3 Answers 3

4
\$\begingroup\$

The minimal frequency is because of the sample and hold capacitor leakage. When conversion is too slow, the stored voltage can leak more than 1LSB and this way to compromise the conversion.

This way you will get lower accuracy than specified.

Notice that the minimal frequency is defined for the worst case - higher temperature, extremal (lowest or highest) power voltage, maybe external radiation. This way, the described problems can happen later during the device work.

So, the conclusion is that if less accuracy is not a problem - go with it. But if you want to use the full accuracy of the ADC, the minimal frequency should be respected.

\$\endgroup\$
2
\$\begingroup\$

If it's working "well enough" now, it will continue to do so.

The main issue with violating the minimum clock frequency is a loss of accuracy. This is related to the sample-and-hold circuit used inside the ADC. It will "droop" by more than 1 LSB, which means that the ADC won't meet its accuracy specs, but if this is still sufficient for your application, go with it.

\$\endgroup\$
0
\$\begingroup\$

I had similar problems. I had to keep accurate data/time calculation at 32.768K and also, do power-hungry procedures which demanded at least 1Mhz.

What I did, was that I chose a low-end micro (Tiny13) for keeping time at 32.768, and I clocked the main processor at 16Mhz, a significantly higher speed.

I connected them with SDA & SCL. With this, I have both accurate time and high speed.

\$\endgroup\$
1
  • \$\begingroup\$ Why not just put a 32.768kHz crystal on TOSC1/TOSC2 of an ATmegaXX4? \$\endgroup\$ Commented Sep 16, 2014 at 22:24

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.