English
Language : 

HD66724 Datasheet, PDF (59/117 Pages) Hitachi Semiconductor – (Graphics LCD Controller/Driver with Key Scan Function)
HD66724/HD66725
Key Scan Control
The key matrix scanner senses and holds the key states at each rising edge of key strobe signals (KST) that
are output by the HD66724/HD66725. The key strobe signals are output as time-multiplexed signals from
KST0 to KST3. After passing through the key matrix, these strobe signals are used to sample the key state
of eight inputs KIN0 to KIN7, enabling up to 32 keys to be scanned.
The states of inputs KIN0 to KIN7 are sampled by key strobe signal KST0 and latched into the SCAN0
register. Similarly, the data sampled by strobe signals KST1 to KST3 is latched into the SCAN1 to SCAN3
registers, respectively. Key pressing is stored as 1 in these registers.
The generation cycle and pulse width of the key strobe signals depend on the operating frequency
(oscillation frequency) of the HD66724/HD66725 and the key scan cycle determined by the KF0 and KF1
bits. For example, when the operating frequency is 32 kHz and KF0 and KF1 are both 10, the generation
cycle is 4.0 ms and the pulse width is 1.0 ms. When the operating frequency (oscillation frequency) is
changed, the above generation cycle and the pulse width are changed in inverse proportion.
In order to compensate for the mechanical features of the keys, such as chattering and noise and for the
key-strobe generation cycle and the pulse width of the HD66724/HD66725, software should read the
scanned data two to three times in succession to obtain valid data. Multiple keypress combinations should
also be processed in the software.
Up to three keys can be pressed simultaneously. Note, however, that if the third key is pressed on the
intersection between the rows and columns of the first two keys pressed, incorrect data will be sampled. For
three-key input, the third key must be on a separate column or row.
The input pins KIN0 to KIN7 are pulled up to VCC with internal MOS transistors (see the Electrical
Characteristics section). External resistors may also be required to further pull the voltages up when the
internal pull-ups are insufficient for the desired noise margins or for a large key matrix.
KIN7 KIN6 KIN5 KIN4 KIN3 KIN2 KIN1 KIN0
SCAN0
SCAN1
SCAN2
SCAN3
D07 D06 D05 D04 D03 D02 D01 D00 (KST0 ↑)
D17 D16 D15 D14 D13 D12 D11 D10 (KST1 ↑)
D27 D26 D25 D24 D23 D22 D21 D20 (KST2 ↑)
D37 D36 D35 D34 D33 D32 D31 D30 (KST3 ↑)
KSD7 KSD6 KSD5 KSD4 KSD3 KSD2 KSD1 KSD0
Figure 26 Key Scan Register Configuration
59