English
Language : 

HD64F38602R Datasheet, PDF (182/552 Pages) Renesas Technology Corp – Renesas 16-Bit Single-Chip Microcomputer
Section 9 Timer B1
9.4 Operation
9.4.1 Interval Timer Operation
When bit TMB17 in TMB1 is cleared to 0, timer B1 functions as an 8-bit interval timer. Upon
reset, TCB1 is cleared to H'00 and bit TMB17 is cleared to 0, so the interval timer function is
selected immediately after a reset. The operating clock of timer B1 is selected from eight internal
clock signals output by prescaler S or prescaler W. The selection is made by bits TMB12 to
TMB10 in TMB1.
After bit TMB16 in TMB1 is set to 1 to start the counter operation and the count value in TMB1
reaches H'FF, the next clock signal input causes timer B1 to overflow, setting flag IRRTB1 in
IRR2 to 1. If IENTB1 in IENR2 is 1, an interrupt is requested to the CPU.
At overflow, TCB1 returns to H'00 and starts counting up again. Even though interval timer
operation (TMB17 = 0) is selected, when a value is set in TLB1 with bit TMB16 in TMB1 cleared
to 0, the same value is set in TCB1.
9.4.2 Auto-Reload Timer Operation
Setting bit TMB17 in TMB1 to 1 causes timer B1 to function as an 8-bit auto-reload timer. When
a reload value is set in TLB1 with bit TMB16 in TMB1 cleared to 0, the same value is loaded into
TCB1. After bit TMB16 in TMB1 is set to 1 to start the counter operation and the count value in
TCB1 reaches H'FF, the next clock signal input causes 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. To set a
new value in TLB1 in auto-reload mode (TMB17 = 1), clear bit TMB16 in TMB1 to 0 before
making the new setting.
Rev. 3.00 May 15, 2007 Page 150 of 516
REJ09B0152-0300