Difference between adc enable and adc start conversion bit

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was reading ATmega1608 datasheet and inside ADC subtopic I found two bits first one is ENABLE in ctrla register and STCONV in command register. What is the difference in these two bits. What does enable actually enable?

This topic has a solution.
Last Edited: Mon. Jul 18, 2022 - 08:11 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What does enable actually enable?

 

Generally enable turns the whole thing on or off, usually to save power.  However it still needs to start a conversion (when told to do so).

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What does enable actually enable?

The ADC pins to be used as analog pins rather than digital I guess.

The ADC is enabled by writing a ‘1’ to the ADC ENABLE bit in the Control A
(ADCn.CTRLA) register. The voltage reference and input channel selections will not go into effect before the ADC is
enabled.

 

The STCONV  starts a conversion on the chosen pin.

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The ENABLE bit enables ADC. To configure the ADC, this bit must be set to 1. Otherwise, the ADC will not work and the ADC pins will work like other ordinary I/O pins. The  STCONV   starts the conversion. This bit must be set to 1 every time you want to calculate the analog voltage applied to any ADC pin of the microcontroller. 

 

I think it will be clear if you see the ADC  tutorials of ATmega16. The ENABLE bit of  ATmega1608 is as same as the ADEN bit of ATmega16. And the STCOV bit is like the ADSC bit of ATmega16. I think you'll get a clear idea if you see some examples like  ATmega microcontroller-based voltmeters. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My understanding is ENABLE bit kills the clock to the ADC which saves a little power. The START command or EVENT trigger is still responsible for requesting VREF and similar hence a delay can be inserted before the actual conversion begins.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My understanding is that it does more than just the clock, it actually switches off that section of the processor logic:

 

Enable bit (ACME in SFIOR) is set and the ADC is switched off (ADEN in ADCSRA is zero), MUX2..0 in ADMUX select the input pin to replace the negative in

 

However, even this leaves some wiggle room as to what is meant (so perhaps it is just the clock).

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There's a relative question. If one is doing a low Hz ADC poller, say 2Hz, and has tied it into the EVENTSYS+RTC to be auto-triggered then the ADC enable must be left on for most the time.

The alternative is to interrupt the RTC, enable ADC and fire off a sample then use the ADC interrupt to disable it all.

According to the datasheet the ADC consumes quite a bit of current when enabled but it doesn't say how much of this is during sampling or idle.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

According to the datasheet the ADC consumes quite a bit of current 

Quite a bit?  The entire AVR takes only a handful of milliamps!  

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the grand scheme of things it's a large slice of the pie. See the power consumption section of datasheet.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 it's a large slice of the pie

That might be, but the entire part is rather minimal.  By the time we drive a few leds, maybe a relay coil, motor, or speaker, the AVR  can be rather insignificant.  Of course, if using battery power, then we might be out to save every mW or even uW. 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!