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.

Interfacing 89c2051 to 4x4 matrix keypad

Status
Not open for further replies.

microlab

Full Member level 5
Joined
Mar 4, 2006
Messages
309
Helped
44
Reputation
88
Reaction score
35
Trophy points
1,308
Activity points
3,253
hai all

i am intrested in interfacing the 4x4 matrix keypad to the 89c2051
the problrm here is i can do it using two ports as shown in mazidi
but i am using port 3 for some other purpose
is it possible to interface the 4x4 matrix keyboard to the port1
can anyone please post the assembly code for that?

thanking you all


ml
 

Re: 89c2051 + key board

hai all

please help

thanking you

ml
 

Re: 89c2051 + key board

well a hex keypad (4x4) will give you an 8bit code. though if you use a 74C922 decoder you effectively cut it down to 4bits (0 to 16)!!! though you need to connect the decoder to an interupt line. Its all pretty easy. no source code though, I discovered the beauty of C a few years back!

Hope this helps
 

Re: 89c2051 + key board

Code is here:

just define/choose your own pins as ROWS and COLUMNS ..

Regards,
IanP
 

89c2051 + key board

its simple dude,

just use 4 pins for coloumns and 4 pins for rows.
just use a polling algorithm to just do:

make one row high, poll for all other coloumns for high result, do this for all rows.
all the best
 

Re: 89c2051 + key board

Adding an external PCF8574 you can solve the problem.

See this example.

**broken link removed**
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top