![](http://datasheet.mmic.net.cn/280000/M37902F8CHP_datasheet_16084061/M37902F8CHP_81.png)
81
M37902FCCHP, M37902FGCHP, M37902FJCHP
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
MITSUBISHI MICROCOMPUTERS
REAL-TIME OUTPUT
The real-time output function enables to change the output level of
several pins simultaneously with a specified timer
’
s counting.
Whether to use the real-time output function is decided by the wave-
form output select bits of the 8-bit real-time output control register
(bits 0 and 1 at address A0
16
). (See Figure 83.) Also, the real-time
output controlled by the pulse output mode select bit of the real-time
output control register (bit 2 at address A0
16
) and is used in one of
the following ways:
4 bits
2 channels
6 bits
1 channel + 2 bits
1 channels
(1) Pulse mode 0
When the pulse output mode select bit is cleared to
“
0
”
, the micro-
computer enters pulse output port is controlled by 2 groups of 4 bits.
Figures 84 and 85 show the bit configuration of the pulse output data
register 0/1 (address A2
16
/A4
16
) and real-time output structure in
pulse mode 0, respectively.
When the waveform output select bits are set to
“
01
”
(bit 1 =
“
0
”
and
bit 0 =
“
1
”
), RTP0
3
to RTP0
0
become pulse output port pins, in other
words, RTP0 is selected.
When the waveform output select bits are set to
“
10
”
(bit 1 =
“
1
”
and
bit 0 =
“
0
”
), RTP1
3
to RTP1
0
become pulse output port pins, in other
words, RTP1 is selected.
When the waveform output select bits are set to
“
11
”
(bit 1 =
“
1
”
and
bit 0 =
“
1
”
), two groups consisting of RTP1
3
to RTP1
0
and RTP0
3
to
RTP0
0
become pulse output port pins, in other words, RTP1 and
RTP0 are selected.
When the waveform output select bits are set to
“
00
”
(bit 1 = bit 0 =
“
0
”
), port P5 pins become normal programmable I/O port pins.
The contents of the pulse output data register 1 (high-order 4 bits at
address A4
16
), which corresponds to RTP1
3
to RTP1
0
, is output to
these ports each time when the contents of timer A1 counter be-
comes
“
0000
16
”
. The contents of the pulse output data register 0
Fig. 83 Bit configuration real-time output control register
Fig. 84 Bit configuration of pulse output data register
Real-time output register A0
16
Waveform output select bits
00 : Programmable I/O port
01 : RTP0 selected
When pulse mode 0 is selected:
RTP0
When pulse mode 1 is selected:
RTP0
1
, RTP0
0
10 : RTP1 selected
When pulse mode 0 is selected:
RTP1
When pulse mode 1 is selected:
RTP1, RTP0
3
, RTP0
2
11 : RTP1 and RTP0 selected
When pulse mode 0 is selected:
RTP1 and RTP0
When pulse mode 1 is selected:
RTP1, RTP0
3,
RTP0
2
and
RTP0
1,
RTP0
0
Pulse output mode select bit
0 : Pulse mode 0
1 : Pulse mode 1
“
0
”
at read.
7
6
5
4
3
2
1
0
Address
Note 1:
Used only in pulse mode 0
2:
Used only in pulse mode 1
Pulse output data register 0
RTP0
0
pulse output data bit
RTP0
1
pulse output data bit
RTP0
2
pulse output data bit
(Note 1)
RTP0
3
pulse output data bit
(Note 1)
7
6
5
4
3
2
1
0
Address
A2
16
Pulse output data register 1
RTP0
2
pulse output data bit
(Note 2)
RTP0
3
pulse output data bit
(Note 2)
RTP1
0
pulse output data bit
RTP1
1
pulse output data bit
RTP1
2
pulse output data bit
RTP1
3
pulse output data bit
7
6
5
4
3
2
1
0
Address
A4
16
(low-order 4 bits at address A2
16
), which corresponds to RTP0
3
to
RTP0
0
, is output to these ports each time when the contents of timer
A0 counter becomes
“
0000
16
”
.
When
“
0
”
is written to a specified bit of the pulse output data register,
a low-level signal is output to a pulse output port if the counter con-
tents of the timer which corresponds to the bit becomes
“
0000
16
”
:
when
“
1
”
is written to the bit, a high-level signal is output to a pulse
output port which corresponds to the bit at the same timing.