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.

circuit to scan 4x4 keypad

Status
Not open for further replies.

Build-A-Burger

Member level 4
Joined
Oct 27, 2010
Messages
77
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Wyoming
Activity points
1,983
I want to build a circuit that scans my 4x4 keypad using a binary counter and a '138 to generate the row scan and then read the results with a '374 which is read by the processor. The counter is clocked with a 555 timer. The counter will have to reset after it reaches 3. The resistors are pull-down. What would I use as a counter? A '161? And how would I generate an interrupt for the processor? Also wondering if there's some way to incorporate a debounce.
keypad.JPG
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
20,541
Helped
4,463
Reputation
8,935
Reaction score
4,497
Trophy points
1,393
Activity points
135,798
Hi,

Usually tjus all is done with a simple microcontroller. A one chip solution.

Maybe your processor could do the job.

Tell us more about the pfocessor. What is it for?

Klaus
 

Build-A-Burger

Member level 4
Joined
Oct 27, 2010
Messages
77
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Wyoming
Activity points
1,983
The processor is a TS-5500 SBC from Technologic Systems and I have a pc104 daughter card which gives me some extra io ports which I'm using to control relays and read switches. Since I have extra IO ports on the pc104 card I can have 4 bits send a scan and the other 4 bits poll for a keypress. Now that I think of it, I'm not really saving any io ports. I guess it would be worth the trouble (just barely) since I don't have to do a scan and check for a keypress every so many milliseonds. The SBC card is running uCOS-II on top of DOS. I thought one thing I could do is move the scan task up in priority only after an initial keypress to save on processor time.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
20,541
Helped
4,463
Reputation
8,935
Reaction score
4,497
Trophy points
1,393
Activity points
135,798
Hi,

I think a scan every 20ms should be enough not to miss even a very short keypress.

*****
Or you can improve:
It seems you want to activate a row by putting sending high to it.
Then a pressed key in that row gives a high at the relating column.
As long as no key is pressed every column is low.

When idle = waiting for a key press, you could activate all rows and set all columns to generate an interrupt when high.
So you don't need to poll all the time, but wait until a column interrupt is generated, Then scan the rows independently as usual.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top