
μ
PD17016, 17017
277
22.2.3 Key input control block and P0D port register
The key input control block detects the key input signals input to the P0D
3
/ADC
5
through P0D
0
/ADC
2
pins
in synchronization with key source signal output timing.
To output the key source signals from the LCD
15
/KS
15
through LCD
0
/KS
0
pins, therefore, the P0D
3
/ADC
5
through P0D
0
/ADC
2
pins are used as key input pins.
The key input data are read by the P0D port register (address 73H of BANK0) on the data memory.
Because the P0D
3
/ADC
5
through P0D
0
/ADC
2
pins are multiplexed with the A/D converter pins, care must be
exercised when using these pins as the A/D converter pins.
For details, refer to
22.5
.
22.3 Key Source Data Setting Block
22.3.1 Configuration of key source data setting block
Figure 22-3 shows the configuration of the key source data setting block.
Figure 22-3. Configuration of Key Source Data Setting Block
22.3.2 Function of key source data setting block
The key source data setting block sets the key source data to be output from the LCD
15
/KS
15
through LCD
0
/
KS
0
pins.
The key source data are set to the key source data register (KSR: peripheral address 42H) via the data buffer.
Each bit of the key source data register corresponds to the LCD
15
/KS
15
through LCD
0
/KS
0
pins, and sets the
key source data of each pin.
When “1” is set to a bit of the key source data register, the pin corresponding to this bit outputs a high level
as a key source signal; when the bit is reset to “0”, the corresponding pin outputs a low level.
For the output timing, refer to
22.4
.
The following subsections 22.3.3 explains the configuration and function of the key source data register.
Also refer to
Figure 21-6
in
21. LCD CONTROLLER/DRIVER
.
Data buffer (DBF)
0CH
DBF3
DBF2
Address
Symbol
Data
0DH
0EH
DBF1
0FH
DBF0
16
Peripheral address 42H
Key source data register
(KSR)
Key source data latch
M
S
B
L
S
B