![Intel 8XC196NT Скачать руководство пользователя страница 154](http://html1.mh-extra.com/html/intel/8xc196nt/8xc196nt_user-manual_2072210154.webp)
6-5
I/O PORTS
ter is a status register that returns the logic level present on the pins; it can only be read. The
registers for the standard ports are byte-addressable and can be windowed. The port 5 registers
must be accessed using 16-bit addressing and cannot be windowed. “Bidirectional Port Consid-
erations” on page 6-11 discusses special considerations for reading P2_REG.7 and P6_REG.7:4.
6.3.1
Bidirectional Port Operation
Figure 6-2 shows the logic for driving the output transistors, Q1 and Q2. Q1
can source at least
–3 mA at V
CC
– 0.7 volts. Q2 can sink at least 3 mA at 0.45 volts. (Consult the datasheet for spec-
ifications.)
In I/O mode (selected by clearing Px_MODE.y), Px_REG and Px_DIR are input to the multiplex-
ers. These signals combine to drive the gates of Q1 and Q2 so that the output is high, low, or high
impedance. Table 6-6 is a logic table for I/O operation of these ports.
Table 6-5. Bidirectional Port Control and Status Registers
Mnemonic
Address
Description
P1_DIR
P2_DIR
P5_DIR
P6_DIR
1FD2H
1FCBH
1FF3H
1FD3H
Port
x
Direction
Each bit of P
x
_DIR controls the direction of the corresponding pin.
0 = complementary output (output only)
1 = input or open-drain output (input, output, or bidirectional)
Open-drain outputs require external pull-ups.
P1_MODE
P2_MODE
P5_MODE
P6_MODE
1FD0H
1FC9H
1FF1H
1FD1H
Port
x
Mode
Each bit of P
x
_MODE controls whether the corresponding pin
functions as a standard I/O port pin or as a special-function signal.
0 = standard I/O port pin
1 = special-function signal
P1_PIN
P2_PIN
P5_PIN
P6_PIN
1FD6H
1FCFH
1FF7H
1FD7H
Port
x
Input
Each bit of P
x
_PIN reflects the current state of the corresponding
pin, regardless of the pin configuration.
P1_REG
P2_REG
P5_REG
P6_REG
1FD4H
1FCDH
1FF5H
1FD5H
Port
x
Data Output
For an input, set the corresponding P
x
_REG bit.
For an output, write the data to be driven out by each pin to the
corresponding bit of P
x
_REG. When a pin is configured as standard
I/O (P
x
_MODE.
x
=0), the result of a CPU write to P
x
_REG is
immediately visible on the pin. When a pin is configured as a
special-function signal (P
x
_MODE.
x
=1), the associated on-chip
peripheral or off-chip component controls the pin. The CPU can still
write to P
x
_REG, but the pin is unaffected until it is switched back to
its standard I/O function.
This feature allows software to configure a pin as standard I/O (clear
P
x
_MODE.
x
), initialize or overwrite the pin value, then configure the
pin as a special-function signal (set P
x
_MODE.
x
). In this way, initial-
ization, fault recovery, exception handling, etc., can be done without
changing the operation of the associated peripheral.
Содержание 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: ......