problem displaying an analogue input on an LCD
Posted: Thu Mar 05, 2015 8:24 pm
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
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?
. 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 . 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?