19
EasyPIC6 Development System
MikroElektronika
page
14.0. Keypads
There are two keypads provided on the EasyPIC6 development system. These are keypad
4x4
and keypad
MENU
. Keypad
4x4
is a standard
alphanumeric keypad connected to the microcontroller PORTD. The performance of such a keypad is based on the ‘scan and sense’ principle
ZKHUHWKH5'5'5'DQG5'SLQVDUHFRQ¿JXUHGDVLQSXWVFRQQHFWHGWRSXOOGRZQUHVLVWRUV7KH5'5'5'DQG5'SLQVDUH
FRQ¿JXUHGDVKLJKOHYHOYROWDJHRXWSXWV3UHVVLQJDQ\EXWWRQZLOOFDXVHDORJLFRQHWREHDSSOLHGWRLQSXWSLQV3XVKEXWWRQGHWHFWLRQLV
performed from within software. For example, pressing button ‘6’ will cause a logic one (1) to appear on the RD2 pin. In order to determine
which of the push buttons is pressed, a logic one (1) is applied to each of the following output pins RD4, RD5, RD6 and RD7.
Keypad
MENU
buttons are connected in a similar way to the PORTA buttons. The only difference is in the button arrangement. The keypad
MENU buttons are arranged so as to provide easy navigation through menus.
R58
220R
VCC-MCU
J17
J24
VCC-
MCU
VCC-MCU
X1
8MHz
C6
22pF
C7
22pF
PICxxxx
OSC2
RC0
RC1
RC2
RC3
RD0
RD1
OSC1
GND
GND
RD7
RD6
RD5
RD4
RC7
RC6
RC5
RC4
RD3
RD2
VCC
MCLR
RA0
RA1
RA2
RA3
RA4
RA5
RE0
RE1
RE2
VCC
RB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
DIP40
BAT43
Side view
A
K
T37
T38
T39
T40
T45
T44
T43
T46
T50
T47
T48
T49
T53
T52
T51
T42
RD1
RD0
RD0
RD1
RD2
RD3
RD4
RD5
RD6
RD7
D8
D9
D10
D11
RD2
RD3
RD4
RD5
RD6
RD7
R59
R60
R61
R62
220R
220R
220R
220R
T54
T55
T56
T57
T59
T58
RA0
RA1
RA2
RA3
RA4
RA5
VCC-MCU
J4
SW4
RN4
8x10K
Figure 14-4
: Keypads (4x4 and MENU) and microcontroller connection schematic
Jumper J17 is
in the pull-up
position. Pins
5'5'
RD2 and RD3
are connected
to pull-down
resistors through
DIP switch SW4
)LJXUH
Keypad 4x4
)LJXUH
Keypad MENU
)LJXUH
Keypad 4x4 performance