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.

Keypad program with encoder

Status
Not open for further replies.

john2020

Full Member level 5
Joined
Nov 13, 2005
Messages
292
Helped
12
Reputation
24
Reaction score
8
Trophy points
1,298
Activity points
4,911
Hi All

I'm looking for a keypad program in c that uses the 74c922 encoder chip. A 3x4 keypad is used. I'm really struggling with this. Can anyone help me? How do you wright the program so that the eprom can tell what keypad has been pressed according the encoder chip?



I have read the datasheet for the 74C922 here is the link,

https://www.fairchildsemi.com/ds/MM/MM74C922.pdf

You only have to supply 1 control signal to the chip, and receive 1 control signal from the chip, plus the 4 data bits that identify which key was pressed:

The DATA AVAILABLE output pin, surprisingly enough, tells you when there is data available (ie, a keypress) for you to read from the device;

The /OUTPUT ENABLE input pin enables the chip's outputs, so that you can read the data (ie, the keypress);

The A, B, C, D output pins identify which key was pressed, in accordance with the Truth Table shown on p2 of the data sheet.




But how do impliment the code to tell it to look for the data there?
And do you need a ASCII table as well? Any help would be greatly appreceated!
 

Try to use PIC16F84A. Its simple and you don't need extra chip for decoding keypad input. The MPU comes with 13 I/O lines, so there is much more room for multiplexed keypad inp uts.
 

Excerpt from data sheet:

Since all scanning has stopped, and all other Y
inputs are disabled, the second key is not recognized until
the first key is lifted and the key bounce circuitry has reset.

You'll feel soon the need to recognize when two or more keys are depressed in the same time. You can't manage with this "cheap ?" solution.

Even if :

A Data Available output goes to a high level when a valid keyboard entry has been made. The Data Available output returns to a low level when the entered key is released, even if another key is depressed. The Data Available will return high to indicate acceptance of the new key after a normal debounce period; this two-key roll-over is provided between any two switches.

Since you have allready a micro you better struggle to implement the scanning in micro.
 

hi all,

thanks for your suggestions.i will try them out.
 

i wrote a program in pic16f628a.but need keypad deboncing to read key again.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top