m38039g6hsp Renesas Electronics Corporation., m38039g6hsp Datasheet - Page 87

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
Notes on 8-bit Timer (timer 1, 2, X, Y)
• If a value n (between 0 and 255) is written to a timer latch, the
• When switching the count source by the timer 12, X and Y
• Set the double-function port of the CNTR
• Set the double-function port of CNTR
Notes on 16-bit Timer (timer Z)
1. Pulse output mode
• Set the double-function port of the CNTR
2. Pulse period measurement mode
• Set the double-function port of the CNTR
• A read-out of timer value is impossible in this mode. The timer
• Since the timer latch in this mode is specialized for the read-
• “FFFF
3. Pulse width measurement mode
• Set the double-function port of the CNTR
• A read-out of timer value is impossible in this mode. The timer
• Since the timer latch in this mode is specialized for the read-
• “FFFF
4. Programmable waveform generating mode
• Set the double-function port of the CNTR
frequency division ratio is 1/(n+1).
count source selection bits, the value of timer count is altered
in unconsiderable amount owing to generating of thin pulses in
the count input signals.
Therefore, select the timer count source before set the value to
the prescaler and the timer.
port P5
P5
measurement mode.
output.
input.
can be written to only during timer stop (no measurement of
pulse period).
out of measured values, do not perform any write operation
during measurement.
when the valid edge of measurement start/completion is
detected.
Consequently, the timer value at start of pulse period
measurement depends on the timer value just before
measurement start.
input.
can be written to only during timer stop (no measurement of
pulse period).
out of measured values, do not perform any write operation
during measurement.
when the valid edge of measurement start/completion is
detected.
Consequently, the timer value at start of pulse width
measurement depends on the timer value just before
measurement start.
output.
4
/P5
16
16
5
4
/P5
to input in the event counter mode and the pulse width
” is set to the timer when the timer underflows or
” is set to the timer when the timer underflows or
5
Nov 14, 2005
to output in the pulse output mode.
Page 87 of 91
0
/CNTR
2
2
2
2
pin and port P4
pin and port P4
pin and port P4
pin and port P4
0
/CNTR
1
pin and port
1
pin and
7
7
7
7
to
to
to
to
5. Programmable one-shot generating mode
• Set the double-function port of CNTR
• This mode cannot be used in low-speed mode.
• If the value of the CNTR
6. All modes
• Timer Z write control
Which write control can be selected by the timer Z write control
bit (bit 3) of the timer Z mode register (address 002A
data to both the latch and the timer at the same time or writing
data only to the latch.
When the operation “writing data only to the latch” is selected,
the value is set to the timer latch by writing data to the address of
timer Z and the timer is updated at next underflow. After reset
release, the operation “writing data to both the latch and the timer
at the same time” is selected, and the value is set to both the latch
and the timer at the same time by writing data to the address of
timer Z.
In the case of writing data only to the latch, if writing data to the
latch and an underflow are performed almost at the same time,
the timer value may become undefined.
• Timer Z read control
A read-out of timer value is impossible in pulse period
measurement mode and pulse width measurement mode. In the
other modes, a read-out of timer value is possible regardless of
count operating or stopped.
However, a read-out of timer latch value is impossible.
• Switch of interrupt active edge of CNTR
Each interrupt active edge depends on setting of the CNTR
active edge switch bit and the INT
• Switch of count source
When switching the count source by the timer Z count source
s e l e c t i o n b i t s , t h e v a l u e o f t i m e r c o u n t i s a l t e r e d i n
inconsiderable amount owing to generating of thin pulses on the
count input signals.
Therefore, select the timer count source before setting the value
to the prescaler and the timer.
output, and of INT
during one-shot generating enabled or generating one-shot
pulse, then the output level from CNTR
1
pin and port P4
PRELIMINARY
Notice: This is not a final specification.
Some parametric limits are subject to change.
2
active edge switch bit is changed
1
active edge selection bit.
2
to input in this mode.
2
2
2
pin changes.
pin and port P4
and INT
1
16
), writing
7
to
2

Related parts for m38039g6hsp