Help, designing a keypad matrix decoder

Discussion in 'Homework Help' started by fyanardi, Aug 15, 2005.

  1. fyanardi

    Thread Starter New Member

    Aug 15, 2005
    Hi all,

    I'm asked to design a 4x4 matrix keypad decoder. As I understand it has 8 inputs, R1-R4 from keypad matrix and C1-C4 from a 4 bit ring counter. But if I want to get the output expression, I have to work for 8 variable inputs, aren't I? It really gives me a headache till now. Are there any simpler methods that I can use to obtain the expression? Or any other method to create the matrix decoder?

    Thanks for all your help,

    Fredy Yanardi
  2. pebe

    AAC Fanatic!

    Oct 11, 2004
    Hi Fredy,
    A 4 x 4 keypad uses 4 input and 4 output lines. These would correspond to your R1 to R4 as inputs and C1 to C4 as outputs from the ring counter.

    Imagine 4 wires placed vertically, and 4 wires placed horizontally crossing them. Call the vertical wires C1 to C4, and the horizontal wires A1 to A4. A push button is placed at each point where wires cross. You will have 16 pushbuttons with connections

    C1 to R1 C2 to R1 C3 to R1 C4 to R1
    C1 - R2 C2 – R2 C3 – R2 C4 – R2
    C1 – R3 C2 – R3 C3 – R3 C4 – R3
    C1 – R4 C2 – R4 C3 – R4 C4 – R4

    To establish which key is being pressed, each key is checked like this. The ring counter is clocked to set C1 wire high, leaving C2 to C4 low.

    The 4 wires R1 to R4 are now checked in turn. If one of them, eg. R2, is high then the key C1/R2 was pressed.

    If none of the R wires is high, the ring counter is advanced to put C2 high and other C’s low. R1 to R4 are checked again. The sequence is repeated with C3 high, then C4 high until all 16 crosspoints have been checked.

    This is known as ‘polling’ and this individual checking of the 16 keys would be repeated in a continuous sequence.

    I hope this explanation will help you arrive at an expression for the action.
  3. fyanardi

    Thread Starter New Member

    Aug 15, 2005
    Hi pebe,

    Thanks for your explanation, its very helpful. Finally I got the expressions by observing that for each digit there is only one digit is high in R1-R2 and also one digit is C1-C4, So I express them in Sum Of Product. Every expression in ABCD contains 8 products. Well, it requires many and gates, but I can't get any other methods. This afternoon I have successfully tested it in my Lab.

    Thanks and regards,

    Fredy Yanardi
  4. yvonnezoe

    New Member

    Oct 30, 2008
    thank you so much for your explanation! it does help me to understand my lecture boundnotes =D