Docsity

University of Florida EEL 4744: Keypad Design and Implementation, Study notes of Microprocessors

Toggle sidebar
bg1
4-Jul-03—2:15 PM
1
1
University of Florida, EEL 4744 –File #??
© Drs. Schwartz & Arroyo
Keypad
EEL 4744
1
University of Florida, EEL 4744 –File #??
© Dr. Schwartz
EEL
4744 Keypad
Pin 4
Pin 2
Pin 7
Pin 6
Pin 5 Pin 3 Pin 1
1 2 3
654
7 8 9
#0* •Most keypads work the
same way
>Only the pin numbers vary
>Many ways to solve the
keypad problem
EEL 4744
2
University of Florida, EEL 4744 –File #??
© Dr. Schwartz
EEL
4744 Keypad Discussion
•The row (column) wires are pulled-up
•Search for a key a column at a time
>Output a low to pin 5 (high to pins 3 & 1)
and test keys in first column (pins 4, 2, 7, 6)
–If pin 4 reads low, then key 1 was pressed
–If pin 2 reads low, then key 4 was
pressed, etc.
–If none of the pins is low, go on
>Output low to pin 3 (pins 5 & 1 high)
>If a key is pressed, set the strobe for one
cycle only and wait for the key to be released
before scanning for the next key
•Remember that you must wait for a
pressed key to be released to move on
Pin 4
Pin 2
Pin 7
Pin 6
Pin
5Pin
3Pin
1
123
65
789
#0*
4
VCC
Output Port
INPUT PORT
1 2 3
4 5 6
7 8 9
* 0 #
5 3 1
7 6 5 4 3 2 1 0
4
2
7
6
4.7KΩ
pf3

Partial preview of the text

Download University of Florida EEL 4744: Keypad Design and Implementation and more Study notes Microprocessors in PDF only on Docsity!

University of Florida, EEL 4744 – File # ??

Keypad

EEL 4744

University of Florida, EEL 4744 © Dr. Schwartz – File # ?? 1

4744 EEL Keypad

Pin 4

Pin 2

Pin 7

Pin 6

Pin 5 Pin 3 Pin 1

  • 0 # • Most keypads work the same way

> Only the pin numbers vary

> Many ways to solve the

keypad problem

EEL 4744

University of Florida, EEL 4744 © Dr. Schwartz – File # ?? 2

4744 EEL Keypad Discussion

  • The row (column) wires are pulled- up
  • Search for a key a column at a time

    Output a low to pin 5 (high to pins 3 & 1) and test keys in first column (pins 4, 2, 7, 6) - If pin 4 reads low, then key 1 was pressed - If pin 2 reads low, then key 4 was pressed, etc. - If none of the pins is low, go on > Output low to pin 3 (pins 5 & 1 high) > If a key is pressed, set the strobe for one cycle only and wait for the key to be released before scanning for the next key

  • Remember that you must wait for a

pressed key to be released to move on

Pin 4 Pin 2 Pin 7 Pin 6

Pin 5

Pin 3

Pin 1

VCC

Output Port

INPUT PORT

1 2 3 4 5 6 7 8 9

  • 0 # 5 3 1

7 6 5 4 3 2 1 0

4 2 (^76)

4.7KΩ

University of Florida, EEL 4744 – File # ??

Keypad

EEL 4744

University of Florida, EEL 4744 © Dr. Schwartz – File # ?? 3

4744 EEL Keypad Discussion

  • Another technique (that I don’t like

much)

> Search for each key, stepping through

the keys:

  • Is the 1 pressed? If so, indicate the

1 is pressed and then wait until it is

not pressed; otherwise, check the

next key.

  • Is the 2 pressed? If so, indicate the

2 is pressed, …

  • etc.

Pin 4 Pin 2 Pin 7 Pin 6

Pin 5

Pin 3

Pin 1

VCC

Output Port

INPUT PORT

1 2 3 4 5 6 7 8 9

  • 0 # 5 3 1

7 6 5 4 3 2 1 0

24 (^76)

4.7KΩ

EEL 4744

University of Florida, EEL 4744 © Dr. Schwartz – File # ?? 4

4744 EEL

The End!