4X4 keypad read

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)
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
if ina[noparse][[/noparse]12] == 1 number := 10 + index if ina[noparse][[/noparse]13] == 1 number := 20 + index if ina[noparse][[/noparse]14] == 1 number := 30 + index if ina[noparse][[/noparse]15] == 1 number := 40 + index
can be simplified to
IF INA [noparse][[/noparse]15..12] number := INA[noparse][[/noparse]15..12]*10 + index
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
dira[noparse][[/noparse] 8..11]~~ ... someloop .... outa[noparse][[/noparse] 8..11]~ outa[noparse][[/noparse] index]~~
is no good at all for a simple matrix, as two pressed keys make a shortcut!
Do
OUTA[noparse][[/noparse] 8..11] ~~ .... some loop .... DIRA[noparse][[/noparse] 8..11]~ DIRA[noparse][[/noparse] index]~~
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)