1. Power and energy
-
Go to section 7 in the datasheet.
1.1. ATtiny sleep modes
-
Find the
MCUCR
register information.-
How many sleep modes are there? What do they mean?
-
What entities are affected by these configuration bits?
-
There are only 3 rows in Table 7-1 but there are 2
SM[1:0]
bits. → Where is the fourth row?
In the ShortSquawker, with everything being triggered by a Timer0 interrupt, there is a time interval after the Timer0 ISR finishes where the CPU has nothing to do.
-
What code is the CPU executing during that time in the original Arduino (and your pure C) version?
-
What sleep mode is most appropriate to enter into during that time interval? (and why, exactly)
2. ATtiny85 strategy
Given the datasheet’s descriptions and knowledge of how ShortSquawker works:
Map out a strategy for reducing power usage (supply current) during all of the operation modes.
It is useful to have a "timing diagram" of the code’s execution.
Start with the hints in Section 7.4, then add more ideas given the application’s code.
-
When do you need to re-initialize registers? Does any sleep or power mode wipe out your configuration?
-
What supply current do you expect to measure in each of the modes and time intervals of operating the ShortSquawker?
-
Having a prediction is the first step to lowering the current draw, matching against actual measurements.
-