MC81F4x16
T0SCR
TIMER 0 STATUS AND CONROL REGISTER
00B0H
To enable the timer 0 match interrupt, you must set “1” to T0MIE(IENH.7).
When the timer 0 match interrupt sub-routine is serviced, the timer 0 match interrupt request flag bit,
T0MIR(IRQH.7), is automatically cleared.
To enable the timer 0 overflow interrupt, you must set “1” to T0OVIE(IENH.6).
When the timer 0 overflow interrupt sub-routine is serviced, the timer 0 overflow interrupt request flag
bit, T0OVIR(IRQH.6), is automatically cleared.
7
6
5
4
3
2
1
0
T0MOD
T0MS
T0CC
T0CS
T0SCR
Reset value: 00H
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
0: Two 8-bit timers mode (Timer 0/1)
1: One 16-bit timer mode (Timer 0)
00: Interval mode (T0O)
T0MOD
T0MS
Timer 0 mode Selection Bit
Timer 0 Mode Selection Bit
01: PWM mode (OVF and match
interrupt can occur)
1X: Capture mode (OVF can occur)
0: No effect
1: Clear the Timer 0 counter (When
write, automatically cleared “0” after
being cleared counter)
T0CC
Timer 0 Counter Clear Bit
0000: Counter stop
0001: Not available
0010: Not available
0011: Not available
0100: Not available
0101: External clock (EC0) rising edge
0110: External clock (EC0) falling edge
0111: fxt ( sub clock )
1000: fxx/2
T0CS
Timer 0 Clock Selection Bits
1001: fxx/4
1010: fxx/8
1011: fxx/16
1100: fxx/32
1101: fxx/128
1110: fxx/512
1111: fxx/2048
Note :
You must set the T0CC(T0SCR.4) bit after set T0DR register. The timer 0 counter value is
compared with timer 0 buffer register instead of T0DR. And T0DR value is copied to timer 0
buffer register when 1)T0CC is set 2)T0OVIR is set 3) T0MIR is set.
October 19, 2009 Ver.1.35
117