4X4 keypad read
Brian_B
Posts: 842
Hi all,
·I'm trying to read from a 4X4 keypad , it apears that the out pins are floating . Should I be using pull up or pull down resistors on the outputs ! If so what value ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
www.truckwiz.com
·"Imagination is more important than knowledge..." ·· Albert Einstein
http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)
·I'm trying to read from a 4X4 keypad , it apears that the out pins are floating . Should I be using pull up or pull down resistors on the outputs ! If so what value ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
www.truckwiz.com
·"Imagination is more important than knowledge..." ·· Albert Einstein
http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)
spin
463B
Comments
(1) Hmmm, all the world takes 10k - so you should also... Funny question...
(2) up or down - well this depends on the active state of your key presses... That's something only you can know!
(3) Your code
can be simplified to
Did you really mean to say "out pins are floating"?
If that is so, you may have to look at the dira register and set output bits high.
(No, I didn't check your code. I am sure deSilva did)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
www.truckwiz.com
·"Imagination is more important than knowledge..." ·· Albert Einstein
http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
my log($1) cents,
Marty
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lunch cures all problems! have you had lunch?
(A) Please connect 10k resistors from GND to pins 12 to 15 of your Propeller ("pull down")
(B) The code
is no good at all for a simple matrix, as two pressed keys make a shortcut!
Do
instead.
Then it should work!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thank's Brian
www.truckwiz.com
·"Imagination is more important than knowledge..." ·· Albert Einstein
http://www.diycalculator.com/subroutines.shtml· My favorite website ( Bet you can't guess why)