Cutting power the easy way

Turned off all unused units like the analog comparator, Timer0, USI, and  USART.

Saved about 0.2mA. Not much, but I guess worth the tiny amount of effort.

ACSR |= ACD;        // Turn off analog compare unit. We don't use it, so save power. Saves about 0.1ma   3.6mA drops to  3.5 mA

PRR = PRTIM0 | PRUSI | PRUSART;        // Turn off Timer/Counter0, USI, USART since we don't need them. Saves about 0.1mA.

Brownout detector already off via fuses. Won’t really worry about setting IO pins to output since the input is disabled during sleep and we will be asleep almost all the time except when updating display.

I guess it is now all about maximizing time in SLEEP!

Commit here…

https://github.com/bigjosh/Ognite-firmware/commit/284bfb23cc6c535012a5a8e22c8acf92a21c0073

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s