Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

4x4 Switch Matrix Problems

Status
Not open for further replies.

pmn2002

Newbie level 6
Joined
Jul 8, 2002
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
17
Does anybody have aquick and easy solution for decoding a 4 row 4 column switch matrix.I've tried using logic etc but i can't find anything simple.I need a circuit that will indicate via led's which switch is being pressed.

Any ideas??
 

aglet1000

Junior Member level 2
Joined
May 29, 2002
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
172
4x4 switch matrix discussion

I dont have a circuit for you but I will discuss the problem.
You need a 4x4 switch matrix. right...

Vcc---|-------|-------|-------|------A0
| SW0 | SW1 | SW2 | SW3
Vcc---|-------|-------|-------|------A1
| SW4 | SW5 | SW6 | SW7
Vcc---|-------|-------|-------|------A2
| SW8 | SW9 | SWA | SWB
Vcc---|-------|-------|-------|------A3
| SWC | SWD | SWE | SWF
| | | |
| | | |
| | | |------B0
| | |------------B1
| |------------------B2
|------------------------B3

This keypad would work like this. We will cycle B0-B3 one line low at a time.
ie 1110
1101
1011
0111
As we do this we will check the A0-A3 lines if anyone of these goes low then we have a key pressed.

B0-B3 A0-A3 Switch
1110 1110 SW3
1101 SW7
1011 SWB
0111 SWF
1101 1110 SW2
1101 SW6
1011 SWA
0111 SWE
1011 1110 SW1
1101 SW5
1011 SW9
0111 SWD
0111 1110 SW0
1101 SW4
1011 SW8
0111 SWC

If none of the signals is low then no key is pressed. The simplest way to do this is with a micro processor since it can be programmed to do all of the decoding.

If this is not an option maybe a counter on the B0-B3 signals and a Decoder on the A0-A3. When the counter switches the decoder checks the inputs.

This is not 100% complete dicussion but should give you something
to start with.

I made this beautiful diagram and nothing....
 

gabby

Member level 5
Joined
Mar 18, 2002
Messages
94
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Location
Israel
Activity points
1,239
Hi
If you want easy complete solution you can use
74c922 or 74c923 (keyboard controller)

Or make it in a small uc or cpld and (prog debounce filter for it).

Best regards.
 

pmn2002

Newbie level 6
Joined
Jul 8, 2002
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
17
thanks for the help i'm going to use a micro and a seven segment display
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top