Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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

Status
Not open for further replies.

ibnu10

Newbie level 5
Joined
Jan 13, 2013
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,339
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 don`t know how to convert binary output ADC to decimal which read microcontroller. I have searched in forum for the code , i culdn`t find code using codevisionavr.
Please help me :)
thanks
 

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top