
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)
Summary of Contents for AT-MIO-16D
Page 16: ......
Page 23: ......
Page 185: ......
Page 206: ......
Page 207: ......
Page 208: ......
Page 209: ......
Page 210: ......
Page 211: ......
Page 212: ......
Page 213: ......
Page 214: ......
Page 215: ......
Page 216: ......
Page 217: ......
Page 218: ......
Page 219: ......
Page 220: ......
Page 221: ......
Page 222: ......
Page 223: ......
Page 224: ......
Page 225: ......
Page 226: ......
Page 227: ......
Page 228: ......
Page 229: ......
Page 230: ......
Page 231: ......
Page 232: ......
Page 233: ......
Page 234: ......
Page 235: ......
Page 236: ......
Page 237: ......
Page 238: ......
Page 239: ......
Page 240: ......
Page 241: ......
Page 242: ......
Page 243: ......
Page 244: ......
Page 246: ......
Page 247: ......
Page 248: ......
Page 249: ......
Page 250: ......
Page 251: ......
Page 252: ......
Page 253: ......
Page 254: ......
Page 255: ......
Page 256: ......
Page 257: ......
Page 258: ......
Page 259: ......
Page 260: ......
Page 261: ......