OK, i'll take a look at that
Main Topics
Browse All TopicsI want to add a 4x4 keypad to a 16F877A, i've made the connections to the pins but I don't know how to decode/write the ASM code.
What I want to do is: when I press 3 on the keypad the PIC will scan the keypad and figure it out it was the '3' key and load it in a variable.
So far I wrote the code for:
; RB4 RB5 RB6 RB7
; COL1 COL2 COL3 COL4
; RB0 ROW1 1 2 3 A
;
; RB1 ROW2 4 5 6 B
;
; RB2 ROW3 7 8 9 C
;
; RB3 ROW4 * 0 # D
Setting the pins to the wires.
How to intercept the key pressed ?!
I couldn't find anything on the net that will explain the logistic or how is done step by step.
Could anyone help with a source code explained or some good documentation?
Thanks for your time!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
try:
http://www.sunrom.com/s-16
they have online support as well
Easy.
First of all, I suggest you use c rather (if you don't know asm)
You have 2 options:
option1: read the "interrupts" section spec of the pic. Implement a signal change interrupt.
option2: it is easier to just have an infinit loop (no interrupt) that scans the keyboard.
Note: I know from my experience that the fastest click of a button will change the signal for at least 40ms. so this is quite safe.
still you need either a hardware or a software debouncer.
Do it in software. It's much easier.
Business Accounts
Answer for Membership
by: jaime_olivaresPosted on 2007-12-05 at 23:23:45ID: 20417849
Have a look to this project: apers/PIC% 20- %20Digi tal%20Alar m%20Clock. pdf
http://www.jtcotton.info/p
it has an lcd and a 4x4 keypad with 16f877 microcontroller, including schematics and assembler code. You can extract the portion of your interest.