
REAL-TIME OUTPUT
7902 Group User’s Manual
11-6
11.2 Block description
After reset, the port P5 pins are floated since these pins are placed in the input mode. The output levels
of the pulse output pins are undefined until timer A0 or A2 underflows first after data for the timer is written.
It is because the pulse output data registers 0 and 1 are undefined after reset.
When avoiding these states, be sure to follow the procedure “Processing of avoiding undefined output
before starting pulse output” in Figures 11.3.1 and 11.3.2.
When reading the port P5 register (address B16), the output values of the pulse output pins can be read
out.
11.2.4 Timers A0 and A2
Data written into the pulse output registers 0 and 1 is output from the corresponding pulse output pins at
each underflow of timer A0 or A2. Refer to section “9.3 Timer mode” for the setting of timers A0 and A2.
Fig. 11.2.3 Relationship between port P5 direction register and pulse output pins
RW
0
1
2
3
4
5
6
7
11.2.3 Port P5 direction register
The pulse output pins are multiplexed with port P5 pins. When using these pins as pulse output pins of
the real-time output, be sure to set the corresponding bits of the port P5 direction register to “1” in order
to set these port pins for the output mode. Figure 11.2.3 shows the relationship between the port P5
direction register and pulse output pins.
Port P5 direction register (Address D16)
Pin RTP00 (Pin TA0OUT)
Pin RTP01 (Pin TA0IN)
Pin RTP02 (Pin TA1OUT)
Pin RTP03 (Pin TA1IN)
Pin RTP10 (Pin TA2OUT/KI0)
Pin RTP11 (Pin TA2IN/KI1)
Pin RTP12 (Pin TA3OUT/KI2)
Pin RTP13 (Pin TA3IN/KI3)
b7 b6 b5 b4 b3 b2 b1 b0
0 : Input mode
1 : Output mode
When using this pin as a pulse output pin, be sure to
set the corresponding bit to “1.”
0
Corresponding pin
Bit
Functions
At reset
R/W
Notes 1: When any of these bits becomes “0,” the corresponding pin becomes an input port pin (floating state), regardless of the
waveform output select bits (bits 0 and 1 at address A016).
2: (
) shows the I/O pin of another internal peripheral device which is multiplexed.