Sign in

username:

password:



Not a member?

Search m68hc11



Search tips

Subscribe to m68hc11



m68hc11 by Keywords

27c256 | 4K81H | 68HC11A1 | 68HC11P1 | 68hc24 | 68HC711E9 | 68HC811 | 8255 | A2D | ADC | ADC12138 | Am85C30 | BRCLR | Buffalo | CMOS | EEPROM | EPROM | Ethernet | EVB | EVBU | HC11E1 | HC11E9 | HC711E9 | Horray | ImageCraft | IRQ | Keypad | LCD | MC68HC11D0FN | MC68HC11E1CFU3 | MC68HC11F1 | MC68HC711E9 | MC68HC711E9CFN2 | Microcore11 | Microstamp11 | Minikit | NVRAM | PSD | PSD8xx | PSD9xx | PT1000 | RS232 | RTS | RXD | SPI | SRAM | TXD | Watchdogs | XIRQ


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | | Keypad decoder


Advertise Here

Keypad decoder - Frank Valkenborgh - Mar 19 3:23:00 2003

Hi all,

Has anyone some samplecode to decode a keypad?
Or to chack a pincode?

Thanks,

Frank

[Non-text portions of this message have been removed]





(You need to be a member of m68hc11 -- send a blank email to m68hc11-subscribe@yahoogroups.com )


Re: Keypad decoder - Author Unknown - Mar 19 7:02:00 2003

In a message dated 3/19/03 3:24:31 AM Eastern Standard Time,
writes:

> Has anyone some samplecode to decode a keypad?
>
I've read a few keypads. I can describe the algorithm, but you asked for
sample code. How about telling me how many rows, how many columns, and what
pins in what ports they are hooked to? THEN you can start writing code..... [Non-text portions of this message have been removed]




(You need to be a member of m68hc11 -- send a blank email to m68hc11-subscribe@yahoogroups.com )

Re: Keypad decoder - Robert Smith - Mar 19 7:06:00 2003

Frank --

Details vary depending on how you choose to drive and sample your keypad and
what its topology is.

For a basic crossbar style keypad driven by a direct I/O pin interface the
basic process is:

1. Drive each column in turn.

2. Sample the row outputs to see if any row-column intersection is active.
You must also check for multiple rows activated by having two buttons
depressed.

3. Don't forget to debounce the keypresses.

All of this must be done while scanning the keypad as fast as possible to
assure a rapid response time.

A standard 4 x 4 keypad will require 8 I/O ports/pins, four output pins for
column drivers and four input pins for row sampling.

I drive mine using the SPI in interrupt driven mode but it is a wee bit slow
to suit me. My clients wants to add a second control panel to his system so
I am thinking of droping a 68HC08 on the keypad/LCD panel to handle the
overhead and communicate with the system control processor via SCI or SPI.

Other methods include using a keypad decoder IC (See Nat Semi, something
like the 74HC922/3 I think???).

You can also dedicate a small MCU such as the MC68HC908QT(Y) which has built
in keypad interrupts.

The final answer is, "It depends" (mostly on what your hardware interface
looks like).

"> Or to chack a pincode?"

Is that a typo?

Happy decoding, Bob Smith
--- Avoid computer viruses, Practice safe hex ---

-- Specializing in small, cost effective
embedded control systems --

http://www.smithmachineworks.com/embedprod.html Robert L. (Bob) Smith
Smith Machine Works, Inc.
9900 Lumlay Road
Richmond, VA 23236 804/745-1065
----- Original Message -----
From: "Frank Valkenborgh" <>
To: <>
Sent: Wednesday, March 19, 2003 3:23 AM
Subject: [m68HC11] Keypad decoder > Hi all,
>
> Has anyone some samplecode to decode a keypad?
> Or to chack a pincode?
>
> Thanks,
>
> Frank
>
> [Non-text portions of this message have been removed] >
> To unsubscribe from this group, send an email to:





(You need to be a member of m68hc11 -- send a blank email to m68hc11-subscribe@yahoogroups.com )

Re: Keypad decoder - Frank Valkenborgh - Mar 19 7:18:00 2003

Ok, you are right.

I want to use a simple 4x4 keypad. 4 rows 4 columns.
I know how to decode, but I also want to know if what I'm doing is good. ;-)

Actually it is a type mistake ..it's to check the pincode.

Thanks in advance,
and allready thanks to respond to my question.

Frank
----- Original Message -----
From:
To:
Sent: Wednesday, March 19, 2003 1:02 PM
Subject: Re: [m68HC11] Keypad decoder In a message dated 3/19/03 3:24:31 AM Eastern Standard Time,
writes:

> Has anyone some samplecode to decode a keypad?
>
I've read a few keypads. I can describe the algorithm, but you asked for
sample code. How about telling me how many rows, how many columns, and what
pins in what ports they are hooked to? THEN you can start writing code..... [Non-text portions of this message have been removed]
To unsubscribe from this group, send an email to:

[Non-text portions of this message have been removed]




(You need to be a member of m68hc11 -- send a blank email to m68hc11-subscribe@yahoogroups.com )