Electronic – AVR startup time w/ external xtal/osc

avrsleep

When using an external xtal/osc with an AVR, you get several startup time options when setting the fuses, such as:

  • 6 CK/14 CK + 0 ms
  • 6 CK/14 CK + 4 ms
  • 6 CK/14 CK + 64 ms

Now… does anyone know if these startup times apply when resuming my AVR from sleep (SLEEP_MODE_PWR_DWN)? Or is it just when starting it for the first time. I want to use a 32.768 kHz watch crystal to keep accurate time, but it seems to me that if there are these startup time issues each and every time after going to sleep then that would make for very unreliable time-keeping.

Using an ATtiny85 if it makes any difference.

Best Answer

So it turns out that using an external 32.768 crystal reduces the power consumption of an ATtiny85 a LOT.

Running with an internal 1 MHz clock source and having the AVR sleep most of the time in power down mode - only waking up every 32 ms - it consumes around 62 microamps. However, using a 32.768 crystal as the external clock source, the power consumption is only around 22 microamps, even when running at "full throttle" so to speak (32768 ticks per second with no sleep mode).

So it turns out that running it at that low of a speed cuts down on power consumption so much that you don't actually need to sleep it.