Page 1 of 1

keypad problem

Posted: Mon Dec 05, 2011 9:48 pm
by aerofrick
Hi,
I was working on my next project and as always I tested the parts of the program before the whole thing. When I did a test of receiving a number from a keypad 4×4 and displaying it on an LCD I discovered a big error. The keypad was giving me different numbers (mostly around 1-10) even when no buttons were pressed (if I am correct it should be 255).

My test program contained: LCD start , and a continuous loop in which I had macros for reading from keypad as Byte and then displaying it on LCD (cursor 0,0) as a number. Simple program.

Has anyone an idea why this wold be happening?

Jan


PS: In simulation the whole thing worked.

Re: keypad problem

Posted: Mon Dec 05, 2011 10:19 pm
by JohnCrow
Are you able to post your flowchart if its not commercially sensitive, so we can have a look and try to help you

Re: keypad problem

Posted: Mon Dec 05, 2011 11:18 pm
by aerofrick
I didn't know how to insert it so I uploaded it on my web page under name test(.fcf or .c) (onely one)

you can find it here https://sites.google.com/site/janbozegl ... jekti/test

As I stayed the program is just a test program to test the keypad

Jan

Re: keypad problem

Posted: Tue Dec 06, 2011 11:00 am
by Benj
Hi Jan,

Are you using pullup and pull down resistors on the physical hardware. You can look at our datasheet for our EB014 keypad to check if you have the hardware setup correctly. Random values even when your not pressing a key indicates floating inputs to me.