209
8.4 Registers of the 8/16-bit Timer/Counter
Table 8.4-1 Functions of the Bits in the Timer 1 Control Register (T1CR)
Bit name
Function
Bit 7
T1IF:
Interrupt request flag bit
In the 8-bit mode
Set to "1" if Timer 1 has the counter value that matches
the Timer 1 data register (T1DR) setting value
(comparator data latch).
In the 16-bit mode
Set to "1" if Timers 1 and 2 have counter values that
match the T1DR and T2DR setting values, respectively.
Setting this bit and the interrupt request enable bit (T1IE)
to "1" outputs an interrupt request.
Cleared to "0" while writing. Setting this bit to "1" does
not affect it and causes no change.
Bit 6
T1IE:
Interrupt request enable bit
Enables or disables the interrupt request output to the
CPU.
Setting this bit and the interrupt request flag bit (T1IF) to
"1" outputs an interrupt request.
Bit 5
Bit 4
T011, T010:
Square wave output control
bits
Setting these bits to "00
B
" makes the T20/T01 pin a
general-purpose port (P20). Setting these bits to any
other value makes it a square wave output pin (T01).
Writing "01
B
" or "10
B
" in these bits sets the initialization
data in the square wave output control circuit but does not
output it to the T01 pin.
If these bits are set to "11
B
" and the timer is stopped
(STR1=0), the T01 pin is set to a level corresponding to
the initialization data.
Bit 3
Bit 2
TC11, TC10:
Clock source select bit
Selects the count clock to be supplied to the counter.
Selects one of the three internal clocks and one external
clock.
Setting these bits to "11
B
" selects the external clock input
and the operation as the counter function.
Note:
Selecting the external clock input (TC11, TC100=11
B)
uses the input of the P84/EC pin as the clock.
Bit 1
STP1:
Timer stop bit
Suspends the counter.
Writing "1" in this bit suspends the counter operation.
While the timer is started (STR1=1), writing "0" causes
the counter to continue the operation.
Bit 0
STR1:
Timer start bit
Starts or stops the counter.
Changing this bit from "0" to "1" clears the counter. If the
timer operation is continued (STP1=0) at this time, the
counter starts the operation and counts up using the
selected count clock. Writing "0" in this bit stops the
counter operation.
In the 16-bit mode, starting the timer (STP1=0 --> 1)
clears Timer 1 and 2 counters.