ATmega32\ problem with ADC output display to LCD

Discussions on the software and hardware for Atmel's STK standard.

Moderator: phalanx

Post Reply
nate9862
Posts: 1
Joined: Tue Apr 14, 2015 6:24 pm

ATmega32\ problem with ADC output display to LCD

Post by nate9862 » Tue Apr 14, 2015 6:29 pm

I am designing a pitot tube for project. If you're unaware, a pitot tube simply measures windspeed based on static pressure.

So, I have my pressure transducer connected to the ADC0 port on an ATmega32 chip. I can get the ADCH value and convert it to a string using itoa(...) and it displays fine to my LCD. However, when I try to use the ADCH output and multiply it against some constants (doubles already defined) then convert it to a string using dtostrf(...), it either displays 00's, or a bunch of gibberish.

I guess my question is this:

if I wanted to use the ADCH output and multiply it by 1.1 and display that value on the LCD, what the hell do I need to do? I know exactly how to display a string to my LCD, so it has to be an intermediate step that is causing me problems. Any ideas AVR gurus?

User avatar
Ross Robotics
Support Volunteer
Posts: 2007
Joined: Thu Jun 07, 2012 9:33 pm
Contact:

Re: ATmega32\ problem with ADC output display to LCD

Post by Ross Robotics » Wed Apr 15, 2015 1:00 pm

------------------------------------------------------------------------------------------------------------------------------------------------------------
//codlink
Available for circuit and PCB design, just PM me!

AVRexpert
Posts: 2
Joined: Sat Dec 17, 2016 8:48 pm

Re: ATmega32\ problem with ADC output display to LCD

Post by AVRexpert » Sat Dec 17, 2016 8:59 pm

Hello ,Thanks for asking !
instead of dtostrf ,use itoa function that might solve your problem I have made a nice tutorial for you ! to display ADC number to LCD . with Atmega-32/16 please check this URL.thank you https://www.electronify.org/avr-projects/thermometer :roll:

Post Reply