PCI-ICM422/2(4) and 485/2(4) Manual
Page 5-4
Manual MPCI-ICM4S.F1b
The handler would first read the Interrupt Identification Register at Base A2. If the interrupt
is for Received Data Available, the handler then reads the data. If no interrupt is pending, control
exits the routine. A sample handler, written in C, is as follows:
readback = inportb(BA2);
if (readback & 4)
/*Readback will be set to 4 if data are available*/
data[i++]=inportb(BASEADDR);
outportb(0x20,0x20);
/*Write EOI to 8259 Interrupt Controller*/
return;
Transmission
RS485 transmission is simple to implement. The AUTO feature of the PCI-ICM422/485 card
automatically enables the transmitter when data are ready to send. No software enabling is required.
The following C code fragment demonstrates this process:
while(data[i]);
/*While there is data to send*/
{
while(!(inportb(BA5)&0x20));
/*Wait until transmitter is empty*/
outportb(BASEADDR,data[i]);
i++;
}
Summary of Contents for PCI-ICM422/2
Page 2: ......
Page 16: ...PCI ICM422 2 4 and 485 2 4 Manual Page 2 6 Manual MPCI ICM4S F1b...
Page 19: ...Page 3 3 Manual MPCI ICM4S F1b Figure 3 2 Option Selection Map...
Page 20: ...PCI ICM422 2 4 and 485 2 4 Manual Page 3 4 Manual MPCI ICM4S F1b...
Page 22: ...PCI ICM422 2 4 and 485 2 4 Manual Page 4 2 Manual MPCI ICM4S F1b...
Page 28: ...PCI ICM422 2 4 and 485 2 4 Manual Page 6 2 Manual MPCI ICM4S F1b...
Page 32: ...PCI ICM422 2 4 and 485 2 4 Manual Page A 4 Manual MPCI ICM4S F1b...