Datasheet

FS98O22
Rev. 1.6 54/146
6.1.1. Timer module interrupt
Table 6-2 timer module interrupt register table
Address Name
Referenced
Section
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Value on Power on
Reset
06H INTF 3/6/7/9/10/1
1
TMIF -- -- -- --
00000000
07H INTE 3/6/7/9/10/1
1
GIE TMIE -- -- -- --
00000000
0EH TMOUT 6.1 TMOUT [7:0] 00000000
0FH TMCON 6.1 TRST TMEN INS [2:0] 1uuu0000
Operation:
1. Operate as Section 5.7 to setup the TMCLK for Timer module input
2. Setup the INS[2:0] to select timer interrupt source. Please see Table 6-3.
3. Set the TMIE and GIE register flags to enable the Timer interrupt.
4. Set the TMEN register flag to enable Timer module 8-bit counter.
5. Clear the TRST register flag to reset the Timer module 8-bit counter
6. When time out event happens, TMIF register flag will reset itself, and the program counter will reset to
0x04H
Table 6-3 timer selection table
INS[2:0] interrupt source Time at TMCLK=1024Hz (ECK/32)
000 TMOUT[0] 1/128 sec.
001 TMOUT[1] 1/64 sec.
010 TMOUT[2] 1/32 sec.
011 TMOUT[3] 1/16 sec.
100 TMOUT[4] 1/8 sec.
101 TMOUT[5] 1/4 sec.
110 TMOUT[6] 1/2 sec.
111 TMOUT[7] 1 sec.
FORTUNE'
Properties
For Reference Only