Interrupt Handling - National Instruments PC-DIO-24 User Manual

Digital i/o board for the ibm pc/xt/at
Table of Contents

Advertisement

Chapter 4
/* EXAMPLE 3–Set up interrupts for mode 1 output for port A.
the interrupt enable bit. */
outp(cnfg,0xA0);
outp(cnfg,0x0D);
outp(cnfg,0x0C);
/* EXAMPLE 4–Set up interrupts for mode 1 output for port B.
the interrupt enable bit. */
outp(cnfg,0x84);
outp(cnfg,0x05);
outp(cnfg,0x08);
/* EXAMPLE 5–Set up interrupts for mode 2 output transfers.
interrupt enable bit. */
outp(cnfg,0xC0);
outp(cnfg,0x0D);
outp(cnfg,0x04);
/* EXAMPLE 6–Set up interrupts for mode 2 input transfers.
interrupt enable bit. */
outp(cnfg,0xD0);
outp(cnfg,0x09);
outp(cnfg,0x04);
}

Interrupt Handling

A jumper setting on the PC-DIO-24 selects the signal that is used for the interrupt enable signal.
If jumper W1 is set to N/C, interrupts are disabled. Jumper W1 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 PC-DIO-24 are disabled.
The following table summarizes which signal should be used as the interrupt enable for all mode
combinations.
© National Instruments Corporation
/* Port A is an output in mode 1. */
/* Set PC6 to enable interrupts from
82C55A. */
/* Clear PC4 to enable interrupts. */
/* Port B is an output in mode 1. */
/* Set PC2 to enable interrupts from
82C55A. */
/* Clear PC4 to enable interrupts. */
/* mode 2 output */
/* Set PC6 to enable interrupts from
82C55A. */
/* Clear PC2 to enable interrupts. */
/* mode 2 input */
/* Set PC4 to enable interrupts from
82C55A. */
/* Clear PC2 to enable interrupts. */
4-15
Register-Level Programming
Select PC4 as
Select PC4 as
Select PC2 as the
Select PC2 as the
PC-DIO-24 User Manual

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents