8XC196L
X SUPPLEMENT
5-4
impedance input, or open-drain output. The port direction and data output registers select the con-
figuration for each pin. Complementary output means that the microcontroller drives the signal
high or low. High-impedance input means that the microcontroller floats the signal. Open-drain
output means that the microcontroller drives the signal low or floats it. For I/O mode, the port
data output register determines whether the microcontroller drives the signal high, drives it low,
or floats it. For special-function mode, the on-chip peripheral or system function determines
whether the microcontroller drives the signal high or low for complementary outputs.
The pins for ports 1, 2, 5, and 6 are weakly pulled low during and after reset. Initializing the pins
by writing to the port mode register turns off the weak pull-downs. To ensure that the ports are
initialized correctly, follow this suggested initialization sequence:
1.
Write to Px_DIR to configure the individual pins. Clearing a bit configures a pin as a
complementary output. Setting a bit configures a pin as a high-impedance input or open-
drain output.
2.
Write to Px_MODE to select either I/O or special-function mode. Writing to Px_MODE
(regardless of the value written) turns off the weak pull-downs. Even if the entire port is to
be used as I/O (its default configuration after reset), you must write to Px_MODE to
ensure that the weak pull-downs are turned off.
3.
Write to Px_REG.
For complementary output configurations:
In I/O mode, write the data that is to be driven by the pins to the corresponding Px_REG
bits. In special-function mode, the value is immaterial because the on-chip peripheral or
system function controls the pin. However, you must still write to Px_REG to initialize the
pin.
For high-impedance input or open-drain output configurations:
In I/O mode, write to Px_REG to either float the pin, making it available as a high
impedance input, or pull it low. Setting the corresponding Px_REG bit floats the pin;
clearing the corresponding Px_REG bit pulls the pin low. In special-function mode, if the
on-chip peripheral uses the pin as an input signal, you must set the corresponding Px_REG
bit so that the pin can be driven externally. If the on-chip peripheral uses the pin as an
output signal, the value of the corresponding Px_REG bit is immaterial because the on-
chip peripheral or system function controls the pin. However, you must still write to
Px_REG to initialize the pin.
5.2.2
Special Bidirectional Port Considerations
This section outlines special consideration for using the pins of ports 1, 2, 5, and 6.
1.
After reset, your software must configure the device to match the external system. This
accomplished by writing appropriate configuration data into Px_MODE. Writing to
Px_MODE not only configures the pins but also turns off the transistor that weakly holds
the pins low. For this reason, even if your port is to be used as it is configured at reset, you
should still write data into Px_MODE.
2.
P2.6/TXJ1850 is the enable pin for ONCE mode. Because a high input during reset can
cause the device to enter ONCE mode or a reserved test mode, caution must be exercised
Содержание 87C196CA
Страница 1: ...8XC196Lx Supplement to 8XC196Kx 8XC196Jx 87C196CA User s Manual August 2004 Order Number 272973 003...
Страница 9: ...1 Guide to This Manual...
Страница 10: ......
Страница 13: ...2 Architectural Overview...
Страница 14: ......
Страница 22: ......
Страница 23: ...3 Address Space...
Страница 24: ......
Страница 33: ...4 Standard and PTS Interrupts...
Страница 34: ......
Страница 43: ...5 I O Ports...
Страница 44: ......
Страница 51: ...6 Synchronous Serial I O Port...
Страница 52: ......
Страница 56: ......
Страница 57: ...7 Event Processor Array...
Страница 58: ......
Страница 65: ...8 J1850 Communications Controller...
Страница 66: ......
Страница 89: ...9 Minimum Hardware Considerations...
Страница 90: ......
Страница 93: ...10 Special Operating Modes...
Страница 94: ......
Страница 98: ......
Страница 99: ...11 Programming the Nonvolatile Memory...
Страница 100: ......
Страница 106: ......
Страница 107: ...A Signal Descriptions...
Страница 108: ......
Страница 118: ......
Страница 119: ...Glossary...
Страница 120: ......
Страница 133: ...Index...
Страница 134: ......