Samsung S5PC110 Manual page 1942

Risc microprocessor
Table of Contents

Advertisement

S5PC110_UM
8 KEYPAD INTERFACE
8.5 KEYPAD SCANNING PROCEDURE
At initial state, all column lines (outputs) are low level. But column data output tri-state enable bits are all high, so,
when the tri-state enable mode is not used, these bits should be written to zeros. If state is no key pressed, all row
lines (inputs) are high (used pull-up pads). If any key is pressed, the corresponding row and column lines are
shortened together and a low level is driven on the corresponding row line, generating a keypad interrupt. The
CPU (software) outputs a LOW on one column line and Hi-Z on the others by setting KEYIFCOLEN and
KEYIFCOL fields in KEYIFCOL register. Each write time, the CPU reads the value of the KEYIFROW register and
detects if one key of the corresponding column line is pressed. Because the KEYIF has pull-up PAD, each
KEYIFROW bits will be read as HIGH, except pressed ROW bit. When the scanning procedure ends, the pressed
key (one or more) can be detected.
input : pull-up (PAD)
S5PC110X
S5PC110X
SCAN_X[0]
SCAN_X[0]
SCAN_X[13]
SCAN_X[13]
SCAN_Y[0]
SCAN_Y[0]
SCAN_Y[7]
SCAN_Y[7]
Figure 8-3
Keypad Scanning Procedure
8-5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents