Matrix keypad problrm

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
tompzone
Posts: 23
Joined: Mon May 23, 2011 4:30 pm
Contact:

Matrix keypad problrm

Post by tompzone »

hi, i have been trying to use a matrix keypad, i have used the examples provided here, and when i simulate it with flowcode an proteus it works, but on a breadboard, it always sends me several keys (i remember that it always send 4 7 and 1), as if i where pressing them, i tried changing the port adding delays and placing pullup resitors but it still does the same, do i need a special kind of keypad or arrangement (it's a membrane keypad the ones that are so popular on ebay

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8925
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Contact:

Re: Matrix keypad problrm

Post by medelec35 »

tompzone wrote:do i need a special kind of keypad or arrangement (it's a membrane keypad the ones that are so popular on ebay
Yes you do. since the keypad is an open circuit switch. The rows are connected to inputs and the columns are connected to outputs. If you do not use pull-down resistors, on the rows, then rows connected to the microcontroller will be floating, so could randomly go from logic 0 to logic 1 due to the very high input resistance or i/p pins. This would show up as numbers displayed without any key pressed.

The other cause could be that the rows that are suppose to connect to an i/p, maybe connected to a pin that's an o/p only.
Likewise the columns are suppose to connect outputs maybe connected to a pin that's an o/p only.
How the keypad routine works:
Each column in turn is pull low.
Basically if all the rows that are connected to i/p's stay low, then no key is detected.
If a key is pressed then the corresponding row will be pulled high by the port output that has gone from low to high.
At least I think that's how it works not got time to test.

My advice would be:

Check keypad is wired the same as diagram on the last page of Eblock 014 datasheet:
http://www.matrixmultimedia.com/datashe ... 4-30-1.pdf

Check pins of microcontroller connected to rows can be i/p's
Check pins of microcontroller connected to columns can be o/p's

Martin
Martin

tompzone
Posts: 23
Joined: Mon May 23, 2011 4:30 pm
Contact:

Re: Matrix keypad problrm

Post by tompzone »

thanks alot that was the problem, now it's fixed thanks alot

Post Reply