6-14
Programming Options
When you power up your computer, your PIO-SSR Series board sets the
IRQ signals of all C0 and C3 channels to 1, disabling the IRQ Control
registers. Before you can use the interrupts on a PIO-SSR-120 with a base
I/O address of 300h, you must issue the following commands to enable
the IRQ Control registers:
OUT &H314, &HFF
’Disable/clear Group 1 to 4 IRQs
OUT &H315, &HFF
’Disable/clear Group 5 IRQs
OUT &H314, &Hxx
’Where xx is 0 (binary) for each
’interrupt to be used
OUT &H315, &Hxx
’Where xx is 0 (binary) for each
’interrupt to be used
After you enable the IRQ Control registers and position the IRQ jumper
at the desired level, your PIO-SSR Series board can issue IRQs to the
computer. You can then determine which channels have issued IRQs by
reading the IRQ Status Registers 1 and 2. When the interrupts are
complete, use the above commands to disable, clear, and re-enable the
IRQ Control registers.
Note that if you are using a PIO-SSR-120, you need two write commands
to disable/clear the two IRQ Control registers, because the board is using
the 8-bit data bus. As Figure 6-1 on page 6-11 shows, the write signals
from IRQ Control Registers 1 and 2 plus the output of the OR gate are
connected to the AND gate. When at least one IRQ is indicated at each
IRQ Control register, writing to clear one register causes the issue of an
extra IRQ because the second register is not cleared by the first write. To
avoid this extra interrupt, Keithley recommends using your interrupt-
handler program (shown in the above commands) to disable, clear, and
re-enable both IRQ Control registers by checking the settings in your IRQ
Status registers before returning to the main program.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com