Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Atmel AT89C51 Keyboard Interface

Status
Not open for further replies.

joshr

New Member
I am looking for a little help from somebody that has experience connecting a matrix style keypad to the Keyboard IF on the AT89C51.

I have a 4x4 matrix style keypad and I am not quite sure the proper method of connecting, debouncing and scanning for keypresses. My best assumption is to debounce the 4 row pins and connect them to the keyboard interrupts on Port1. Then I would leave the other 4 column pins bouncy and connect them to regular inputs. Upon interupt I would scan the inputs to see which key was pressed....

Is there a better method of interfacing with the keypad?
 
What Atmel said

Hello

You can use 4 bit of a port like port1 for 4 lines you pull alternately one after the other, and use the remaining 4 bit of the port1 with activated interrupt to scan the column. You can do the debounce with a timer activated in the keyboard interrupt routine.


Best regards
Michel Passemard
Atmel 8051 Technical Support

--
I wonder if I can leave the lines going into the interrupt bouncy?
 
89C51 keypad interface

this is a 4 x 4 interface with code. The code is in C and it includes debouncing.

I can't remember where I got this.
I hope this helps.
 

Attachments

  • 4x4_51.zip
    11.4 KB · Views: 1,659
Best Assembler

I've worked with this assembler. it is so clean . produces 2 files .lst file and the hex file. the simulator also i found it very very useful, though it is a demo version i used to seperate the codes into blocks and will execute it. Hence i recommend you all this assembler and simulator. the later is dos based but that's really fun with few keys as input.

Regards,
maha
 

Attachments

  • emily52.zip
    37.6 KB · Views: 841
  • metalink.zip
    113.2 KB · Views: 764
Dear All
Can anybody tell me to interface LCD 16pin (2 pin for back light) with AT89c2051 which is receiving serial data from pc and will display accordingly.
Pls do urgent....i will be too much gratefull ..
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top