Programming
Chapter 4
AT-MIO-16D User Manual
4-90
© National Instruments Corporation
/* EXAMPLE 2–Set up interrupts for Mode 1 input for Port B. Select PC6 as the
interrupt enable bit. */
outp(cnfg,0x86);
/* Port B is an input in Mode 1. */
outp(cnfg,0x05);
/* Set PC2 to enable interrupts from
82C55A. */
outp(cnfg,0x0C);
/* Clear PC6 to enable interrupts. */
/* EXAMPLE 3–Set up interrupts for Mode 1 output for Port A. Select PC4 as
the interrupt enable bit. */
outp(cnfg,0xA0);
/* Port A is an output in Mode 1. */
outp(cnfg,0x0D);
/* Set PC6 to enable interrupts from
82C55A. */
outp(cnfg,0x0C);
/* Clear PC4 to enable interrupts. */
/* EXAMPLE 4–Set up interrupts for Mode 1 output for Port B. Select PC4 as
the interrupt enable bit. */
outp(cnfg,0x84);
/* Port B is an output in Mode 1. */
outp(cnfg,0x05);
/* Set PC2 to enable interrupts from
82C55A. */
outp(cnfg,0x08);
/* Clear PC4 to enable interrupts. */
/* EXAMPLE 5–Set up interrupts for Mode 2 output transfers. Select PC2 as the
interrupt enable bit. */
outp(cnfg,0xC0);
/* Mode 2 output */
outp(cnfg,0x0D);
/* Set PC6 to enable interrupts from
82C55A. */
outp(cnfg,0x04);
/* Clear PC2 to enable interrupts. */
/* EXAMPLE 6–Set up interrupts for Mode 2 input transfers. Select PC2 as the
interrupt enable bit. */
outp(cnfg,0xD0);
/* Mode 2 input */
outp(cnfg,0x09);
/* Set PC4 to enable interrupts from
82C55A. */
outp(cnfg,0x04);
/* Clear PC2 to enable interrupts. */
}
DIO-24 Interrupt Handling
A jumper setting on the AT-MIO-16D selects the signal that is used for the DIO-24 interrupt
enable signal. If jumper W14 is set to N/C, interrupts are disabled. Jumper W14 can be used to
select PC2, PC4, or PC6 as the active low interrupt enable signal. For example, if PC2 is
selected, interrupts are enabled if PC2 is logic low. If PC2 is logic high, interrupts from the
DIO-24 circuitry are disabled. Table 4-10 summarizes which signal should be used as the
interrupt enable for all mode combinations.
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: ......