M30621ECGP MITSUBISHI [Mitsubishi Electric Semiconductor], M30621ECGP Datasheet - Page 84

no-image

M30621ECGP

Manufacturer Part Number
M30621ECGP
Description
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Manufacturer
MITSUBISHI [Mitsubishi Electric Semiconductor]
Datasheet
Timer B
84
Table 1.13.8. Timer specifications in pulse period/pulse width measurement mode
Note 1: An interrupt request is not generated when the first effective edge is input after the timer has started counting.
Note 2: The value read out from the timer Bi register is indeterminate until the second effective edge is input after the timer.
Figure 1.13.19. Timer Bi mode register in pulse period/pulse width measurement mode
(3) Pulse period/pulse width measurement mode
Count source
Count operation
Count start condition
Count stop condition
Interrupt request generation timing • When measurement pulse's effective edge is input (Note 1)
TBi
Read from timer
Write to timer
In this mode, the timer measures the pulse period or pulse width of an external signal. (See Table 1.13.8.)
However, this function cannot be used since timer B1 does not have input port. Figure 1.13.19 shows the
timer Bi mode register in pulse period/pulse width measurement mode. Figure 1.13.20 shows the opera-
tion timing when measuring a pulse period. Figure 1.13.21 shows the operation timing when measuring
a pulse width.
IN
pin function
Timer Bi mode register
b7
b6
Item
b5
b4
b3
b2
b1
1
0
b0
Note 1: The timer Bi overflow flag changes to “0” when the count start flag is “1” and a value is written to the
Note 2: Timer B0, timer B3.
Note 3: Timer B1, timer B2, timer B4, timer B5.
Bit symbol
TMOD0
TMOD1
f
• Up count
• Counter value “0000
Count start flag is set (= 1)
Count start flag is reset (= 0)
• When an overflow occurs. (Simultaneously, the timer Bi overflow flag
Measurement pulse input
When timer Bi register is read, it indicates the reload register’s content
(measurement result) (Note 2)
Cannot be written to
1
TCK0
TCK1
MR0
MR1
MR2
MR3
pulse's effective edge and the timer continues counting
changes to “1”. The timer Bi overflow flag changes to “0” when the count
start flag is “1” and a value is written to the timer Bi mode register.)
, f
Symbol
TBiMR(i=0 to 5)
timer Bi mode register. This flag cannot be set to “1” by software.
8
, f
32
Timer Bi overflow
flag ( Note 1)
, f
Operation mode
select bit
Measurement mode
select bit
Nothing is assigned (i = 1, 2, 4, 5).
In an attempt to write to this bit, write “0”. The value, if read, turns out to be
indeterminate.
0 (Fixed to “0” in pulse period/pulse width measurement mode; i = 0, 3)
Count source
select bit
C32
Bit name
039B
035B
Address
16
16
to 039D
to 035D
16
” is transferred to reload register at measurement
b1 b0
1 0 : Pulse period / pulse width
b3 b2
0 0 : Pulse period measurement (Interval between
0 1 : Pulse period measurement (Interval between
1 0 : Pulse width measurement (Interval between
1 1 : Inhibited
b7 b6
0 : Timer did not overflow
1 : Timer has overflowed
0 0 : f
0 1 : f
1 0 : f
1 1 : f
16
16
measurement pulse's rising edge to rising edge)
measurement mode
measurement pulse's falling edge to falling edge)
measurement pulse's falling edge to rising edge,
and between rising edge to falling edge)
1
8
32
C32
Specification
When reset
00XX0000
00XX0000
2
2
Function
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
M16C / 62 Group (80-pin)
Mitsubishi microcomputers
(Note 2)
(Note 3)
R
W

Related parts for M30621ECGP