Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Programming a matrix keypad and an LCD

Status
Not open for further replies.

Tuhin

Newbie level 2
Joined
Mar 3, 2005
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,316
x-y matrix keypad

hi everyone,
i've been trying to program a matrix keypad and an LCD using AT89C52 microcontroller.i am finding very cumbersome to program a keypad and LCD simultaneously. My questions are as follows:-

1)For every key pressed once, do i have to store the decode logic in a register?like i mean if i wan't to get a numeric value "90" from the user, the two keys will be pressed once and each time i'll have to store them individually in a register. Then how do i go about decoding those two register values to get "90" as a number finally?

2)Programming a keyboard using National semiconductor MM74C923 16,20 key encoder seems to be easier, but thereare 5 outputs from the encoder to the microcontroller for a 20 key encoder. Now, how do i interpret those outputs. The data sheet is ambigious. plz help!!!

3)While entering data, how do i display it simultaneously on a LCD and how do i program for function key on the matrix keypad for instance "Enter" and "delete" keys?
 

lcd with keypad programming

Will you be using assembly or C? If C, it is an easy routine to do such task.

Just read the combination given by the matrix, and you know what is its keypad value, and store it BCD or ASCII for easy decoding.

Read the datasheet again if you are confused.

The microcontoller is fast enough for you not to notice the lag between encoding and displaying.
 

    V

    Points: 2
    Helpful Answer Positive Rating
how to use mm74c923

1)For every key pressed once, do i have to store the decode logic in a register?like i mean if i wan't to get a numeric value "90" from the user, the two keys will be pressed once and each time i'll have to store them individually in a register. Then how do i go about decoding those two register values to get "90" as a number finally?
In standard "calculator-type" operation the end-of-number is confirmed by pressing = , enter or something similar. In your case you will have to store these digits in registers and then, after the confirmation key is pressed convert these registers into HEX or BIN number for further processing ..
2)Programming a keyboard using National semiconductor MM74C923 16,20 key encoder seems to be easier, but thereare 5 outputs from the encoder to the microcontroller for a 20 key encoder. Now, how do i interpret those outputs. The data sheet is ambigious. plz help!!!
In the data sheet there is the TRUTH TABLE where you have a unique combination of the ABCDE outputs with relation to a key pressed on the x-y matrix. You will need to use a look-up table to identify a key.
3)While entering data, how do i display it simultaneously on a LCD and how do i program for function key on the matrix keypad for instance "Enter" and "delete" keys?
As was said in the previous reply the micro is fast enough to read the keypad and display on the LCD. Just write your code and don't worry .. some µs delay between pressing a key and seeing it displayed on the LCD won't be visible for you ..

Added after 19 minutes:

8051 + LCD + Keypad example you can find here:

**broken link removed**
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top