problem displaying an analogue input on an LCD

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
stuart randall
Posts: 4
Joined: Sun Mar 01, 2015 2:07 pm
Contact:

problem displaying an analogue input on an LCD

Post 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?

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: problem displaying an analogue input on an LCD

Post 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
Martin

stuart randall
Posts: 4
Joined: Sun Mar 01, 2015 2:07 pm
Contact:

Re: problem displaying an analogue input on an LCD

Post by stuart randall »

I've just got it sorted, thanks so much for that mate!

Post Reply