AnsweredAssumed Answered

Initialising / calibrating eQADCs on the MPC55xx

Question asked by Mike Evans on May 19, 2009
Latest reply on May 20, 2009 by Mike Evans

Hi there,


Newbie post, but I can't find the answer....


I have an evaluation board, the MPC5567EVB, but I believe the qADCs are the same for all 55xx device..


I'm trying to calibrate the ADCs on power-up, as described in application note AN2989.

The appendix gives some code, but I'm confused as to what the parameter ' dac' is that needs to be passed to the function.... can anyone shed some light?


Without posting the entire code, the function is declared as: 

int cal_eqadc(uint16_t dac)


and there are lines using the variable 'dac' like:

 EQADC.CFPR[0].R = 0x00002B00; + (dac<<25);  // Convert channel 43 (75%VRH)with CAL=0
 EQADC.CFPR[0].R = 0x00182C00; + (dac<<25);  // Convert channel 44 (25%VRH)with CAL=0


What is 'dac' used for???

Thanks for any help. Mike