m38039mf-xxxsp Mitsumi Electronics, Corp., m38039mf-xxxsp Datasheet - Page 43

no-image

m38039mf-xxxsp

Manufacturer Part Number
m38039mf-xxxsp
Description
Single-chip 8-bit Cmos Microcomputer
Manufacturer
Mitsumi Electronics, Corp.
Datasheet
(4) Pulse period measurement mode
This mode can be selected by setting “010” to the timer Z operat-
ing mode bits (bits 2 to 0) and setting “0” to the timer/event
counter mode switch bit (b7) of the timer Z mode register (address
002A
In high- or middle-speed mode, 1/2, 1/4, 1/8, 1/16, 1/32, 1/64,
1/128, 1/256, 1/512 or 1/1024 of f(X
as the count source.
In low-speed mode, 1/2, 1/4, 1/8, 1/16, 1/32, 1/64, 1/128, 1/256,
1/512 or 1/1024 of f(X
source.
The interrupt at an underflow is the same as the timer mode’s.
When the pulse period measurement is completed, the INT
CNTR
2 (address 003D
[During timer operation stop]
Select the count source. Next, select the term of the pulse period
to be measured. When the CNTR
the timer Z mode register (address 002A
during the term of one falling edge of CNTR
next falling edge of input. When it is “1”, the timer counts during
the term of one rising edge input until the next rising edge input.
[During timer operation enabled]
The pulse period measurement starts by setting “0” to the timer Z
count stop bit (bit 6) of the timer Z mode register (address
002A
the timer before the start of measurement.
When the valid edge of measurement completion/start is detected,
the 1’s complement of the timer value is written to the timer latch
and “FFFF
Furthermore when the timer underflows, the timer Z interrupt re-
quest occurs and “FFFF
is retained until the next measurement completion.
Set the double-function port of CNTR
this mode.
A read-out of timer value is impossible in this mode. The timer can
be written to only during timer stop (no measurement of pulse pe-
riod).
Since the timer latch in this mode is specialized for the read-out of
measured values, do not perform any write operation during mea-
surement.
“FFFF
valid edge of measurement start/completion is detected. Conse-
quently, the timer value at start of pulse period measurement
depends on the timer value just before measurement start.
Figure 36 shows the timing chart of the pulse period measurement
mode.
Precautions
Mode selection
Count source selection
Interrupt
Explanation of operation
16
16
2
16
), and the timer counts down from the value that was set to
).
interrupt request bit (bit 5) of the interrupt request register
” is set to the timer when the timer underflows or when the
16
” is set to the timer.
16
) is set to “1”.
CIN
16
); or f(X
” is set to the timer. The measured value
CIN
2
active edge switch bit (bit 5) of
) can be selected as the count
IN
2
); or f(X
pin and port P4
16
) is “0”, the timer counts
CIN
2
pin input until the
) can be selected
7
to input in
4
/
(5) Pulse width measurement mode
This mode can be selected by setting “011” to the timer Z operat-
ing mode bits (bits 2 to 0) and setting “0” to the timer/event
counter mode switch bit (b7) of the timer Z mode register (address
002A
In high- or middle-speed mode, 1/2, 1/4, 1/8, 1/16, 1/32, 1/64,
1/128, 1/256, 1/512 or 1/1024 of f(X
as the count source.
In low-speed mode, 1/2, 1/4, 1/8, 1/16, 1/32, 1/64, 1/128, 1/256,
1/512 or 1/1024 of f(X
source.
The interrupt at an underflow is the same as the timer mode’s.
When the pulse widths measurement is completed, the INT
CNTR
2 (address 003D
[During timer operation stop]
Select the count source. Next, select the term of the pulse width to
be measured. When the CNTR
the timer Z mode register (address 002A
during the term of one falling edge of CNTR
next rising edge of input (“L” term). When it is “0”, the timer counts
during the term of one rising edge input until the next falling edge
input (“H” term).
[During timer operation enabled]
The pulse width measurement starts by setting “0” to the timer Z
count stop bit (bit 6) of the timer Z mode register (address
002A
the timer before the start of measurement.
When the valid edge of measurement completion is detected, the
1’s complement of the timer value is written to the timer latch.
When the valid edge of measurement start/completion is detected,
“FFFF
Furthermore when the timer underflows, the timer Z interrupt re-
quest occurs and “FFFF
is retained until the next measurement completion.
Set the double-function port of CNTR
this mode.
A read-out of timer value is impossible in this mode. The timer can
be written to only during timer stop (no measurement of pulse
widths).
Since the timer latch in this mode is specialized for the read-out of
measured values, do not perform any write operation during mea-
surement.
“FFFF
valid edge of measurement start/completion is detected. Conse-
quently, the timer value at start of pulse width measurement
depends on the timer value just before measurement start.
Figure 37 shows the timing chart of the pulse width measurement
mode.
Precautions
Mode selection
Count source selection
Interrupt
Explanation of operation
16
16
2
16
16
).
), and the timer counts down from the value that was set to
interrupt request bit (bit 5) of the interrupt request register
” is set to the timer.
” is set to the timer when the timer underflows or when the
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
16
) is set to “1”.
MITSUBISHI MICROCOMPUTERS
CIN
16
); or f(X
” is set to the timer. The measured value
3803/3804 Group
2
CIN
active edge switch bit (bit 5) of
) can be selected as the count
IN
2
); or f(X
pin and port P4
16
) is “1”, the timer counts
CIN
2
pin input until the
) can be selected
7
to input in
43
4
/

Related parts for m38039mf-xxxsp