AnsweredAssumed Answered

CodeWarrior MC9S08SF4 ADC Number of Conversions

Question asked by Juan Mustelier on Apr 14, 2011
Latest reply on Apr 15, 2011 by Jim Potteabaum

CodeWarrior MC9S08SF4 ADC Number of Conversions


I am new to both Freescale & CodeWarrior - & loving it.


When setting the ADC component's "Number of Conversions", through the Component Inpector, does the code generated averages the result, or do you have to do that yourself. I looked at the generated code, but it didn't seem obvious where is it that they are calculating the average of the measurements. Since this is how the measurements are saved,


  RefSense_OutV[SumChan] += tmpTwreg.w; /* Save measured value */


But when it reaches the number of conversions, then it invokes the user event, 


      RefSense_OnEnd();                /* Invoke user event */  


However, nowhere can I see where the aveage of the measurements is being calculated.