Address Mode 1; Address Mode 2; Address Mode 3 - National Instruments Corporation GPIB-1014P User Manual

Table of Contents

Advertisement

Programming Considerations

Address Mode 1

If the TLC ADMR has been configured for Address Mode 1, the TLC responds to the reception of
two primary GPIB addresses: major and minor. Upon receipt of its major or minor MTA or its
major or minor MLA from the GPIB Active Controller, the TLC is addressed as Talker or Listener.
If the TLC has received its GPIB Talk Address, the TA bit in the ADSR is set, the ADSC bit in
ISR2 is set, and the DO bit in ISR1 is set. If the TLC has received its GPIB Listen address, the LA
bit in the ADSR is set, the ADSC bit in ISR2 is set, and the DI bit in ISR1 is set when the first
GPIB data byte is received.

Address Mode 2

Address Mode 2 is used when Talker Extended (TE) or Listener Extended (LE) functions are to be
used. TE and LE functions require receipt of two addresses (primary and secondary) before setting
TA or LA. The TLC GPIB primary address is specified by the byte written to ADR0. The
secondary address is specified by the byte written to ADR1. Upon receipt of both the primary and
secondary GPIB addresses the TLC becomes an addressed Talker or Listener. If the TLC has
received its primary GPIB talk address, the Talker Primary Addressed State (TPAS) bit in the
ADSR is set. If the TLC receives its secondary GPIB talk address before receiving another GPIB
Primary Command Group (PCG) message that is not its MTA, the TA bit in the ADSR, the ADSC
bit in the ISR2, and the DO bit in the ISR1 are set. If the MC-GPIB has received its primary GPIB
listen address, the Listener Primary Addressed State (LPAS) bit in the ADSR is set. If the TLC
receives its secondary GPIB listen address before receiving another GPIB Primary Command
Group (PCG) message that is not its MLA, the LA bit in the ADSR is set, the ADSC bit in ISR2 is
set, and the DI bit in ISR1 is set when the first GPIB data byte is received. The Major-Minor
(MJMN) bit in the ADSR indicates whether the address status refers to the major or minor address.

Address Mode 3

Address Mode 3, like Address Mode 2, is used to implement Extended GPIB Talk and Listen
address recognition. However, unlike Address Mode 2, Address Mode 3 provides for both major
and minor primary addresses, and your program must identify the secondary address by reading the
CPTR. Proper operation using Address Mode 3 is listed as follows:
1. During initialization of the TLC, enable Address Mode 3 (and optionally set the APT IE bit in
IMR1 to enable an interrupt request on receipt of a secondary GPIB address). Write the TLC
major GPIB primary address to ADR0 and the TLC minor GPIB primary address to ADR1.
2. Receipt of the TLC major or minor primary GPIB Talk Address (MTA) or major or minor
primary GPIB Listen Address (MLA) sets TPAS or LPAS, indicating that the primary address
has been received.
3. If the next GPIB command following the primary address is a secondary address, the APT bit
is set and a DAC handshake holdoff is activated (the GPIB DAC message is held false).
4. In response to APT, the program must:
Determine whether the command just received is a listen, talk, major, or minor address by
reading the LPAS, TPAS, and MJMN bits of the ADSR.
Read the secondary address in the CPTR and determine whether or not it is the address of
the TLC.
GPIB-1014P User Manual
5-6
© National Instruments Corporation
Section Five

Advertisement

Table of Contents
loading

Table of Contents