Chapter 4
Programming
© National Instruments Corporation
4-87
AT-MIO-16D User Manual
Mode 2–Bidirectional Bus
Mode 2 has a bidirectional 8-bit bus that can transfer both input and output without changing the
configuration. The data transfers are synchronized with handshaking lines in Port C in a manner
similar to that of Mode 1. This mode uses only Port A; however, Port B can be used in either
Mode 0 or Mode 1 while Port A is configured for Mode 2. Interrupt generation and enable
and/or disable functions are also available. Other features of this mode include the following:
•
Used in Group A only (Port A and upper nibble of Port C).
•
One 8-bit bidirectional port (Port A) and a 5-bit control status port (Port C).
•
Latched inputs and outputs.
The control word written to the DIO-24 CNFG Register to configure Port A as a bidirectional
data bus in Mode 2 is shown as follows. If Port B is configured for Mode 0, then PC2, PC1, and
PC0 of Port C can be used as extra input or output lines.
Port C
(PC2-PC0)
1 = input
0 = output
Port B
1 = input
0 = output
Group B Mode
0 = Mode 0
1 = Mode 1
1
X
X
1/0
1
1/0
X
1/0
7
6
5
4
3
2
1
0
During a Mode 2 data transfer, the status of the handshaking lines and interrupt signals can be
obtained by reading Port C. The Port C status-word bit definitions for a Mode 2 transfer are
shown as follows.
The following are the Port C status-word bit definitions for bidirectional data path (Port A only):
7
6
5
4
3
2
1
0
OBFA*
INTE1
IBFA
INTE2
INTRA
I/O
I/O
I/O
Bit
Name
Description
7
OBFA*
Output buffer full. Low indicates that the CPU has written data to
Port A.
(continues)
Содержание AT-MIO-16D
Страница 16: ......
Страница 23: ......
Страница 185: ......
Страница 206: ......
Страница 207: ......
Страница 208: ......
Страница 209: ......
Страница 210: ......
Страница 211: ......
Страница 212: ......
Страница 213: ......
Страница 214: ......
Страница 215: ......
Страница 216: ......
Страница 217: ......
Страница 218: ......
Страница 219: ......
Страница 220: ......
Страница 221: ......
Страница 222: ......
Страница 223: ......
Страница 224: ......
Страница 225: ......
Страница 226: ......
Страница 227: ......
Страница 228: ......
Страница 229: ......
Страница 230: ......
Страница 231: ......
Страница 232: ......
Страница 233: ......
Страница 234: ......
Страница 235: ......
Страница 236: ......
Страница 237: ......
Страница 238: ......
Страница 239: ......
Страница 240: ......
Страница 241: ......
Страница 242: ......
Страница 243: ......
Страница 244: ......
Страница 246: ......
Страница 247: ......
Страница 248: ......
Страница 249: ......
Страница 250: ......
Страница 251: ......
Страница 252: ......
Страница 253: ......
Страница 254: ......
Страница 255: ......
Страница 256: ......
Страница 257: ......
Страница 258: ......
Страница 259: ......
Страница 260: ......
Страница 261: ......