![Intel 8XC196NT Скачать руководство пользователя страница 158](http://html1.mh-extra.com/html/intel/8xc196nt/8xc196nt_user-manual_2072210158.webp)
6-9
I/O PORTS
6.3.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 6-8 lists the control register values for each possible configuration. For special-function
outputs, the Px_REG value is immaterial (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.
Содержание 8XC196NT
Страница 1: ...8XC196NT Microcontroller User s Manual...
Страница 2: ...8XC196NT Microcontroller User s Manual June 1995 Order Number 272317 003...
Страница 22: ...1 Guide to This Manual...
Страница 23: ......
Страница 35: ......
Страница 36: ...2 Architectural Overview...
Страница 37: ......
Страница 49: ......
Страница 50: ...3 Programming Considerations...
Страница 51: ......
Страница 66: ...4 Memory Partitions...
Страница 67: ......
Страница 104: ...5 Standard and PTS Interrupts...
Страница 105: ......
Страница 147: ......
Страница 148: ...6 I O Ports...
Страница 149: ......
Страница 176: ...7 Serial I O SIO Port...
Страница 177: ......
Страница 194: ...8 Synchronous Serial I O SSIO Port...
Страница 195: ......
Страница 211: ......
Страница 212: ...9 Slave Port...
Страница 213: ......
Страница 231: ......
Страница 232: ...10 Event Processor Array EPA...
Страница 233: ......
Страница 270: ...11 Analog to digital Converter...
Страница 271: ......
Страница 291: ......
Страница 292: ...12 Minimum Hardware Considerations...
Страница 293: ......
Страница 306: ...13 Special Operating Modes...
Страница 307: ......
Страница 317: ......
Страница 318: ...14 Interfacing with External Memory...
Страница 319: ......
Страница 362: ...15 Programming the Nonvolatile Memory...
Страница 363: ......
Страница 408: ...A Instruction Set Reference...
Страница 409: ......
Страница 476: ...B Signal Descriptions...
Страница 477: ......
Страница 493: ......
Страница 494: ...C Registers...
Страница 495: ......
Страница 565: ......
Страница 566: ...Glossary...
Страница 567: ......
Страница 580: ...Index...
Страница 581: ......
Страница 597: ......