TIMER B
8.5 Pulse period/Pulse width measurement mode
(b15)
b7
(b8)
b0 b7
Timer B0 register (Addresses 5116, 5016)
Timer B1 register (Addresses 5316, 5216)
Timer B2 register (Addresses 5516, 5416)
b0
Bit
Function
At reset R/W
Undefined RO
15 to 0 The measurement result of pulse period or pulse width is read out.
Note: Reading from this register must be performed in a unit of 16 bits.
b7 b6 b5 b4 b3 b2 b1 b0
Timer Bi mode register (i = 0 to 2) (Addresses 5B16 to 5D16)
1 0
Function
Bit
0
Bit name
At reset R/W
b1 b0
Operating mode select bits
0
0
0
RW
RW
RW
1 0 : Pulse period/Pulse width measurement mode
1
2
b3 b2
Measurement mode select bits
0 0 : Pulse period measurement
(Interval between falling edges of measurement pulse)
0 1 : Pulse period measurement
(Interval between rising edges of measurement pulse)
1 0 : Pulse width measurement
(Interval from a falling edge to a rising edge, and from
a rising edge to a falling edge of measurement pulse)
1 1 : Do not select.
3
0
RW
Count-type select bit
0 : Counter clear type
1 : Free-run type
4
5
6
7
0
RW
0 : No overflow
1 : Overflowed
Undefined RO
Timer Bi overflow flag (Note)
b7 b6
Count source select bits
0
0
RW
RW
0 0 : f2
0 1 : f16
1 0 : f64
1 1 : f512
Note: The timer Bi overflow flag is cleared to “0” when a value is written to the timer Bi mode register with the count start bit = “1.”
This flag cannot be set to “1” by software.
Fig. 8.5.1 Structures of timer Bi register and timer Bi mode register in pulse period/pulse width
measurement mode
7906 Group User’s Manual Rev.2.0
8-21