Programming Considerations
Section Five
GPIB-1014P User Manual
5-8
© National Instruments Corporation
Sending/Receiving END or EOS
The GPIB END message is sent by issuing the Send EOI auxiliary command just before writing
the last data byte to the CDOR. The GPIB EOS message is sent simply by making the last byte
written to the CDOR the End Of String (EOS) code.
The END status bit or interrupt is used to inform the program of the receipt of an END or EOS
message.
Interrupts
The interrupt circuitry of the GPIB-1014P allows the board to interrupt the CPU to request service.
Prior to use, the following three characteristics of the interrupter must be set (see Interrupt Request
Line Selection in Section Three for details):
•
The interrupt request (IRQ) line is selected via a hardware jumper.
•
The interrupt priority is determined by three switches.
•
The encoded value of the switches must match the interrupt request line.
•
A Status/ID byte is set by an 8-switch DIP. This byte is used by the operating system to
determine the appropriate interrupt handler.
The
µ
PD7210 TLC is the only source of interrupts on the GPIB-1014P. The TLC generates
interrupts on any of the 13 conditions specified by the ISR1 and ISR2 bits. For one of these
conditions to drive the selected IRQ line, the following criteria must be satisfied:
•
The interrupt condition must be true.
•
The interrupt condition must be enabled (bits in IMR1 and IMR2).
•
The
µ
PD7210 interrupt signal must be programmed to be active high (see Auxiliary Register B
in Section Four).
After an interrupt is generated, the operating system will ask the interrupting source for a Status/ID
byte so that it can branch to the appropriate interrupt handler. The status of the TLC interrupt is then
found by reading the appropriate TLC status registers.
The status bits in ISR1 or ISR2 are all automatically cleared when the register is read, even if the
conditions are still true. If two conditions are true at the same time (that is, more than one bit in
ISR1 or ISR2 is set), software copy of the register must be maintained if the program is going to
analyze the conditions one at a time.
Serial Polls
Conducting Serial Polls
The TLC, as CIC, serially polls other devices as described in the IEEE-488 specification. From the
programming point of view, the TLC must first become Active Controller to send the addressing
and enabling commands to the device being polled, make itself a GPIB Listener by issuing the
Listen auxiliary command, and then go to standby with the Go To Standby auxiliary command in
order to read the status byte.