thannara123
Advanced Member level 5
I am trying to Displaying ADC value to LCD as voltage ie 00.00Volt.
May i get a tutorial program for it .
I just write the following code .please help me
I searched the forum a lot of but I didnt get better one .I want to learn it
May i get a tutorial program for it .
I just write the following code .please help me
Code:
void value_coverter(unsigned int adc_value)
{ unsigned char temp[8];
vout = adc_value * 0.00488;
int_value = vout; // only decimal part
vout = vout - int_value; // for only fractional part
temp[0] = int_value /10; // saving first decimal digit
temp[1] = int_value % 10; // saving second digit
temp[2] = '.'; // point
vout = vout * 100; // making fractional part to decimal
temp[3] = vout /10;
//temp[4] = vout % 10;
for(int i=0; i<4; i++)
lcd_data(temp[i]+0x38);
}
I searched the forum a lot of but I didnt get better one .I want to learn it