Part Number: TMS320F28335
Tool/software: Code Composer Studio
Hi,
I am trying to read the ADC value of a sine wave using the ADC Pin A2,A3 and A4 on board. I have clamped the sine wave before connecting it to the ADC Pin. The Problem is that even before i connect the ADC pins to the sine wave source i see the ADC values continuously changing , I dont know the reason , Can anyone please clear the query?
I use the following code for the ADC initialisation
AdcRegs.ADCTRL1.all=0;
AdcRegs.ADCTRL1.bit.ACQ_PS=1;
AdcRegs.ADCTRL1.bit.SEQ_CASC=0x1;
AdcRegs.ADCTRL1.bit.CPS=0;
AdcRegs.ADCTRL1.bit.CONT_RUN=0;
AdcRegs.ADCTRL2.all=0;
AdcRegs.ADCTRL2.bit.SOC_SEQ1=0;
AdcRegs.ADCTRL2.bit.INT_ENA_SEQ1=1;
AdcRegs.ADCTRL2.bit.INT_MOD_SEQ1=0;
AdcRegs.ADCTRL2.bit.EPWM_SOCA_SEQ1=1;
AdcRegs.ADCTRL3.bit.SMODE_SEL=0x1;
AdcRegs.ADCTRL3.bit.ADCCLKPS=3;
AdcRegs.ADCMAXCONV.all=0x00F;
AdcRegs.ADCCHSELSEQ2.bit.CONV05=0x5;
AdcRegs.ADCCHSELSEQ1.bit.CONV03=0x3;
AdcRegs.ADCCHSELSEQ2.bit.CONV04=0x4;
Thanks and Regards,
Prithvi
