English
Language : 

PD17012_15 Datasheet, PDF (83/320 Pages) Renesas Technology Corp – 4-BIT SINGLE-CHIP MICROCONTROLLERS WITH DIGITAL TUNING SYSTEM HARDWARE
µPD17012, 17P012
10.3.2 Using I/O ports
The I/O ports are set in the input or output mode by I/O select registers P0A P0B, P1A, and P1D of the control
registers.
The bit I/O ports (P0A, P0B, and P1A) can be set in the input or output mode in 1-bit units, and group I/O
port (P1D) can be set in the input or output mode in 4-bit units.
Output data can be set to a port by writing the data to the corresponding port register, and the input data of
the port can be read by executing an instruction that reads the port register.
10.3.3 explains the I/O select register of each port.
10.3.4 and 10.3.5 explain how to use the input and output ports.
10.3.3 I/O port control register
The port 0A bit I/O, port 0B bit I/O, port 1A bit I/O, and port 1D group I/O select registers set each pin of the
P0A, P0B, P1A, and P1D in the input or output mode.
The configuration and functions of these registers are shown below.
(1) Port 0A bit I/O select register
Name
Port 0A bit I/O select
register
Flag symbol Address
b3 b2 b1 b0
0PPP
37H
000
AAA
BBB
III
OOO
210
Read/
Write
R/W
Sets input or output mode of port
0 Sets P0A0/SI1 pin in input mode.
1 Sets P0A0/SI1 pin in output mode.
Sets input or output mode of port
0
Sets P0A1/SO1 pin in input mode.
1
Sets P0A1/SO1 pin in output mode.
Sets input or output mode of port
0
Sets P0A2/SCK1 pin in input mode.
1
Sets P0A2/SCK1 pin in output mode.
Fixed to "0"
Power-on
Clock stop
CE
0000
000
000
Data Sheet U10101EJ4V0DS
81