GPIB protocol

GPIB command bytes

The meaning and values of the possible GPIB command bytes are as follows:

Table 12. GPIB command bytes

byte value (hexadecimal)namedescription
0x1GTLGo to local
0x4SDCSelected device clear
0x5PPConfig (also 'PPC' on non-powerpc architectures)Parallel poll configure
0x8GETGroup execute trigger
0x9TCTTake control
0x11LLOLocal lockout
0x14DCLDevice clear
0x15PPUParallel poll unconfigure
0x18SPESerial poll enable
0x19SPDSerial poll disable
0x20 to 0x3eMLA0 to MLA30My (primary) listen address 0 to 30
0x3fUNLUnlisten
0x40 to 0x5eMTA0 to MTA30My (primary) talk address 0 to 30
0x5fUNTUntalk
0x60 to 0x6fMSA0 to MSA15, also PPEWhen following a talk or listen address, this is 'my secondary address' 0 to 15. When following a parallel poll configure, this is 'parallel poll enable'. For parallel poll enable, the least significant 3 bits of the command byte specify which DIO line the device should use to send its parallel poll response. The fourth least significant bit (0x8) indicates the 'sense' or polarity the device should use when responding.
0x70 to 0x7dMSA16 to MSA29, also PPDWhen following a talk or listen address, this is 'my secondary address' 16 to 29. When following a parallel poll configure, this is 'parallel poll disable'.
0x7eMSA30My secondary address 30

GPIB bus lines

Physically, the GPIB bus consists of 8 data lines, 3 handshaking lines, and 5 control lines (and 8 ground lines). Brief descriptions of how they are used follow:

Table 13. GPIB bus lines

bus linedescriptionpin number
DIO1 through DIO8Data input/output bits. These 8 lines are used to read and write the 8 bits of a data or command byte that is being sent over the bus.DIO1 to DIO4 use pins 1 to 4, DIO5 to DIO8 use pins 13 to 16
EOIEnd-or-identify. This line is asserted with the last byte of data during a write, to indicate the end of the message. It can also be asserted along with the ATN line to conduct a parallel poll.5
DAVData valid. This is a handshaking line, used to signal that the value being sent with DIO1-DIO8 is valid. During transfers the DIO1-DIO8 lines are set, then the DAV line is asserted after a delay called the 'T1 delay'. The T1 delay lets the data lines settle to stable values before they are read.6
NRFDNot ready for data. NRFD is a handshaking line asserted by listeners to indicate they are not ready to receive a new data byte.7
NDACNot data accepted. NDAC is a handshaking line asserted by listeners to indicate they have not yet read the byte contained on the DIO lines.8
IFCInterface clear. The system controller can assert this line (it should be asserted for at least 100 microseconds) to reset the bus and make itself controller-in-charge.9
SRQService request. Devices on the bus can assert this line to request service from the controller-in-charge. The controller can then poll the devices until it finds the device requesting service, and perform whatever action is necessary.10
ATNAttention. ATN is asserted to indicate that the DIO lines contain a command byte (as opposed to a data byte). Also, it is asserted with EOI when conducting parallel polls.11
RENRemote enable. Asserted by the system controller, it enables devices to enter remote mode. When REN is asserted, a device will enter remote mode when it is addressed by the controller. When REN is false, all devices will immediately return to local mode. 17