EM78808
8-bit Micro-controller
Set port7(3:0) input
set IOC page1
(IOC7 (7:0) =
(BS R3,IOC_PAGE)
“0x0f ” )
port7 pull high
set IOC page0
(IOCA=0x0f)
(BC R3,IOC_PAGE)
enable key scan signal (RE bit4=1)
set INT0 interrupt
ENI
N
Interrupt occur?
Y
Enable main clock (Normal mode)
program delay
Execution
key function
enable RE(6) key check
Read port7 ( column key )
disable RE(6) key check
set strobe function
enable RE (5) keystrobe
program delay
read IOC7,IOC8 (row key)
Get the key location
Fig.16 key scan flow by interrupt trigger
PAGE1 (Data RAM address8 ~ address12)
7
6
5
4
3
2
1
0
DEDD
DED
RAMA12 RAMA11 RAMA10
RAMA9
RAMA8
Bit 0~Bit 4(RAMA8~RAMA12) : Data RAM address (address8 to address12) for RAM reading.
Bit 5 : unused
Bit 6 (DED) : Interrupt flag of Differential Energy Detector (DED) output data
Bit 7 (DEDD) : Output data of Differential Energy Detector (DED) If input signal from EGIN1 and EGIN2 pin
to Differential Energy Detector is over the threshold level setting at IOCE PAGE 2 bit 0 (DEDTHD), the
DED will extract the zero-crossing pulse waveform corresponding to input signal.
RF (Interrupt flags)
7
6
5
4
3
2
1
0
RBF/SDT FSK/CW
INT2
INT1
INT0
CNT2
CNT1
TCIF
"1" means interrupt request, "0" means non-interrupt
Bit 0(TCIF) : TCC timer overflow interrupt flag
Set when TCC timer overflows .
Bit 1(CNT1) : Counter1 timer overflow interrupt flag
Set when counter1 timer overflows.
Bit 2(CNT2) : Counter2 timer overflow interrupt flag
Set when counter2 timer overflows .
______________________________________________________________________________________________________________________________________________________
* This specification is subject to change without notice.
8/1/2004 (V3.1)
28