Post content partially lost due to vandalism by author
I wonder if there is already a ADC-start-conversion instruction in this function used with avr/sleep library:
Post content partially lost due to vandalism by author
I wonder if there is already a ADC-start-conversion instruction in this function used with avr/sleep library:
I wonder if there is already a ADC-start-conversion instruction in this function used with avr/sleep library:
No. The processor has circuitry to automatically start a conversion with Noise Reduction and Idle sleep modes. Setting the ADSC is not necessary.
Why would the processor start a conversion if i dont want to ?
Did you enable the analog-to-digital converter?
Did you enable the ADC Interrupt?
Then you have indicated that you want a conversion to be performed when the processor is put to sleep. If you do not want a conversion to be performed when the processor is put to sleep then disable the converter and/or disable the interrupt before putting the processor to sleep.
The counter-question is "Why would you put the processor to sleep with the ADC converter and the ADC interrupt both enabled?" The only logical reason is that you want to perform a conversion with the processor sleeping then wake the processor when the conversion completes.