![](http://datasheet.mmic.net.cn/30000/M37703M2BXXXSP_datasheet_2359958/M37703M2BXXXSP_138.png)
7702/7703 Group User’s Manual
TIMER B
6–3
6.2 Block description
6.2.1 Counter and reload register (timer Bi register)
Each of timer Bi counter and reload register consists of 16 bits and has the following functions.
(1) Functions in timer mode and event counter mode
The counter down-counts each time count source is input. The reload register is used to store the
initial value of the counter. When the counter underflows, the reload register’s contents are reloaded
into the counter.
Values are set to the counter and reload register by writing a value to the timer Bi register. Table
6.2.1 lists the memory assignment of the timer Bi register.
The value written into the timer Bi register when the counting is not in progress is set to the counter
and reload register. The value written into the timer Bi register when the counting is in progress is
set to only the reload register. In this case, the reload register’s updated contents are transferred to
the counter when the counter underflows next time. The counter value is read out by reading out the
timer Bi register.
Note: When reading and writing from/to the timer Bi register, perform them in an unit of 16 bits. For
more information about the value got by reading the timer Bi register, refer to “[Precautions
when operating in timer mode]” and “[Precautions when operating in event counter
mode].”
(2) Functions in pulse period/pulse width measurement mode
The counter up-counts each time count source is input. The reload register is used to hold the pulse
period or pulse width measurement result. When a valid edge is input to the TBiIN pin, the counter
value is transferred to the reload register. In this mode, the value got by reading the timer Bi register
is the reload register’s contents, so that the measurement result is obtained.
Note: When reading from the timer Bi register, perform it in an unit of 16 bits.
Timer Bi register
Timer B0 register
Timer B1 register
Timer B2 register
Low-order byte
Address 5016
Address 5216
Address 5416
High-order byte
Address 5116
Address 5316
Address 5516
Note: When reset, the contents of the timer Bi reg-
ister are undefined.
Table 6.2.1 Memory assignment of timer Bi registers