uC ADC help

Discussion in 'General Electronics Chat' started by silvrstring, Mar 28, 2009.

  1. silvrstring

    Thread Starter Active Member

    Mar 27, 2008
    Hello, everybody.

    I'm playing around with the ADC of my HCS12 uC. On p.236 of the reference manual at


    bit 5 of ATDCTL5 can be set as "Single conversion sequence," or "Continuous conversion sequence." Can someone tell me what the difference is? It sounds like a stupid question, I know. But the reason I am asking is because a recent lab I did attaches a potentiometer to one ATD input pin, and converts and reports the voltage level (0V ~ 5V) as it is adjusted. But the ATDCTL5 "SCAN" bit (bit 5) was set to "Single conversion sequence."

    Continuous monitoring was made possible by putting the whole thing in a while(1){...} loop. So what is the difference between "Single conversion sequence" in a while(1) loop, and setting the SCAN bit to "Continuous conversion sequences?"

    Thanks for any help.
  2. hgmjr

    Retired Moderator

    Jan 28, 2005
    Single conversion mode means that you have to retrigger a conversion cycle using software.

    Continuous conversion means that the ADC converts its analog input on a periodic basis that is set by the sample rate that it has been configured to use. In continuous mode the ADC starts a new conversion cycle immediately following the completion of the current conversion.

  3. silvrstring

    Thread Starter Active Member

    Mar 27, 2008
    Thanks for clearing that up for me hgmjr.