Chapter 5 Programming Considerations
© National Instruments Corporation 5-5 GPIB-1014 User Manual
Case 2: The TLC, as a Listener, takes control upon receipt of the Take Control Synchronously
auxiliary command. If programmed I/O is used, the Take Control Synchronously
auxiliary command should be issued between seeing a DI status bit and reading the last
byte from the DIR.
If DMA is used, a handshake holdoff must be in effect after the last data byte is read in
order for the Take Control Synchronously auxiliary command to work properly. This
is accomplished by first writing 100XX110 (binary) to the AUXMR. Writing this byte
to the AUXMR issues the RFD holdoff on End mode auxiliary command to the TLC,
and also causes the END bit in ISR1 to be set at reception of the EOS message.
Next, the carry cycle feature of the GPIB-1014 should be used to cause the RFD
holdoff on all data mode auxiliary command to be written to AUXRA before the
DMAC reads the last data byte from the TLC. Finally, set the CC bit in CFG1, and
then start the DMA transfer. When the DMA transfer has finished, either from an
END interrupt or a FIN interrupt, issue the Take Control Synchronously auxiliary
command followed by the Finish Handshake auxiliary command.
Case 3: The TLC, as neither Talker nor Listener, takes control synchronously with the Take
Control Synchronously auxiliary command. Because the Listen in Continuous Mode
auxiliary function is active, the Take Control Synchronously auxiliary command may
be sent at any time.
When the Take Control Synchronously auxiliary command is used, the TLC takes control of the
GPIB only at the end of a data transfer. This implies that one transfer must follow or be in
progress when the Take Control Synchronously auxiliary command is issued. If this is not the
case, the Take Control Asynchronously auxiliary command must be used. Of course, the Take
Control Asynchronously auxiliary command may be used in place of the Take Control
Synchronously auxiliary command when the possibility of disrupting an in-progress GPIB
handshake (before all GPIB Listeners have accepted the data byte) is acceptable.
In Cases 2 and 3 above, the END IE bit in IMR1 can also be set to indicate to the program that
the TLC (functioning as a GPIB Listener) has received its last byte.
In all cases, a CO bit status of 1 indicates that the GPIB-1014 is now Active Controller.
Going from Active to Idle ControllerGoing from Active to Idle GPIB Controller, also known as passing control, requires that the TLC
be the Active Controller initially (in order to send the necessary GPIB command messages).
After the TLC has become the GPIB Active Controller, it must complete the following
procedures to pass control:
1. Write the GPIB Talk address of the device being passed control to the CDOR.
2. In response to the next CO status, write the GPIB TCT message to the CDOR.
3. As soon as the TCT command message is accepted by all devices on the GPIB, the TLC
automatically unasserts ATN and the new Controller asserts ATN.