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.

Conversion of ADC value in Deciaml number to display on the lcd with PIC16F876A

Status
Not open for further replies.

jean12

Advanced Member level 2
Joined
Aug 27, 2013
Messages
529
Helped
5
Reputation
12
Reaction score
6
Trophy points
18
Activity points
5,497
Hello,there I would like anyone who can help me to convert the adc value into decimal number to display on the lcd.

I am measuring a voltage of 0V-30V but I am not able to printout the real value which I measured on the input AN0 of the PIC;Please help by proving the theories for digital to decimal conversion for displaying on the LCD.

Here is my complete project.The project is that called DVMLCD876A.Zip.

Please help

Thanks.
 

Attachments

  • DVM.zip
    50.2 KB · Views: 77
  • DVMLCD876A.zip
    48.5 KB · Views: 84

Hi Jean12,

I am measuring a voltage of 0V-30V???

How do you measure 30V in PIC GPIO's.. I think GPIO's only capable upto 5V..are you using any voltage divider there?

Best regards,
 

you have to divide the maximum voltage into 5V with a voltage divider before giving it to the pic...
 

Hi,

Your 0 -5v adc result is in 1024 steps, so to represent 0 -30v you must divided the 10 bit adc result by 34.13
You then use an ascii converter routine to convert that value to ascii characters suitable for displaying on the lcd.
 

I have answered your question here. https://www.edaboard.com/threads/297938/

See attached image. The only problem I see in Proteus simulation is that it shows logic contentions on RC4 to RC7 even though TRISC is configured as output pins. Maybe it is a bug of CCS C as I have used Proteus PIC16F876A part for other projects there is no problem with Proteus model.

95838d1378459587-lcd1.png
 

Attachments

  • lcd1.png
    lcd1.png
    95.4 KB · Views: 101
Last edited:
  • Like
Reactions: tpetar

    tpetar

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top