7-10 Chapter 7 8-/16-bit Timer/Counter
MB89190/190A series
Table 7-4-1 Function of Each Bit of Timer 1 Control Register (T1CR)
Bit name
Function
Bit 7
T1IF:
Interrupt request
flag bit
8-bit mode:
This bit is set to 1 when the counter value of timer 1 matches the setting
(compare data latch) of the timer 1 data register (T1DR).
16-bit mode:
This bit is set to 1 when the counter values of timer 1 and timer 2 match the
settings of the T1DR register and the T2DR register, respectively.
The interrupt request is output when this bit and the interrupt request enable bit
(T1IE) are 1.
Cleared when 0 written, unaffected when 1 written.
Bit 6
T1IE:
Interrupt request
enable bit
Enables/disables interrupt request output to CPU
The interrupt request is output when this bit and the interrupt request flag bit
(T1IE) are 1.
Bit 5
Bit 4
T1OS1, T1OS0:
Square wave
output control bits
The P34/TO/INT0 pin serves as a general-purpose port pin (P34) when these
bits are 00B. Otherwise, it serves as the square wave output pin (TO).
When 01B or 10B is written to these bits, initialization data is set in the square
wave output control circuit, but it is not output to the TO pin.
When these bits are 11B and the timer is stopped (T1STR = 0), the TO pin is
set to the level that corresponds to the initialization data.
Bit 3
Bit 2
T1CS1, T1CS0:
Clock source
selection bit
These bits select the count clock supplied to the counter.
One clock can be selected from the three different internal clocks and one
external clock.
When these bits are 11B, the external clock input is selected and can operate
as the counter.
Note:
When the external clock input is selected (T1CS1, T1CS0 = 11B), the
P33/EC pin must be set as the input port pin.
Bit 1
T1STP:
Timer stop bit
This bit stops the counter temporarily.
When 1 is written to this bit, the counter stops temporarily. When 0 is written to
this bit with the timer started (T1STR = 1), the counter continues operating.
Bit 0
T1STR:
Timer start bit
This bit starts/stops the counter.
When this bit is changed from 0 to 1, the counter is cleared. At this point, when
the timer operation continuation state (T1STP = 0) is enabled, the counter
starts and increments the selected count clock. When 0 is written to this bit, the
counter stops and the prescaler is cleared.
In the 16-bit mode, when the timer is started (T1STP = 0 → 1), the counters of
timer 1 and timer 2 are both cleared.
Check: Before using only timer 1 of the 8-/16-bit timer/counter in the 8-bit mode, set a value other than
11B at the timer count clock selection bits of the timer 2 control register (T2CR: T2CS1, T2CS0).
Otherwise, a malfunction will occur.