Pages: [1]   Go Down
Author Topic: attiny85 trying to turn ADC off  (Read 480 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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))
#endif

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 ?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: