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.

How to change ADC resolution of F2812 by using IQ library?

Hi,

I am using eZdsp 2812 to control a boost converter and I find out that the ADC resolution is too high which causes limit cycle oscillation. I am wondering how to change ADC resolution by using IQ function?

I compared the two expression below, it turns out the results are the same.

_IQ16toIQ((_iq)AdcRegs.RESULT2))

_IQ12toIQ((AdcRegs.RESULT2>>4))

He, Siyu

  • hm..

    If you use the full ADC resolution then 

    _IQ12toIQ(AdcRegs.RESULT2)

    if you want to ignore the two lower bits which will reduce resolution, you can do the following

    _IQ10toIQ((int16)AdcRegs.RESULT2>>2)

    If you still have limit cycle then the issue may not be ADC resolution

  • Manish,

    Thanks for your reply.

    The maximum resolution is 12 bits for ADC and the 4 last bit in register are 0, so the ADCRESULT should be trreated as a 16 bits binary as IQ16.

    If use full ADC resolution in Q format, it turns out the result is negative if MSB of AdcRegs.RESULT is not 0,so

    _IQ16toIQ((Uint16)AdcRegs.RESULT2)

    How do you think?

    He, Siyu