Any bit set to 鈥?鈥?in the Control Register sets the corresponding Port pin to MCU I/O Mode,
and a 鈥?鈥?sets it to Address Out Mode. The default mode is MCU I/O. Only Ports E, F and
G have an associated Control Register.
The Direction Register controls the direction of data flow in the I/O Ports. Any bit set to 鈥?鈥?/div>
in the Direction Register will cause the corresponding pin to be an output, and any bit set
to 鈥?鈥?will cause it to be an input. The default mode for all port pins is input.
Figures 26 and 28 show the Port Architecture diagrams for Ports A/B/C and E/F/G
respectively. The direction of data flow for Ports A, B, C and F are controlled not only by
the direction register, but also by the output enable product term from the PLD AND array.
If the output enable product term is not active, the Direction Register has sole control of a
given 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 22. Since Port D only contains four pins,
the Direction Register for Port D has only the four least significant bits active.
The
PSD835G2
Functional
Blocks
(cont.)
Table 20. Port Pin Direction Control,
Output Enable P.T. Not Defined
Direction Register Bit
Port Pin Mode
0
1
Input
Output
Table 21. Port Pin Direction Control, Output Enable P.T. Defined
Direction Register Bit
Output Enable P.T.
Port Pin Mode
0
0
1
1
0
1
0
1
Input
Output
Output
Output
Table 22. Port Direction Assignment Example
Bit 7
0
Bit 6
0
Bit 5
0
Bit 4
0
Bit 3
0
Bit 2
1
Bit 1
1
Bit 0
1
58