This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

problem in keypad of 8051

i m using micro-controller p89v51rd2
in that i m trying program of keypad which out put show on 7 segment but in that when i m hold the key than out put will be show but after relished the key out put dont show or say my out put was not hold.
so any one tell me how to hold my out put.

Parents
  • Epic failure.

    There is no loop in your program. It will run for a couple of microseconds and then end - what will it do then?

    And have you really, really, really tried to run your tiny program once using pen and paper? Does it really decode an XY keyboard matrix?

    For each combination of row lines driven, you get 4 bits (16 patterns) on the column lines. But your code is only testing one column at a time. What if two column bits are active?

    Your processor allows you to control all row lines with one write, but you always make four bit writes.

    And you always assumes that the column signals are stable and instantly available after you change the row signals.

    Back to the drawing board. You have too many errors for expecting the forum to write your program for you. Your teacher is expecting _you_ to do this assignment.

Reply
  • Epic failure.

    There is no loop in your program. It will run for a couple of microseconds and then end - what will it do then?

    And have you really, really, really tried to run your tiny program once using pen and paper? Does it really decode an XY keyboard matrix?

    For each combination of row lines driven, you get 4 bits (16 patterns) on the column lines. But your code is only testing one column at a time. What if two column bits are active?

    Your processor allows you to control all row lines with one write, but you always make four bit writes.

    And you always assumes that the column signals are stable and instantly available after you change the row signals.

    Back to the drawing board. You have too many errors for expecting the forum to write your program for you. Your teacher is expecting _you_ to do this assignment.

Children