Specifications
EPC-8 Hardware Reference
5 5
5-8
1) The 8259 interrupt controller is enabled to capture interrupts before a
VMEbus interrupt occurs (otherwise VMEbus interrupts will be totally
missed) and
2) You must handle all pending VMEbus interrupts before returning from the
interrupt handler.
• When an interrupt occurs, first acknowledge the interrupt to the PC/AT 8259
interrupt controllers by sending both
interrupt controllers an End-of-Interrupt
(EOI).
• You must make sure that your interrupt handler code is not re-entered while
dispatching interrupts. Either all interrupts should be disabled or IRQ10 should
be masked after doing the EOI to the interrupt controller. Remember to
re-enable them prior to leaving the interrupt handler.
• If you are using DOS, you may need to switch to an internal stack. This may or
may not be necessary in other environments and applications. You should also
store the state of the VMEbus (i.e., current byte ordering, bus mappings and
address modifiers) if you expect the state to change. Be sure to restore the state
before leaving the interrupt handler.
Start of Loop
• Determine the source of the interrupt or event. This can be done by reading the
VME Interrupt State register which should be ANDed with the VME Interrupt
Enable register. As described above, the VME Event State register and VME
Event enable register may also be potential sources for the generation of IRQ10.
Keep in mind that all pending interrupts must be handled.
• If the interrupt is a VMEbus interrupt 1-7;
Acknowledge the interrupt to the VMEbus device generating the interrupt as
follows:
1- Set the IACK bit in the VME Modifier register.
2- Establish a byte-ordering for the status/ID to be read. Whether this is an 8-
bit or 16-bit read is dependent on the card issuing the interrupt.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com