5-4
Serial ports
PC-510 user’s manual
2. Determine the interrupt status port address based on bit 5 (I/O range
select A) and bit 4 (I/O range select B) at register 0A9h. See the table
below.
Table 5-6
Reading the interrupt status port: Register 0A9h
I/O range
select
A B
COM3
addresses
COM4
addresses
COM5
addresses
COM6
addresses
Interrupt
status
port
*(
*(
'()
()
()
''
*(
*(
'(
(
(
'
*(
*(
'(
(
(
'
*(
*(
'(
(
(
)/
j/Z [\/q@Z []/q
For example, if bits 5 and 4 are both 1, the interrupt status port address
is 338h (default). If bits 5 and 4 are both 0, the interrupt status port
address is 158h; if bit 5 is 0 and bit 4 is 1, the address for the interrupt
status port is 138h; and if bit 5 is 1 and bit 4 is 0, the address for the
interrupt status port is at 358h.
3. Inside your interrupt handler, read the interrupt status port. Bit 0
through bit 3 show which serial port caused the interrupt.
For example, when there is a 1 in bit 3, this means COM3 caused the
interrupt; a 1 in bit 2 shows that the interrupt came from COM4; a 1 in
bit 1 means that COM5 caused the interrupt; and by default, when a 1 is
in bit 0, then COM6 caused the interrupt. See the table above to read
the interrupt status port.
Note
Exit the interrupt handler only when bits 0 through 3 are all at 0.
Table 5-7
Interrupt status port (138h, 158h, 338h, and 358h)
Bit
Location
'
#
Note
All 0s as bits indicate no interrupt and a 1 indicates an interrupt.
It is possible to change the interrupt through the IRQ routing matrix.
You can also change bits 4 and 5 I/O ranges, COM5 and COM6
addresses, and the status port addresses through the IRQ routing matrix.
See the
IRQ routing and opto IRQs
chapter for more details on how to
change and reroute base addresses.
Summary of Contents for PC-510
Page 7: ...Notice to user PC 510 user s manual ...
Page 17: ...xii Contents PC 510 user s manual ...
Page 23: ...About this manual PC 510 user s manual ...
Page 25: ...Overview of Section 1 PC 510 user s manual ...
Page 35: ...2 2 Quick start PC 510 user s manual Figure 2 1 PC 510 component diagram ...
Page 45: ...2 12 Quick start PC 510 user s manual ...
Page 55: ...3 10 SETUP programs PC 510 user s manual ...
Page 59: ...4 4 Save and run programs PC 510 user s manual ...
Page 61: ...Overview of Section 2 PC 510 user s manual ...
Page 73: ...5 12 Serial ports PC 510 user s manual ...
Page 77: ...6 4 LPT1 parallel port PC 510 user s manual ...
Page 83: ...7 6 Console devices PC 510 user s manual ...
Page 119: ...13 8 CRTs and flat panels PC 510 user s manual ...
Page 123: ...14 4 GPS interface PC 510 user s manual ...
Page 125: ...15 2 PC 104 expansion PC 510 user s manual ...
Page 127: ...Overview of Section 3 PC 510 user s manual ...
Page 131: ...16 4 Watchdog timer and hardware reset PC 510 user s manual ...
Page 147: ...18 8 Transferring files remote disks PC 510 user s manual ...
Page 177: ...21 22 CPU power management PC 510 user s manual ...
Page 181: ...22 4 Troubleshooting PC 510 user s manual ...
Page 183: ...Overview of Section 4 PC 510 user s manual ...
Page 203: ...A 20 Technical data PC 510 user s manual ...
Page 231: ...B 28 Software utilities PC 510 user s manual ...