Operation; Interval Timer Operation; Auto-Reload Timer Operation; Timer B1 Operating Modes - Renesas H8/36912 Series User Manual

16-bit single-chip microcomputer
Hide thumbs Also See for H8/36912 Series:
Table of Contents

Advertisement

10.3

Operation

10.3.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 up-counting and interval timing
resume immediately. The operating clock of timer B1 is selected from seven internal clock signals
output by prescaler S. The selection is made by the TMB12 to TMB10 bits in TMB1.
After 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. During interval timer operation
(TMB17 = 0), when a value is set in TLB1, the same value is set in TCB1.
10.3.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, 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 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

Timer B1 Operating Modes

Table 10.1 shows the timer B1 operating modes.

Table 10.1 Timer B1 Operating Modes

Operating Mode
TCB1
Interval
Auto-reload Reset
TMB1
Rev. 1.00, 11/03, page 136 of 376
Downloaded from
Elcodis.com
electronic components distributor
Reset
Active
Reset
Functions
Functions
Reset
Functions
Sleep
Subsleep
Functions
Halted
Functions
Halted
Retained
Retained
Standby
Halted
Halted
Retained

Advertisement

Table of Contents
loading

Table of Contents