m38039g6hsp Renesas Electronics Corporation., m38039g6hsp Datasheet - Page 35

no-image

m38039g6hsp

Manufacturer Part Number
m38039g6hsp
Description
Single-chip 8-bit Cmos Microcomputer
Manufacturer
Renesas Electronics Corporation.
Datasheet
3803 Group (Spec.H QzROM version)
Rev.1.10
REJ03B0166-0110
(4) Pulse period measurement mode
• Mode selection
This mode can be selected by setting “010” to the timer Z
operating 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
• Count source selection
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
selected 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
count source.
• Interrupt
The interrupt at an underflow is the same as the timer mode’s.
When the pulse period measurement is completed, the
INT
register 2 (address 003D
• Explanation of operation
The cycle of the pulse which is input from the CNTR
measured. When the CNTR
timer Z mode register (address 002A
during the term from one falling edge of CNTR
next falling edge. When it is “1”, the timer counts during the
term from one rising edge input to the next rising edge input.
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
request occurs and “FFFF
timer Z, the value of the timer latch (measured value) is read.
The measured value is retained until the next measurement
completion.
• Precautions
Set the double-function port of CNTR
in 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 period).
Since the timer latch in this mode is specialized for the read-out
of measured values, do not perform any write operation during
measurement.
“FFFF
the valid edge of measurement start/completion is detected.
Consequently, the timer value at start of pulse period
m e a s u r em e n t d e p e n d s o n t h e t i m e r v a l u e j u s t b ef o r e
measurement start.
Figure.28 shows the timing chart of the pulse period
measurement mode.
4
/CNTR
16
” is set to the timer when the timer underflows or when
2
Nov 14, 2005
interrupt request bit (bit 5) of the interrupt request
16
16
” is set to the timer.
CIN
).
16
16
) is set to “1”.
” is set to the timer. When reading the
); or f(X
2
active edge switch bit (bit 5) of the
Page 35 of 91
CIN
16
2
) is “0”, the timer counts
pin and port P4
) can be selected as the
IN
); or f(X
2
pin input to the
CIN
7
) can be
to input
2
pin is
(5) Pulse width measurement mode
• Mode selection
This mode can be selected by setting “011” to the timer Z
operating 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
• Count source selection
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
selected 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
count source.
• Interrupt
The interrupt at an underflow is the same as the timer mode’s.
When the pulse widths measurement is completed, the
INT
register 2 (address 003D
• Explanation of operation
The pulse width which is input from the CNTR
When the CNTR
mode register (address 002A
the term from one rising edge input to the next falling edge input
(“H” term). When it is “1”, the timer counts during the term from
one falling edge of CNTR
input (“L” term).
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 completion/start is
detected, “FFFF
When the timer Z underflows, the timer Z interrupt occurs and
“FFFF
value of the timer latch (measured value) is read. The measured
value is retained until the next measurement completion.
• Precautions
Set the double-function port of CNTR
in 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
measurement.
“FFFF
the valid edge of measurement start/completion is detected.
Consequently, the timer value at start of pulse width
m e a s u r em e n t d ep e n d s o n t h e t i m e r v a l u e j u s t b ef o r e
measurement start.
Figure.29 shows the timing chart of the pulse width measurement
mode.
4
/CNTR
16
16
” is set to the timer when the timer underflows or when
” is set to the timer Z. When reading the timer Z, the
2
interrupt request bit (bit 5) of the interrupt request
16
2
” is set to the timer.
active edge switch bit (bit 5) of the timer Z
16
CIN
16
).
PRELIMINARY
Notice: This is not a final specification.
Some parametric limits are subject to change.
) is set to “1”.
2
); or f(X
pin input to the next rising edge of
16
) is “0”, the timer counts during
CIN
2
pin and port P4
) can be selected as the
IN
); or f(X
2
pin is measured.
CIN
7
) can be
to input

Related parts for m38039g6hsp