Step 6: remove the interrupt handler – Ocean Optics PC2000-PC_104 User Manual
Page 15
![background image](/manuals/292646/15/background.png)
PC2000-PC/104 Data Sheet
Many actions happen at interrupt time. First, we disable the PC2000-PC104 so that it does not
continue to scan. Then, we read the data from the FIFO. After the data is read, the spectrometer is
reset. You must be sure to tell the computer you have serviced the interrupt. That is done by issuing a
non-specific end-of-interrupt (EOI) to the 8259 interrupt controller chip by outport_byte(0x20,0x20).
At the end of this function, if you wish to immediately capture another scan, you can call the function
in
Step 4: Trigger a Data Acquisition Cycle
after the outport_byte(0x20,0x20) function call.
Step 6: Remove the Interrupt Handler
When you are done with the driver communicating with the spectrometer, you must return the
interrupt vector to its original state. Again, this function will depend on your operating environment,
and we provide a sample in Borland C 4.0 for DOS.
Disable()
disable interrupts during this change
if irq == 2 then outport_byte(0x21,
inport_byte(0x21) | 0x04)
mask the correct IRQ
if irq == 3 then outport_byte(0x21,
inport_byte(0x21) | 0x08)
mask the correct IRQ
if irq == 5 then outport_byte(0x21,
inport_byte(0x21) | 0x20)
mask the correct IRQ
if irq == 7 then outport_byte(0x21,
inport_byte(0x21) | 0x21)
mask the correct IRQ
Setvect(irq + 8,oldvect)
restore the old interrupt vector
enable()
reenable interrupts once the change is
completed
000-00000-000-05-0704
15