![Intel 80C196NU Скачать руководство пользователя страница 152](http://html1.mh-extra.com/html/intel/80c196nu/80c196nu_user-manual_2072209152.webp)
7-7
I/O PORTS
7.2.2
Bidirectional Port Pin Configurations
Each bidirectional port pin can be individually configured to operate either as an I/O pin or as a
pin for a special-function signal. In the special-function configuration, the signal is controlled by
an on-chip peripheral or an off-chip component. In either configuration, two modes are possible:
•
complementary output (output only)
•
high-impedance input or open-drain output (input, output, or bidirectional)
To prevent the CMOS inputs from floating, the bidirectional port pins are weakly pulled high dur-
ing and after reset, until your software writes to Px_MODE. The default values of the control reg-
isters after reset configure the pins as high-impedance inputs with weak pull-ups. To ensure that
the ports are initialized correctly and that the weak pull-ups are turned off, follow this suggested
initialization sequence:
1.
Write to Px_DIR to establish the individual pins as either inputs or outputs. (Outputs will
drive the data that you specify in step 3.)
— For a complementary output, clear its Px_DIR bit.
— For a high-impedance input or an open-drain output, set its Px_DIR bit. (Open-drain
outputs require external pull-ups.)
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-ups. 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-ups are turned off.
— For a standard I/O pin, clear its Px_MODE bit. In this mode, the pin is driven as
defined in steps 1 and 3.
— For a special-function signal, set its Px_MODE bit. In this mode, the associated
peripheral controls the pin.
3.
Write to Px_REG.
— For output pins defined in step 1, write the data that is to be driven by the pins to the
corresponding Px_REG bits. For special-function outputs, the value is immaterial
because the peripheral controls the pin. However, you must still write to Px_REG to
initialize the pin.
— For input pins defined in step 1, set the corresponding Px_REG bits.
Table 7-6 lists the control register values for each possible configuration. For special-function
outputs, the Px_REG value is irrelevant (don’t care) because the associated peripheral controls
the pin in special-function mode. However, you must still write to Px_REG to initialize the pin.
For a bidirectional pin to function as an input (either special function or port pin), you must set
Px_REG.
Содержание 80C196NU
Страница 1: ...8XC196NP 80C196NU Microcontroller User s Manual...
Страница 2: ...8XC196NP 80C196NU Microcontroller User s Manual August 1995 Order Number 272479 002...
Страница 18: ...1 Guide to This Manual...
Страница 19: ......
Страница 31: ......
Страница 32: ...2 Architectural Overview...
Страница 33: ......
Страница 48: ...3 Advanced Math Features...
Страница 49: ......
Страница 56: ...4 Programming Considerations...
Страница 57: ......
Страница 72: ...5 Memory Partitions...
Страница 73: ......
Страница 106: ...6 Standard and PTS Interrupts...
Страница 107: ......
Страница 144: ...7 I O Ports...
Страница 145: ......
Страница 165: ......
Страница 166: ...8 Serial I O SIO Port...
Страница 167: ......
Страница 183: ......
Страница 184: ...9 Pulse width Modulator...
Страница 185: ......
Страница 196: ...10 Event Processor Array EPA...
Страница 197: ......
Страница 225: ......
Страница 226: ...11 Minimum Hardware Considerations...
Страница 227: ......
Страница 239: ......
Страница 240: ...12 Special Operating Modes...
Страница 241: ......
Страница 255: ......
Страница 256: ...13 Interfacing with External Memory...
Страница 257: ......
Страница 303: ......
Страница 304: ...A Instruction Set Reference...
Страница 305: ......
Страница 373: ......
Страница 374: ...B Signal Descriptions...
Страница 375: ......
Страница 390: ...C Registers...
Страница 391: ......
Страница 447: ......
Страница 448: ...Glossary...
Страница 449: ......
Страница 458: ...Index...
Страница 459: ......