| Author |
Message |
sky524810
Joined: 05 Nov 2006 Posts: 5
|
05 Nov 2006 9:54 Help !! I want to interface 8051 with the 4x4 matrix keypad |
|
|
|
|
I want to ask how to write a program with assembly language to scans my keyboard and displays any character pressed by the user on the LCD.
For example, displays keys 0-9 as numbers 0-9 on the LCD while keys 10,11,12,13,14,15 are displayed as letters A,B,C,D,E and F, respectively.
I use uVision program.
Help!!
Thanks for reading my article!
|
|
| Back to top |
|
 |
Google AdSense

|
05 Nov 2006 9:54 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
IanP
Joined: 05 Oct 2004 Posts: 6490 Helped: 1542 Location: West Coast
|
05 Nov 2006 10:16 Re: Help !! I want to interface 8051 with the 4x4 matrix key |
|
|
|
|
Take a look at this example:
http://www.8052.com/codelib/4x4key%20scan
Instead of displaying the result on an LCD panel it sends it out in ASCII format through the serial port ..
Regards,
IanP
|
|
| Back to top |
|
 |
sky524810
Joined: 05 Nov 2006 Posts: 5
|
05 Nov 2006 10:45 Re: Help !! I want to interface 8051 with the 4x4 matrix key |
|
|
|
|
thanks for your reply
I would like to ask may I use this program directly to 8051
|
|
| Back to top |
|
 |
IanP
Joined: 05 Oct 2004 Posts: 6490 Helped: 1542 Location: West Coast
|
05 Nov 2006 11:02 Re: Help !! I want to interface 8051 with the 4x4 matrix key |
|
|
|
|
This code has been written for the AT89C2051 which is reduced-pin version of the 8051 microcontroller ..
It can be DIRECTLY use with any 8051-derivative ..
Just check Input/Output pin configuration/deffinition .. that's all ..
Inputs:
| Code: |
ROW0 EQU P1.0
ROW1 EQU P1.1
ROW2 EQU P1.2
ROW3 EQU P1.3
CLMN0 EQU P1.7
CLMN1 EQU P1.6
CLMN2 EQU P1.5
CLMN3 EQU P1.4 |
Output:
| Code: |
| ALERT EQU P3.7 ;goes low when any key's pressed |
Regards,
IanP
|
|
| Back to top |
|
 |
sky524810
Joined: 05 Nov 2006 Posts: 5
|
05 Nov 2006 11:08 Re: Help !! I want to interface 8051 with the 4x4 matrix key |
|
|
|
|
| Thanks
|
|
| Back to top |
|
 |
eng/mahmoud
Joined: 04 Oct 2006 Posts: 10
|
09 Nov 2006 13:12 Re: Help !! I want to interface 8051 with the 4x4 matrix key |
|
|
|
|
i will help u my friend read this file
|
|
| Back to top |
|
 |