I am teaching myself more about microprocessors and currently working with the Attiny1616 (20-Pin VQFN) using C to make timers. My current project has me employing a switch statement to get the devices to take on a variety of different timings. By installing a 0-ohm resistor from one of the pins to ground, the switch statement knows which timing setting to employ. I am using pins PA4, PA5, PA6, PA7, PB4, and PB5. The devices also have a 7th timing setting they will use as a default if the 0-ohm resistor is not installed. I am using the <avr.sleep.h> library.
With the resistor installed to any of the 6 pins, the units typically consume 170 to 270 microamps while in sleep mode (using either standby or power down). Yet with no resistor installed the units consume 2.7 to 4.1 microamps.
This is the first mystery. I am unclear as to why they are not able to fall into the deeper sleep with the 0-ohm resistor installed.
The second mystery is that even after removing the 0-ohm resistor, the units are still consuming in the range of 170 to 270 microamps. Only units which have never had the 0-ohm resistor installed are able to reach the 2.7 to 4 microamp range.
Any advice on what to try to get the units to fall into the deeper sleep would be greatly appreciated.
I am not even sure if it will help but I have been exploring writing a version of the program which does not employ the <avr.sleep.h> library but my coding skills are not up to the task, so it’s been slow going so far.
user23844072 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1