[help]how to initialize a port of at89c2051 when using 4x3 keypad..

Discussion in 'Embedded Systems and Microcontrollers' started by romel_emperado, Oct 2, 2010.

  1. romel_emperado

    Thread Starter New Member

    Jul 23, 2009
    5
    0
    hi all, i just want to ask a little thing about this blog i found on the net..
    it is all about 4X3 Matrix-Keypad interfacing.

    my concern is how to initialize an input in c program with keil to have this function.

    this is the article that i found in the net.


    if i want to use port 1 as my input then i would declare P1=0xFF to initialize P1.0 to P1.7 as my input then How would i get a low or zero input if let say i want to press keypad #1?

    how would i get this input like in the table below?
    [​IMG]
     
  2. mushin123

    New Member

    Aug 28, 2010
    13
    0
  3. romel_emperado

    Thread Starter New Member

    Jul 23, 2009
    5
    0
    helo i have now the code from a friend with LCD display.. my problem is i want to have a password then when the password is correct p3.4 will go high and the key # is the enter in the keypad..

    heres the code:


     
  4. nikhiljain

    New Member

    Aug 26, 2010
    3
    0
    this is what you're looking for: code lock with password

    same thing as ur requirement.. take the code from here and change the desired output pins accordingly!!
     
Loading...