Datasheet

Table Of Contents
Section 11 Timer C
Rev. 2.00 Jul. 04, 2007 Page 232 of 692
REJ09B0309-0200
11.4 Timer Operation
11.4.1 Interval Timer Operation
When bit TMC7 in timer mode register C (TMC) is cleared to 0, timer C functions as an 8-bit
interval timer.
Upon reset, TCC is initialized to H'00 and TMC to H'10, so TCC continues up-counting as an
interval up-counter without halting immediately after a reset. The timer C operating clock is
selected from nine internal clock signals output by prescalers S and W, or an external clock input
at pin TMIC. The selection is made by bits TMC3 to TMC0 in TMC.
TCC up/down-count control can be specified by bits TMC6 and TMC5 in TMC, or selected by the
input signal level on the UD pin.
After the count value in TCC reaches H'FF (H'00), the next clock input causes timer C to overflow
(underflow), setting bit IRRTC in IRR2 to 1. If IENTC = 1 in interrupt enable register 2 (IENR2),
a CPU interrupt is requested.
At overflow (underflow), TCC returns to H'00 (H'FF) and starts counting up (down) again.
During interval timer operation (TMC7 = 0), when a value is set in timer load register C (TLC),
the same value is set in TCC.
Note: For details on interrupts, see section 4, Interrupt Controller.