Part Number: TM4C123GH6PM
Hi
I am using ADC1 of tm4c123gh6pm for my remote node to read the analog sensor value, this in turn I am displaying on serial interface.
The problem is as I am trying to send the data to the serial interface I am getting 2 analog values even after disabling the sequencer of the ADC, how can i rectify this problem.
The bit code is as given below.
void ADC_INThandler(void){
int i;
ADC1_ISC_R |= (1<<3);
SSI2_CR1_R |= (1<<1);
ADC1_ACTSS_R &= ~(1<<3);
adcResult = ADC1_SSFIFO3_R;
temp_result = adcResult;
Delay();
printString("\n\r");
for(i=0 ;i<4 ;i++)
{
temp[i] = adcResult % 10;
adcResult = adcResult/10;
char c = temp[i] + '0';
printChar(c); //UART
LCD_OutChar(c);//LCD
SSI2_DR_R = c;//SPI
while((SSI2_SR_R & (1<<0)) == 0);
}
//SSI2_CR1_R &= ~(1<<1);
}
Thanks in Advance