English
Language : 

Z8F1601 Datasheet, PDF (57/246 Pages) Zilog, Inc. – Z8 Encore Microcontrollers with Flash Memory and 10-Bit A/D Converter
Z8F640x/Z8F480x/Z8F320x/Z8F240x/Z8F160x
Z8 Encore!®
39
Port A-H Data Direction Sub-Registers
The Port A-H Data Direction sub-register is accessed through the Port A-H Control regis-
ter by writing 01H to the Port A-H Address register (Table 15).
Table 15. Port A-H Data Direction Sub-Registers
BITS
FIELD
RESET
R/W
ADDR
7
6
5
4
3
2
1
0
DD7
DD6
DD5
DD4
DD3
DD2
DD1
DD0
1
1
1
1
1
1
1
1
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
If 01H in Port A-H Address Register, accessible via Port A-H 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-H Output Data register is driven onto the port pin.
1 = Input. The port pin is sampled and the value written into the Port A-H Input Data Reg-
ister. The output driver is tri-stated.
Port A-H Alternate Function Sub-Registers
The Port A-H Alternate Function sub-register (Table 16) is accessed through the Port A-H
Control register by writing 02H to the Port A-H Address register. The Port A-H Alternate
Function sub-registers select the alternate functions for the selected pins. Refer to the
GPIO Alternate Functions section to determine the alternate function associated with
each port pin.
Caution:
Do not enable alternate function for GPIO port pins which do not have an
associated alternate function. Failure to follow this guideline may result in
unpredictable operation.
Table 16. Port A-H Alternate Function Sub-Registers
BITS
FIELD
RESET
R/W
ADDR
7
6
5
4
3
2
1
0
AF7
AF6
AF5
AF4
AF3
AF2
AF1
AF0
0
0
0
0
0
0
0
0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
If 02H in Port A-H Address Register, accessible via Port A-H Control Register
PS017610-0404
General-Purpose I/O