![Sino Wealth SH69K55A Скачать руководство пользователя страница 40](http://html1.mh-extra.com/html/sino-wealth/sh69k55a/sh69k55a_manual_1283061040.webp)
SH69P55A/K55A
40
Note:
1. If key scan function is shared with LCD function, the LCD function must be selected as 4com, 6com or 8com. It is
important that if the LCD function is selected as 4com, PORTD must be selected as COM port (the LCD control register
$29 bit2 - 0 can be selected as ‘100’, ‘110’ and ‘111’). PORTA3 - 0, PORTF0 must be selected as SEG output (SEG
configuration register $2E bit2 - 0 can’t be ‘000’).
2. If key scan function is shared with LED function, the LED function must be selected as 4com, 5com or 6com (LED driver
duty control register $2B bit1 - 0 can be ‘01’, ‘10’ and ‘11’). PORTA3 - 0, PORTF0 must be selected as SEG output (SEG
configuration register $2E bit2 - 0 can’t be ‘000’).
3. In the correct mode, although the LCD or LED is turned off, the automatic key scan is also valid.
4. The key scanner would clear KEYNUM0 and KEYNUM1 flags at the beginning of the key scan process. KEYEND flag
would keep ‘1’ during the whole key scan process and it would be cleared at the end of the scan process. For instance in
1/4 duty mode KEYEND keeps ‘1’ during the working duty period and keeps ‘0’ during the rest 9 duty periods. KEYNUM0
and KEYNUM1 would be cleared at the beginning of the working duty period and would be set or cleared again according
to the key scan result. KEYNUM0 and KEYNUM1 would keep the key scan result for the rest 9 duty periods.
5. If and only if one key is pressed at the same time, the result of the key scan is valid; otherwise the result of key scan is
invalid.
In 1/4 duty mode, the waveforms of key scan when a key is pressed
LCD COM
LED COM
First Half Frame
Last Half Frame
Frame 1
Frame 2
Working Duty for
Key Scanner
KEYEND
KEYNUM0
KEYIF
Cleared by
software
Cleared by
hardware at
the beginning
Set by
hardware again
Set by
hardware
Keep '1' during the
whole key scan
process