ZPSD6XX(V) Family
12-45
I/O Ports
(cont.)
Port Registers
Each port has a set of registers used for configuration (PCR, Port Configuration Registers)
and data transfers (PDR, Port Data Registers). The contents of the registers can be
accessed by the microcontroller through normal read/write bus cycles at the addresses
given in Tables 27 and 27A. The register addresses are comprised of the CSIOP output
from the DPLD plus an address offset as listed in the tables.
The pins of a port are individually configurable and each bit in the register controls its
respective pin. For example, Bit 0 in a register refers to Bit 0 in its port. The three Port
Configuration Registers, shown in Table 23, are used for setting the port configuration. Each
register is set to zero at power up.
Register Name
Port
MCU Access
Control
Direction
Drive*
A,B
A,B,C,D
A,B,C,D
Write/Read
Write/Read
Write/Read
Table 23. Port Configuration Registers
*
Note: See Table 25 for Drive Register bit definition.
Control Register
A zero in the Control Register sets the Port pin to MCU I/O for Port A and B. A “1” sets the
Port pin to Address Out mode. The default mode is MCU I/O.
Direction Register
Controls the direction of data flow in the I/O Ports. A “1” configures the port to be an
output, and a “0” to an input. The I/O configuration can be read from the Direction Register.
The default mode is input.
As shown in the Port Architecture diagram, the direction of data flow in Port A,B and C pins
are also controlled by the output enable (.oe) product term from the GPLD AND array. If the
.oe product term is not active, the Direction Register has sole control of the pin direction.
An example of a configuration for a port with the three least significant bits set to output
and the remainder set to input is shown in Table 24. The Port D register has only the three
least significant bits active.
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0
0
0
0
0
1
1
1
Table 24. Port Direction Assignment Example