This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/UCD3138PFCEVM-026: poll_adc function question

Part Number: UCD3138PFCEVM-026

Tool/software: Code Composer Studio

Hi all,

I have question about the code following

in the standard_interrupt.c file 

iv.vbus_filtered = iv.adc_raw[VBUS_CHANNEL] + iv.vbus_filtered - (iv.vbus_filtered >> 6);//Q18

how is that equation comes from ? the modified moving average?

but the equation for IIR filter is 

Y[n] = X[n] / N + Y[n-1] * (N-1) / N 

which equate to 

Y[n] = X[n] / N + Y[n-1] - Y[n]/N  

that is not comply with the code " iv.adc_raw[VBUS_CHANNEL]"   (not >> 6)

any thought? 

Tom