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

    Updated: Oct 26, 2024
    Views: 898
    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!
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • rasu3045

    MemberFeb 26, 2010

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • shahrul

    MemberMar 4, 2010

    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.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register