Page 1 of 1

problem displaying an analogue input on an LCD

Posted: Thu Mar 05, 2015 8:24 pm
by stuart randall
I'm trying to print the voltage from a potentiometer as an integer on an LCD. I'm using an EB006-09 multiprogrammer and an EB005 LCD board. I have a 1K potentiometer with terminals connected to +V, GND and A0
20150302_184334.jpg
(1.12 MiB) Downloaded 1519 times
. I've wrote a basic program in flowcode to pick up the analogue signal through A0 (AN0) and print it on the LCD as an integer
print pot.png
(237.15 KiB) Downloaded 1519 times
. When I simulate the program it works fine; the LCD display reads from 0 to 1023 as you would expect, but when I compile the program, the LCD just displays the numbers 771, 514, 257 and 0 in a random fashion.

I've made a program to print some text to the LCD to make sure the LCD isn't broken and I've checked the voltage going into A0 with a multimeter as I rotate the pot.

I've made this program before and had it working on other boards. The only idea I have left is that I'm powering it through the USB and I thought the board might be somehow trying to regulate it's own current.

Anyone have any ideas what's going wrong?

Re: problem displaying an analogue input on an LCD

Posted: Thu Mar 05, 2015 9:08 pm
by medelec35
Hi Stuart,
A fix can be found here
I also posted about it here
Not realising a fix had already been posted.

Martin

Re: problem displaying an analogue input on an LCD

Posted: Fri Mar 06, 2015 2:12 pm
by stuart randall
I've just got it sorted, thanks so much for that mate!