hello sir,
i am using msp430f5325, i am implementing bar graph using this. here i am using A3, A2,A1,A0 for input and output display to lcd. input comming but bar graph will not display. settings are as-
void adc_init()
{
P6SEL =0x0F;
ADC12CTL0 = ADC12ON+ADC12MSC+ADC12SHT0_8; // Turn on ADC12, set sampling time
// set multiple sample conversion
ADC12CTL1 = ADC12SHP+ADC12CONSEQ_1; // Use sampling timer, set mode
ADC12MCTL0 = ADC12INCH_0; // ref+=AVcc, channel = A0
ADC12MCTL1 = ADC12INCH_1+ADC12EOS;
ADC12IE = 0x08; // Enable ADC12IFG.0 , ADC12IFG.1
}
////////////////////////////////////////////////////////////////////////////////////////
void adc_conv()
{
static unsigned int A0_RES=0,A1_RES=0;
static unsigned int counter=10;
ADC12CTL0 |= ADC12ENC;
// Enable conversions
ADC12CTL0 |= ADC12SC; // Start convn - software trigger
__delay_cycles(100);
A0_results += ADC12MEM0; // Move A0 results, IFG is cleared
A1_results += ADC12MEM1; // Move A1 results, IFG is cleared
counter--;
if(counter==0)
{
A0_RES = (A0_results/10);
A1_RES = (A1_results/10);
A1=A0_RES;
B1=A1_RES;
adc2lcd(A0_RES, A1_RES);
A0_results=0;
A1_results=0;
counter=10;
}
}
here if we given input through XLR then conversion not show but when we give value itself then display comming.
so if you got any error then plz tell me. i am very confused about it.