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: changing resloution of ADC on F28335

Tool/software: Code Composer Studio

Hi I want to know how an I change the resolution of my ADC for example I want to change 12 bit to 8 bit , iam using f28335 microcontroller and iam using the following code on ADC interrupt 

interrupt void  adc_isr(void)
{
       PVvoltage = AdcRegs.ADCRESULT0 >>4; }

  • Muhannad,

    Thanks for reaching out to the C2000 Forum.

    The ADC on this device is always 12-bits. 

    What you are seeing in the example code is the conversion results stored in AdcRegs.ADCRESULTx are all left justified(Q4), so in order to operate/read them in Q0 format they are being right shifted by 4 to remove the trailing nibble(4 bits).  

    There is an alternate set of registers defined in the headerfiles under AdcMirror.ADCRESULTx that are natively right justified to avoid the need for a shift before storing.

    These are documented in the ADC UG as follows:

    Best,
    Matthew

  • thank you for your respond .
    from what I understand there is no way to reduce the resolution of 12 bit ADC.
  • Muhannad,
    Correct, it is fixed at 12-bits. Can you elaborate on the reason you'd like to reduce the resolution? Typically converters offer this as a way to impove the sample rate, i.e. fewer bits means less time to convert. This ADC is at 12.5MSPS, which for an embedded ADC is quite fast already.

    Matt