How does a 4x4 Keypad work with PIC 16f877A?

I know the PIC scans the row(input) and column(output) of the keypad. But how do they know which key is pressed?
Can you explain as detail as possible with this drawing? #-Link-Snipped-#

thank you!

Replies

  • rasu3045
    rasu3045
    Hi
    Referred to your circuit
    if B0 is high
    When you pressed Sw1,b4 is high pic input is 0,
    When you pressed Sw2,b5 is high pic refers input is 1,sw3=2;sw4=3
    If B1 is high
    sw5=4; sw6=5; sw7=6; sw8=7.
    If B2 is high
    sw9=8; sw10=9; sw11=A; sw12=B
    If B3 is high
    sw13=c; sw14=D; sw15=E; sw16=f.
  • shahrul
    shahrul
    I suggest you to put pull-down resistor at B4-B8 to make that pin low state.
    The explanation, to make row scanning, you activate one row at one time.
    Because of B4-B8 is pull-down, you activate with high signal.
    Ex, ROW1; B0=1, B1=0, B2=0, B3=0
    Then reads B4-B8. If B4 is high, SW1 is pressed; If B5 is high, SW2 is pressed and so on.

You are reading an archived discussion.

Related Posts

im BSIT course regarding this section i already seen the topics but could you give me some fresh topics about VB/.NET or PHP for my final projects....😔😔 help me
Hi. i a, a third yr comp engineering student. My seminar topic is Encrypted Text Chat Using Bluetooth... It would be appreciable if anyone could seriously help me..
Hi how to calibrate thermocouple and RTD
Hi mates! I want to project for engineering.Please give ideas about robotics and other familiar project
Linked below is an introduction to Principal Components Analysis (PCA), with illustrations given in MATLAB. PCA is a powerful statistical technique which can be used in data mining / pattern...