[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] Is it any method to avoid ADC start in idle mode?
From: |
Rolf Magnus |
Subject: |
Re: [avr-chat] Is it any method to avoid ADC start in idle mode? |
Date: |
Sat, 3 Jun 2006 11:14:34 +0200 |
User-agent: |
KMail/1.9.1 |
On Saturday 03 June 2006 07:51, Dmitry K. wrote:
> Hi.
>
> For me it has appeared a surprise that it is impossible
> to avoid start ADC at transition in a idle state (needed
> to reduce power consumption). MCU is ATmega168 (and 48).
> It was tryed:
> 1. Disable ADC interrapt enable: ADIE==0
> 2. No clear ADC ready: ADIE==0, ADIF==1
> 3. (!) Auto Trigger Mode: ADATE==1 (with timer source)
> ==> No results: ADC starts with each 'sleep' instruction.
The datasheet says it quite clearly:
"If the ADC is enabled, a conversion starts automatically when this mode is
entered."
This doesn't depend on auto trigger source or the ADC interrupt settings.
The solution is to simply switch the ADC off (ADEN=0).
> Certainly, the disabling of interruption (ADIE=0) limits
> quantity of starts, but it is no matter, when external
> interruptions act in the casual manner. To stop ADC it is
> impossible: it is switched off internal AREF.
> The most insulting, that in Auto Trigger mode it is
> impossible to obtain a regular period.
Well, you can use a timer as auto trigger source.
> I attach a small test of this.
Where?