jayanth.devarayanadurga
Banned
- Joined
- Dec 4, 2012
- Messages
- 4,280
- Helped
- 822
- Reputation
- 1,654
- Reaction score
- 791
- Trophy points
- 1,393
- Location
- Bangalore, India
- Activity points
- 0
It only displays integer values. If you need to display floating point values then you have to write float to string conversion code.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 while(1){ lcd_cmd(0xC0); read(); //Read ADC adc_val = adc_val * 5 / 255; str[0] = adc_val / 100 + 48; str[1] = (adc_val / 10) % 10 + 48; str[2] = adc_val % 10 + 48; str[3] = '\0'; string(str); P3 = adc_val; }