8XC196MC, MD, MH USER’S MANUAL

C-30

Px_DIR
P
x
_DIR
x
= 2, 5 (8XC196MC)
x
= 2, 5, 7 (8XC196M D)
x
= 1, 2, 5 (8XC196M H)
Address:
Reset State: Tab le C- 6
Each pin of port
x
can operate in any of t he standard I/O modes of op eration: complementary o utput,
open-drain output, or high-impedance in put. The port
x
I/O direction (P
x
_DIR) register determines the
I/O direction for each p ort
x
pin. The register setting s for an open-drain outpu t or a hig h-impedance
input are identical. An open -drain output configurati on requires an external pull -up. A high-impedance
input configuration requires tha t the corresponding bit in P
x
_REG be set.
7 0
x
= 1 (MH) ————PIN3 PIN2 PIN1 PIN0
7 0
x
= 2, 5 (M
x
)PIN7 PIN6 PIN5 PIN4 PIN3 PIN2 PIN1 PIN0
7 0
x
= 7 (MD) PIN7 PIN6 PIN5 PIN4 PIN3 PIN2 PIN1 PIN0
Bit
Number Bit
Mnemonic Fun ction
7:0PIN7:0 Port
x
Pin
y
Direction
This bit selects the P
x
.
y
direction:
0 = compleme ntary output (output only)
1 = input or ope n-drain output (input, output, or bidi rectional op en-
drain outputs require external pull-ups.
The bits shown as dashes (—) are re served; for compatibility with fu ture devices, write ones to these
bits.

Table C-6. P

x

_DIR Addresses and Reset Values

Register Address Reset Value
P1_DIR (8XC196MH) 1F9BH FFH
P2_DIR (8XC196M
x
)1FD2H FFH
P5_DIR (8XC196M
x
)1FF3H FFH
P7_DIR (8XC196MD) 1FD3H FFH