Datasheet

Section 10 Timer B1
Rev. 2.00 Sep. 23, 2005 Page 132 of 444
REJ09B0068-0200
10.4.2 Auto-Reload Timer Operation
Setting the TMB17 bit in TMB1 to 1 causes the timer B1 to function as an 8-bit auto-reload timer.
When a reload value is set in TLB1, the same value is loaded into TCB1, becoming the value from
which TCB1 starts its count. After the count value in TCB1 reaches H'FF, the next clock signal
input causes the timer B1 to overflow. The TLB1 value is then loaded into TCB1, and the count
continues from that value. The overflow period can be set within a range from 1 to 256 input
clocks, depending on the TLB1 value.
The clock sources and interrupts in auto-reload mode are the same as in interval mode. In auto-
reload mode (TMB17 = 1), when a new value is set in TLB1, the TLB1 value is also loaded into
TCB1.
10.4.3 Event Counter Operation
Timer B1 can operate as an event counter in which TMIB1 is set to an event input pin. External
event counting is selected by setting the TMB12 to TMB10 bits in TMB1 to 1. TCB1 counts up at
rising or falling edge of an external event signal input at the TMB1 pin.
When the timer B1 is used to count external event input, the IRQ1 bit in PMR1 should be set to 1
and the IEN1 bit in IENR1 should be cleared to 0 to disable IRQ1 interrupt requests.
10.5 Timer B1 Operating Modes
Table 10.2 shows the timer B1 operating modes.
Table 10.2 Timer B1 Operating Modes
Operating Mode Reset Active Sleep Subsleep Standby
Interval Reset Functions Functions Halted Halted TCB1
Auto-reload Reset Functions Functions Halted Halted
TMB1 Reset Functions Retained Retained Retained