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.

TMS320F28069: ADC READ

Part Number: TMS320F28069

I'm trying to read sine wave on ADC pin 2. But I m not getting the expected result.value on that pin is coming same whether I apply sinewave or not.

here's my code :

#include "DSP28x_Project.h"
float Temp,voltage;
void main()
{
InitSysCtrl();
DINT;
InitPieCtrl();
IER=0x0000;
IFR=0x0000;
InitPieVectTable();
InitAdc();
EALLOW;
AdcRegs.ADCCTL2.bit.ADCNONOVERLAP = 1;
AdcRegs.ADCCTL1.bit.INTPULSEPOS = 1;
AdcRegs.ADCSOC0CTL.bit.CHSEL=2;
AdcRegs.ADCSOC0CTL.bit.ACQPS=6;
AdcRegs.INTSEL1N2.bit.INT1SEL=0;
AdcRegs.INTSEL1N2.bit.INT1E=1;
EDIS;

for(;;)
{
AdcRegs.ADCSOCFRC1.all=1;

while(AdcRegs.ADCINTFLG.bit.ADCINT1==0){}

AdcRegs.ADCINTFLGCLR.bit.ADCINT1=1;
Temp=AdcResult.ADCRESULT0;
voltage = Temp/890.041;

}
}