4X4 matrix keypad question

Discussion in 'The Projects Forum' started by Lilian23, Oct 7, 2008.

  1. Lilian23

    Thread Starter Member

    Oct 7, 2008
    Hi! :)

    I hope anyone can help me with this issue. I have a 4x4 keypad connected with a decoder (MM94C922) and the manner in which is connected is exactly as pictured on the datasheet on page 8. The only data sheet that I have from the keypad is their pinouts (data sheet attached).

    I've connected pin 1 from keypad to pin2 of the decoder
    pin 2 '' '' '' pin3 '' '' ''
    pin 3 pin7
    pin 4 pin4
    pin 5 pin8
    pin 6 pin10
    pin 7 pin11
    pin 8 pin1

    finally i connected pin 9 of decoder to ground and Vcc to 3.3V. The capacitors I put .1uF for oscillator (pin5) and 22nF for keypad bounce mask (pin 6).

    The problem that I am having is that I'm measuring the voltage out of the decoder outputs and it seems that the voltages are bouncing all over the place..it only remains stable when I hold down a key but when I just press it, depending on the key, the output goes to 3 Volts and just oscillates down to 200mV and at one point jumps to 1.2V. These outputs are to be connected to a PIC, but according to the software it is detecting that the first two numbers of columns 1 and 3 are giving same 4 binary input :confused: The same goes for the first two numbers of columns 2 and 4. :(

    I'm confused I thought the encoder was suppose to output binary numbers from 0000 to 1111 where each key holds a respective binary representation. Please help me
  2. SgtWookie


    Jul 17, 2007
    The oscillator capacitor (pin 5) should be 1/10 the size of the keyboard mask capacitor (pin 6). Conversely, the keyboard mask capacitor should be 10x the size of the oscillator capacitor.

    Using your 22nF cap for the oscillator will give you about a 3kHz oscillator frequency.
    You'll need an 0.22uF cap for the keyboard mask. The 0.1uF won't be large enough.
  3. Lilian23

    Thread Starter Member

    Oct 7, 2008
    hi and thank you SgtWookie for your tip. Unfortunately it did not do the trick, I put those capacitors as you suggested and I know that the bounce capacitor is suppose to be 10 times as big as the oscillator one (as said on data sheet) and like I said it didn't do the trick. When I press 1 on keypad it outputs 0100 which is same for key 4, 3, and 6 :(

    I also used .01uF for Osc and .1uF for bounce and not good. How am I suppose to know which frequency it is suppose to scan at?

    oh, I found this equation too that I suppose I had to use =P

    T1 = T2 = RC, T3 = 0.7 RC, where R = 10k and C is external capacitor at KBM(key bounce mask) input. I guess I have to measure the time when I press button on keypad with oscilloscope?

    much thanks