Z8 Encore! XP
®
4K Series
Product Specification
42
Port A–D Control Registers
The Port A–D Control registers set the GPIO port operation. The value in the correspond-
ing Port A–D Address register determines which sub-register is read from or written to by
a Port A–D Control register transaction (Table
Table 19. Port A–D Control Registers (PxCTL)
BITS
FIELD
RESET
R/W
ADDR
R/W
R/W
R/W
R/W
7
6
5
4
PCTL
00H
R/W
R/W
R/W
R/W
FD1H, FD5H, FD9H, FDDH
3
2
1
0
PCTL[7:0]—Port Control
The Port Control register provides access to all sub-registers that configure the GPIO Port
operation.
Port A–D Data Direction Sub-Registers
The Port A–D Data Direction sub-register is accessed through the Port A–D Control regis-
ter by writing 01H to the Port A–D Address register (Table
Table 20. Port A–D Data Direction Sub-Registers (PxDD)
BITS
FIELD
RESET
R/W
ADDR
7
DD7
1
R/W
6
DD6
1
R/W
5
DD5
1
R/W
4
DD4
1
R/W
3
DD3
1
R/W
2
DD2
1
R/W
1
DD1
1
R/W
0
DD0
1
R/W
If 01H in Port A–D Address Register, accessible through the Port A–D Control Register
DD[7:0]—Data Direction
These bits control the direction of the associated port pin. Port Alternate Function opera-
tion overrides the Data Direction register setting.
0 = Output. Data in the Port A–D Output Data register is driven onto the port pin.
1 = Input. The port pin is sampled and the value written into the Port A–D Input Data Reg-
ister. The output driver is tristated.
Port A–D Alternate Function Sub-Registers
The Port A–D Alternate Function sub-register (Table
is accessed through the Port A–
D Control register by writing
02H
to the Port A–D Address register. The Port A–D Alter-
nate Function sub-registers enable the alternate function selection on pins. If disabled, pins
PS022815-0206
General-Purpose I/O