
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 A016). (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 A016) 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 A216/A416) 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”), RTP03 to RTP00 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”), RTP13 to RTP10 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 RTP13 to RTP10 and RTP03 to
RTP00 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 A416), which corresponds to RTP13 to RTP10, is output to
these ports each time when the contents of timer A1 counter be-
comes “000016”. 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
A016
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:
RTP01, RTP00
10 : RTP1 selected
When pulse mode 0 is selected:
RTP1
When pulse mode 1 is selected:
RTP1, RTP03, RTP02
11 : RTP1 and RTP0 selected
When pulse mode 0 is selected:
RTP1 and RTP0
When pulse mode 1 is selected:
RTP1, RTP03, RTP02 and
RTP01, RTP00
Pulse output mode select bit
0 : Pulse mode 0
1 : Pulse mode 1
“0” at read.
76543210
Address
Note 1: Used only in pulse mode 0
2: Used only in pulse mode 1
Pulse output data register 0
RTP00 pulse output data bit
RTP01 pulse output data bit
RTP02 pulse output data bit (Note 1)
RTP03 pulse output data bit (Note 1)
76543210
Address
A216
Pulse output data register 1
RTP02 pulse output data bit (Note 2)
RTP03 pulse output data bit (Note 2)
RTP10 pulse output data bit
RTP11 pulse output data bit
RTP12 pulse output data bit
RTP13 pulse output data bit
76543210
Address
A416
(low-order 4 bits at address A216), which corresponds to RTP03 to
RTP00, is output to these ports each time when the contents of timer
A0 counter becomes “000016”.
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 “000016”:
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.