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 in C 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 got some information,but still i have a confusion with it.i am sharing the link here for you all.

Read the datasheet for the 74C922 given below,

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 appreciated

regards
john
 

Hello
Are you going to use it with aid of a microcontroller ?? Which type ?? and what C compiler are you going to use ??
Specify and i may help you
BR
 

**broken link removed**

Instead reading from PortA of 8255 you can read from your microcontroller port.

john2020 said:
But how do impliment the code to tell it to look for the data there?
And do you need a ASCII table as well?

Just look at the KeyPress(int PortA) function
 

hi silvio

i was trying to read Port A of 8255, 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.i'll try the link you had send me.

regards
john
 

Hi John,

You didnt specify the type of HW you are using, if the keypad connected directly to the 8255 device (in case you need many IO ports) than you just have to address the microcontroler to the 8255 port, read its Data (you have to enable the 74C922 device first). the data that you will get will be a Hex number according to the pressed "key".

Ben.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top