uC ADC help

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

  1. silvrstring

    Thread Starter Active Member

    Mar 27, 2008
    159
    0
    Hello, everybody.

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

    http://www.freescale.com/files/microcontrollers/doc/data_sheet/MC9S12C128V1.pdf?pspll=1

    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.
    silvrstring
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    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.

    hgmjr
     
  3. silvrstring

    Thread Starter Active Member

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