English
Language : 

PD17012_15 Datasheet, PDF (93/320 Pages) Renesas Technology Corp – 4-BIT SINGLE-CHIP MICROCONTROLLERS WITH DIGITAL TUNING SYSTEM HARDWARE
µPD17012, 17P012
10.6.2 Example of using output ports (P2E to P2H and PYA)
Each pin of P0E and P0F are used as an LCD segment signal output pin on power-on reset.
To use it as an output port pin, select the port to be used by the P2ESEL to P2HSEL and PYASEL flags of
the LCD port select register and LCD mode select register.
The port to be used can be selected by P2E to P2H and PYA independently.
The pins not set in the output port mode by the LCD port select register and LCD mode select register can
be used as LCD segment signal output pins.
The setting of P2E to P2H and PYA output data is described in 10.6.3 and 10.6.4.
The configuration and functions of the LCD port select register, LCD mode select register, and port YA (PYA)
group register are described in 10.6.5 to 10.6.7.
10.6.3 Setting data to P2E to P2H
Output data is set to P2E to P2H by executing an instruction, such as MOV, that writes data to the port
registers corresponding to the ports.
To output a high level to each port pin, write 1 to the corresponding port register; to output a low level, write
0.
The contents of the output latch are read when an instruction, such as SKT, that reads the contents of the
port register is executed.
Figure 10-3 shows the relationship between the P2E to P2H port registers and LCD segment register.
As shown in this figure, the LCD segment register’s higher 3 bits, LCDD16 to LCDD19, can be used as a
general-purpose data memory area when P2E to P2H are used.
Refer to Figure 19-5 Relationship Between LCD Display Dots, Output of Each Pin, and Data Setting
Registers in 14. LCD CONTROLLER/DRIVER.
Figure 10-3. Relationship Between Port Registers P2E to P2H and LCD Segment Register
LCD16/P2E0 to
LCD19/P2H0
P2ESEL flag
P2HSEL flag
1
0
Segment signal
timing control
b0
b1 LCDD16/P2E to
b2 LCDD19/P2H
b3 (5FH to 5CH)
Data Sheet U10101EJ4V0DS
91