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.
Содержание 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: ......