NEC PD78P214 Manuale Utente

Pagina di 487
97
Chapter 6   Real-Time Output Function
6
6.2  REAL-TIME OUTPUT CONTROL REGISTER (RTPC)
The real-time output control register (RTPC) is an 8-bit register to specify the functions of port 0.  An 8-bit
manipulation instruction and a bit manipulation instruction can be used to read data from and write data to the
RTPC register.  Fig. 6-2 shows the format of this register.
When the RESET signal is input, the RTPC is reset to 00H.
Fig. 6-2  Real-Time Output Port Control Register (RTPC) Format
Caution When the P0ML or P0MH is set to 1, the output buffer for the corresponding output port is turned on to output the contents of the
port 0 output latch, regardless of the contents of the port 0 mode register (PM0).  Therefore, initialize the contents of the output
latch before specifying the real-time output port.
6.3  ACCESS TO THE REAL-TIME OUTPUT PORT
The buffer registers (P0H and P0L) are mapped to independent addresses in the SFR area, as shown in Fig. 6-3.
When the 4-bit 
× 2-channel real-time output function is specified, data can be set in each buffer register (P0H or
P0L) independently.
When the 8-bit 
× 1-channel real-time output function is specified, 8-bit data can be set in the buffer registers by
writing to either one (P0H or P0L).
Table 6-1 lists the operating modes of port 0 and the operations needed for the port 0 buffer registers.
Fig. 6-3  Configuration of the Buffer Registers (P0H and P0L)
P0H
P0L
Low-order 
4 bits
High-order 
4 bits
0FF0AH
0FF0BH
BYTE
7
0
6
0
5
P0MH
4
EXTR
3
0
2
0
1
P0ML
0
RTPC
P0ML
Real-time output port mode
Port mode
Function specification of P00 to P03 pins 
0
1
EXTR
Enabled.
Disabled
Data transfer by INTP0 from buffer register to 
output latch
0
1
P0MH
Real-time output port mode
Port mode
Function specification of P04 to P07 pins 
0
1
BYTE
8-bit real-time output port
4-bit separate real-time output port
Operation mode for real-time output mode
0
1
BYTE = 0:  Only P0L data is transferred
BYTE = 1:  Both P0L and P0H data are 
                   transferred