169
CHAPTER 10 I/O PORTS
10.2 I/O Port Registers
There are five types of I/O port registers:
• Port data register (PDR2, PDR4 to PDR6, PDR8)
• Port direction register (DDR2, DDR4 to DDR6, DDR8, DDRA)
• Pull-up control register (PUCR2)
• Analog input enable register (ADER5, ADER6)
• Input level select register (ILSR0, ILSR1)
■ I/O Port Registers
Figure 10.2-1 shows the I/O port registers.
Figure 10.2-1 I/O Port Registers
76543210
P27 P26 P25 P24 P23 P22 P21 P20
− − − P44 P43 P42 P41 P40
P54 P53 P52 P51 P50
P67 P66 P65 P64 P63 P62 P61 P60
P87 P86 P85 P84 P83 P82 − P80
D27 D26 D25 D24 D23 D22 D21 D20
− − −
D44 D43 D42 D41 D40
D54 D53 D52 D51 D50
D67 D66 D65 D64 D63 D62 D61 D60
D87 D86 D85 D84 D83 D82 − D80
−
−
SIL0SIL1
−
−−
PU27 PU26 PU25 PU24 PU23 PU22 PU21 PU20
P57 P56 P55
D57 D56 D55
15/7 14/6 13/5 12/4 11/3 10/2 9/1 8/0
ADE15 ADE14 ADE13 ADE12 ADE11 ADE10 ADE9 ADE8
ADE7 ADE6 ADE5 ADE4 ADE3 ADE2 ADE1 ADE0
15/7 14/6 13/5 12/4 11/3 10/2 9/1 8/0
− IL6 IL5 IL4 − IL2 − −
−−−− −−IL8
76543210
76543210
−
−
Address: 000002
H
Address: 000004
H
Address: 000005
H
Address: 000006
H
Address: 000008
H
Address: 000012
H
Address: 000014
H
Address: 000015
H
Address: 000016
H
Address: 000018
H
Address: 00001A
H
Bit No.
Bit No.
Bit No.
Bit No.
Bit No.
Address: 00001E
H
Address: 00000B
H
Address: 00000C
H
Address: 00000E
H
Address: 00000F
H
Port 2 data register (PDR2)
Port 4 data register (PDR4)
Port 5 data register (PDR5)
Port 6 data register (PDR6)
Port 8 data register (PDR8)
Port 2 direction register (DDR2)
Port 4 direction register (DDR4)
Port 5 direction register (DDR5)
Port 6 direction register (DDR6)
Port 8 direction register (DDR8)
Port A direction register (DDRA)
Port 2
pull-up control register (PUCR2)
Port
5 analog input enable register (ADER5)
Port
6 analog input enable register
(
ADER
6)
Input level select register (ILSR0)
Input level select register (ILSR1)