AnsweredAssumed Answered

ADuCRF101 ADC Conversion Interrupt Handling Enable?

Question asked by MrYan on Feb 28, 2012
Latest reply on Feb 28, 2012 by MrYan

Hello,

 

I am attempting to have the ADuCRF do continuous conversions on a single channel and handle the result in an interrupt.  I am enabling the ADC as follows:

 

   ADCCFG = (1 << 13)    // LVDD as reference

                     |(5 << 10)    // ADC clk/32

                     |(3 <<  8)    // 16 aqu-clk

                     |(2 <<  0);   // ADC 2

   

    ADCCON = (1 << 7)     // REF On

                    |(1 << 5)     // IRQ Enabled

                     |(0 << 4)     // power-up ADC

                     |(1 << 1)     // cont. conversion

                     |(1 << 0);    // start ADC

 

And my ISR handler is:

 

void ADC0_Int_Handler()

  adcdata = ADCDAT>>2;

}

 

However, the ISR never fires off.  I have general purpose timer ISR's firing just fine.  Also, I have been able to verify that the ADCSTA register indicates there has been a successful conversion.  Have I missed a setting somewhere else to enable the ADC ISR? 

 

Thank you...

Mr Yan

Outcomes