# [AVR][HELP] How To Display ADC0804 Value in LCD using codevisionavr ?

Status
Not open for further replies.

#### ibnu10

##### Newbie level 5
Hello,
I make simple circuit to read adc0804 value through microcontroller then display it to LCD 16x2. Input ADC is voltage 0-5 V. I got problem with programming on codevisionavr , i dont know how to convert binary output ADC to decimal which read microcontroller. I have searched in forum for the code , i culdnt find code using codevisionavr.
Please help me
thanks

#### kgshankar1980

##### Full Member level 3
I think you didnt read the datasheet properly...And your requirement of C code doesnt have any relation with CODEVISION AVR IDE...Pls do the homework...

Pls look into the section "TESTING THE A/D CONVERTER" thoroughly..If your hardware is connected as per the voltage level given in the datasheet just use the formula that is given in that section where you will get the result in floating point..

If you declare a variable of unsigned char var=0, and use this variable as var=port; //where the 8-bit parallel adc is connected..this is a hexadecimal value...

Since this ADC is a 8-bit parallel converter, there should not be a great deal of reading the 8-bit and displaying in the LCD...

Each character of the floating point result should be taken in an array or pointer then send to the LCD based on the location...

Status
Not open for further replies.