> From: Wing Kent Kwan > To: PICLIST@MITVMA.MIT.EDU > Subject: how can I uses 5 cpu I/O pin for 16 keys input? > Date: 25 March, 2000 16:47 > > how can I only uses 5 cpu I/O pin for 16 keyborad keys input? > THANK!!!!!!! This is my first posting to the PICLIST so forgive me if something goes wrong... This might work, but the decoding is somewhat complicated. Can't decode simultaneous keypresses but can detect (I think) and ignore them which is not so bad. Use proportional font when viewing. 4 I/O 16 keys 6 x D 4 x R Pin1 Pin2 Pin3 Pin4 O O O O | | | | ____ | D ____ | D ____ | D ____ | ____ +Vcc O--o o--o--|<|--o o--o--|<|--o o--o--|<|--o o--o--o o--O +Vcc | | | | | ____ | ____ | ____ | o-------o o--o-------o o--o-------o o--o | | | | | D | ____ | | ____ o-----|<|-----|----o o-----o-------------|--o o--O +Vcc | | | | | | ____ | | o-------------|----o o-----o | | | | | | D | | ____ | o-----|<|-----|-------------|----o o-----o | | | | | | | ____ | o-------------|-------------|----o o-----o | | | | ____ | | D | ____ | +Vcc O--o o--|-------------o-----|<|-----|----o o-----o | | | | | | | ____ | | o-------------|----o o-----o | | | | | | | | | | | | R | | R | | R | | R | | | | | | | | | | | | | | --- --- --- ---