Go Down

Topic: attiny85 trying to turn ADC off (Read 1 time) previous topic - next topic


in my quest to try to minimize power consumption, i have been reading about, and watching videos about, things to turn off in the tiny. well i decided to start with turning off the ADC. just the ADC. other things to come later. i inserted this code into a simple LED blink program :

#include <avr/sleep.h>

#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))

void goToSleep(void){
  ADCSRA &= ~_BV(ADEN);}

loaded it and ran it. the blink still works. but my current draw after is the same as before. my question is, how can i tell if i actually shut off the ADC ?


never mind. i found nick gammons paper about reducing power consumprion (http://www.gammon.com.au/power) and got it working. what a difference. thanks nick.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131