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.

keyboard interrupts in AT89C51

Status
Not open for further replies.

vreg

Member level 4
Member level 4
Joined
Oct 16, 2012
Messages
70
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Visit site
Activity points
1,935
Hi,
I want to interface a 4x3 keypad to AT89C51 microcontroller using interrupts (not polling).

Tmp.JPG

My idea is to use the pins p1.5 - p1.7 as interrupt inputs and using the ports p1.0 - p1.3 to detect the exact key pressed (by setting them first as 0111, then 1011, etc... till the corresponding row is found) after getting the interrupt from the column pins.
However, I am not sure how to write the interrupt service routine to do this. The vector address for keyboard interrupts is given in the datasheet as 003Bh.
Please help on how to write the code (preferably assembly).
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top