English
Language : 

M306V5ME-XXXSP Datasheet, PDF (84/262 Pages) Mitsubishi Electric Semiconductor – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER and ON-SCREEN DISPLAY CONTROLLER
MITSUBISHI MICROCOMPUTERS
M306V5ME-XXXSP
M306V5EESP
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER with CLOSED CAPTION DECODER
and ON-SCREEN DISPLAY CONTROLLER
(3) Pulse period/pulse width measurement mode
In this mode, the timer measures the pulse period or pulse width of an external signal. (See Table 2.10.7)
Figure 2.10.23 shows the timer B0 mode register in pulse period/pulse width measurement mode. Figure
2.10.24 shows the operation timing when measuring a pulse period. Figure 2.10.25 shows the operation
timing when measuring a pulse width.
Table 2.10.7 Timer specifications in pulse period/pulse width measurement mode
Item
Specification
Count source
f1, f8, f32
Count operation
• Up count
• Counter value “000016” is transferred to reload register at measurement pulse's
effective edge and the timer continues counting
Count start condition
Count start flag is set (= 1)
Count stop condition
Count start flag is reset (= 0)
Interrupt request generation timing • When measurement pulse's effective edge is input (Note 1)
• When an overflow occurs. (Simultaneously, the timer Bi overflow flag changes to “1”.
The timer B0 overflow flag changes to “0” when the count start flag is “1” and a value
is written to the timer B0 mode register.)
TB0IN pin function
Measurement pulse input
Read from timer
When timer B0 register is read, it indicates the reload register’s content
(measurement result) (Note 2)
Write to timer
Cannot be written to
Notes 1: An interrupt request is not generated when the first effective edge is input after the timer has started counting.
2: The value read out from the timer B0 register is indeterminate until the second effective edge is input after the timer.
Timer B0 mode register
b7 b6 b5 b4 b3 b2 b1 b0
10
Symbol
TB0MR
Address
039B16
When reset
00?X00002
Bit symbol
TMOD0
TMOD1
Bit name
Operation mode
select bit
Function
b1 b0
1 0 : Pulse period / pulse width
measurement mode
RW
MR0
MR1
Measurement mode
select bit
b3 b2
0 0 : Pulse period measurement (Interval between
measurement pulse's falling edge to falling edge)
0 1 : Pulse period measurement (Interval between
measurement pulse's rising edge to rising edge)
1 0 : Pulse width measurement (Interval between
measurement pulse's falling edge to rising edge,
and between rising edge to falling edge)
1 1 : Inhibited
MR2
0: Fixed to “0” in pulse period/pulse width measurement mode
MR3
TCK0
TCK1
Timer Bi overflow
flag ( Note 1)
Count source
select bit
0 : Timer did not overflow
1 : Timer has overflowed
b7 b6
0 0 : f1
0 1 : f8
1 0 : f32
1 1 : Do not set
Note: The timer B0 overflow flag changes to “0” when the count start flag is “1” and a value is written to the
timer B0 mode register. This flag cannot be set to “1” by software.
Figure 2.10.23 Timer B0 mode register in pulse period/pulse width measurement mode
84
Rev. 1.0