Table of Contents

Advertisement

Quick Links

GPIB-LPT
User Manual
October 1989 Edition
Part Number 320161-01
© Copyright 1989, 1990 National Instruments Corporation.
All Rights Reserved.

Advertisement

Table of Contents
loading

Summary of Contents for National Instruments GPIB-LPT

  • Page 1 GPIB-LPT User Manual October 1989 Edition Part Number 320161-01 © Copyright 1989, 1990 National Instruments Corporation. All Rights Reserved.
  • Page 2 National Instruments Corporation 6504 Bridge Point Parkway Austin, TX 78730-5039 (512) 794-0100 (800) IEEE-488 Fax: (512) 794-8411...
  • Page 3 During the warranty period, the owner may return failed parts to National Instruments for repair. National Instruments will pay the shipping costs of returning the part to the owner. All items returned to National Instruments for repair must be clearly marked on the outside of the package with an RMA number.
  • Page 4 Be sure that the equipment is plugged into a grounded outlet and that the grounding has not been defeated with a cheater plug. If necessary, consult National Instruments or an experienced radio/television technician for additional suggestions. The following booklet prepared by the FCC may also be helpful: How to Identify and Resolve Radio-TV Interference Problems.
  • Page 5 Section Two, Configuration and Installation, describes how to configure and install the GPIB- LPT into your system. Section Three, Function Description, shows a block diagram of the GPIB-LPT and describes the functional components of the GPIB-LPT. Section Four, Running Diagnostic Tests, describes how to run the diagnostic tests that are shipped with the GPIB-LPT.
  • Page 6 Related Documents The following documents are references that cover in greater detail specific topics introduced in this manual: • ANSI/IEEE Standard 488-1978, IEEE Standard Digital Interface for Programmable Instrumentation • IBM Options Adapters Manual GPIB-LPT User Manual © National Instruments Corporation...
  • Page 7: Table Of Contents

    Status Register (STAT) ..................5-3 Control Register (CTRL) ..................5-5 Programming Considerations ..................5-6 Using the GPIB-LPT with the DOS Operating System ........5-6 Using the GPIB-LPT with C and BASIC ............5-6 Acessing the Parallel Port in C ..............5-7 Acessing the Parallel Port in BASIC ............
  • Page 8 Contents Writing a GPIB-LPT Driver ................5-7 Setup and Initialization ................5-8 Interrupt Handler Routine ............... 5-8 PRINT Routine ................5-8 Timing Constraints .................. 5-9 Appendix A Operation of the GPIB ..................A-1 History of the GPIB ....................... A-1 Types of Messages ......................A-1 Talkers, Listeners, and Controllers .................
  • Page 9 Figure 1-1. GPIB-LPT Board ....................1-2 Figure 2-1. GPIB-LPT Parts Locator Diagram ............... 2-1 Figure 2-2. Possible Settings for GPIB-LPT Jumpers ............2-4 Figure 2-3. Switch Setting for REN OFF, IFC ON, SRQ ON , and Address 5 ..... 2-5 Figure 2-4.
  • Page 10: Section One

    IEEE-488 General Purpose Interface Bus (GPIB) format for use with IEEE-488 printers and plotters. The GPIB-LPT looks like a standard parallel port for the IBM PC operating system and software. It can be used to communicate with GPIB printers and plotters with PC application programs, such as AutoCAD, that use parallel ports for printer and plotter output.
  • Page 11: Figure 1-1. Gpib-Lpt Board

    Figure 1-1 shows the GPIB-LPT interface board. Figure 1-1. GPIB-LPT Board The GPIB-LPT works in most true IBM-compatible computers. It does not work in the TI Professional Computer because it uses a different Basic Input Output System (BIOS) than the IBM compatibles.
  • Page 12: What Your Kit Should Contain

    The GPIB-LPT Diagnostic Package Diskette contains the lpt.exe diagnostic test that is described in Section Four, Running Diagnostic Tests. Make sure each of these items is in your kit. If any item is missing, contact National Instruments. Optional Equipment Item...
  • Page 13: Section Two

    Section Two Configuration and Installation Figure 2-1 shows the locations of the GPIB-LPT configuration jumpers and switches. Figure 2-1. GPIB-LPT Parts Locator Diagram © National Instruments Corporation GPIB-LPT User Manual...
  • Page 14: Configuration

    • 278/27C Parallel Port 2 It is shipped from the factory set to 278/27C. The GPIB-LPT needs to be reconfigured if there is another device (such as a printer adapter card or a built-in parallel port) at the same address.
  • Page 15: Switch And Jumper Settings

    Base I/O Address and Interrupt Selection The base I/O address and interrupt line used by the GPIB-LPT are determined by the jumpers located at positions W1 and W2. The jumpers are set at the factory for base I/O address 278/27C hex and interrupt level 5.
  • Page 16: Figure 2-2. Possible Settings For Gpib-Lpt Jumpers

    • • • • • • • • c. Jumpers Set to Default Setting. (Base I/O Address 278/27C hex and Interrupt Level 5) (Parallel Port 2) Figure 2-2. Possible Settings for GPIB-LPT Jumpers GPIB-LPT User Manual © National Instruments Corporation...
  • Page 17: Listen Address And Control Function Selection

    The lower five switches set the listen address of the external device(s) that will be attached to the GPIB-LPT. This address is used to send a GPIB listen address to the device(s) whenever the device(s) indicates that it is not a Listener. The three remaining switches (REN, IFC, and SRQ) have the following special functions: Note: An asterisk (*) after a signal name indicates that the signal is inverted (negative logic).
  • Page 18: Figure 2-4. Setting For Address 6 Hex

    = side you must press down for Listen Address 6; Off = 1; On = 0 = used for setting REN, IFC, and SRQ Options This side down for logic 1 This side down for logic 0 Figure 2-4. Setting for Address 6 hex GPIB-LPT User Manual © National Instruments Corporation...
  • Page 19: Figure 2-5. Switch Setting For Ren On, Ifc On, And Srq Off

    This side down for logic 0 Figure 2-5. Switch Setting for REN ON, IFC ON, and SRQ OFF In the space provided here, record the new settings for your GPIB-LPT so that you will have them handy for future reference.
  • Page 20: Installation

    It may be a tight fit, but do not force the board into place. Note: The GPIB-LPT cannot be used in slot J8 of the IBM PC XT. 6. Screw the right angle mounting bracket of the GPIB-LPT to the back panel rail of your computer.
  • Page 21: Section Three

    Section Three Function Description Figure 3-1 shows a block diagram of the GPIB-LPT. GPIB External Device Listen Address GPIB GPIB Switches Handshaking Addressing Control Data Control Data Wrap/Status Wrap Latch Latch Buffers Buffers Address Decoding Data Config. Transceivers Jumpers PC I/O Channel Figure 3-1.
  • Page 22: Address Decoding

    Data transceivers interface the GPIB-LPT local data bus to the IBM PC data bus. Data Wrap, Control Wrap and Status Buffers Data wrap, control wrap and status buffers, and the data and control latches make the GPIB-LPT compatible with the standard PC parallel port software. When the data and control wrap buffers are read by software, the data previously written to the data and control latches is returned;...
  • Page 23: Gpib Handshaking

    GPIB Addressing On printer/plotter initialization, the GPIB-LPT checks to see if the printer/plotter is listening; if not, the GPIB-LPT addresses it as a listener using the GPIB listen address on the onboard switches. © National Instruments Corporation GPIB-LPT User Manual...
  • Page 24: Section Four

    The GPIB-LPT Diagnostic Tests can be used to verify the configuration of the GPIB-LPT and its connection to a GPIB printer or plotter. To run a GPIB-LPT diagnostic test, connect a printer or plotter to the GPIB and run the program LPT.EXE from the GPIB-LPT diagnostic package disk. The following message will appear on...
  • Page 25: Plotter Test

    National Instruments. -2 plotter test Select this test to verify the configuration of the GPIB-LPT when connecting it to a GPIB HP-GL plotter. This test will send output to the plotter.
  • Page 26: C Change Lpt Configuration

    Instruments. -c change LPT configuration This command is used to change the base address of the GPIB-LPT to match the actual board settings. If you have changed the jumper settings to something different than the default settings, you must run this command.
  • Page 27: Section Five

    This section presents specific information about the GPIB-LPT Parallel Port Emulator registers along with software examples. The GPIB-LPT Registers The GPIB-LPT has three onboard registers that are required for parallel port adapters: The DATA register, the STAT register, and the CTRL register. © National Instruments Corporation...
  • Page 28: Data Register (Data)

    PC Address: Base I/O Address + 0 (hex) Attributes: Read/Write Writing to this address causes data to be latched in the GPIB-LPT DATA register. Reading this address sends the contents of the DATA register to the system microprocessor. Mnemonic Description...
  • Page 29: Status Register (Stat)

    This bit indicates to the parallel port adapter that a paper error has occurred (a logical 1 means end of paper has been detected). The GPIB-LPT can be configured to use this bit to monitor the current state of the GPIB SRQ line. If the GPIB-LPT switch is set to enable the Service Request (SRQ) option, PE is a logical 1 when the SRQ is asserted.
  • Page 30 This bit indicates Paper End state, Off line state, and Error state (a logical 0 indicates one of these states). This bit is not used by the GPIB-LPT and is held logical 1. 2 - 0r Don't Care Bits 2 through 0 Can be read as a 0 or 1.
  • Page 31: Control Register (Ctrl)

    When this bit is set, an interrupt will occur when ACK* changes from active to inactive. SLCTIN Select In Bit When this bit is set, the GPIB-LPT can source data onto the GPIB data lines. INIT* Initialize Bit Setting and then clearing this bit initializes the GPIB-LPT.
  • Page 32: Programming Considerations

    No programming is required. However, you can write your own driver routines. The following paragraphs explain how to use the GPIB-LPT with the DOS operating system and with the C and BASIC programming languages. Considerations for programming your own printer/plotter adapter driver are also discussed.
  • Page 33: Using The Gpib-Lpt With C And Basic

    *gpib_dev= "LPT2"; fp=fopen(gpib_dev,"w"); fprintf(fp, "Hello, world"); fflush(fp); These lines send the string "Hello, world" to the GPIB device connected to the GPIB-LPT. Accessing the Parallel Port in BASIC OPEN "LPT2" FOR OUTPUT AS #1 PRINT #1, "Hello, world" This program sends the string "Hello, world" to the GPIB device. The BASIC commands LPRINT and LLIST always send data to the first parallel printer adapter in the system (LPT1);...
  • Page 34: Setup And Initialization

    The setup and initialization routine initializes the interrupt vector (for interrupt level 5 or 7, depending on configuration), sends out the first data byte to the GPIB-LPT, and unmasks the interrupt. The ACK* pulse from this byte interrupts the processor so the next byte can be sent by the interrupt handler.
  • Page 35: Timing Constraints

    When writing to or from a driver, it is important to meet all timing constraints. The only constraint for the GPIB-LPT is the length of the STROBE pulse. The following sequence guarantees a pulse width between 1 and 5 µsec: mov al,0Dh ;STROBE mask...
  • Page 36: Appendix A Operation Of The Gpib

    The switching center (Controller) monitors the communications network (GPIB). When the center (Controller) notices that a party (device) wants to make a call (send a data message), it connects the caller (Talker) to the receiver (Listener). © National Instruments Corporation GPIB-LPT User Manual...
  • Page 37: System Controller And Active Controller

    The interface bus consists of 16 signal lines and eight ground return or shield drain lines. The 16 signal lines are divided into three groups: • eight data lines • three handshake lines • five interface management lines GPIB-LPT User Manual © National Instruments Corporation...
  • Page 38: Data Lines

    NDAC (not data accepted) NDAC indicates when a device has or has not accepted a message byte. The line is driven by all devices when receiving commands and by Listeners when receiving data messages. © National Instruments Corporation GPIB-LPT User Manual...
  • Page 39: Dav (Data Valid

    The EOI line has two purposes. The Talker uses the EOI line to mark the end of a message string. The Active Controller uses the EOI line to tell devices to identify their responses in a parallel poll. GPIB-LPT User Manual © National Instruments Corporation...
  • Page 40: Physical And Electrical Characteristics

    This design allows devices to be connected in either a linear or a star configuration, or a combination of the two. See Figures A-2 and A-3. Figure A-2. Linear Configuration of GPIB Devices © National Instruments Corporation GPIB-LPT User Manual...
  • Page 41: Figure A-3. Star Configuration Of Gpib Devices

    The GPIB uses negative logic with standard TTL logic levels. When DAV is true, for example, it is a TTL low level (≤ 0.8 V), and when DAV is false, it is a TTL high level (≥ 2.0 V). GPIB-LPT User Manual © National Instruments Corporation...
  • Page 42: Configuration Restrictions

    A maximum separation of 4 m between any two devices and an average separation of less than 2 m over the entire bus. • A maximum total cable length of 20 m. • No more than 15 devices connected to each bus, with at least two-thirds powered-on. © National Instruments Corporation GPIB-LPT User Manual...
  • Page 43: Multiline Interface Messages

    Appendix B Multiline Interface Messages The following tables are multiline interface messages (sent and received with ATN TRUE). © National Instruments Corporation GPIB-LPT User Manual...
  • Page 44 Message Definitions Device Clear Parallel Poll Unconfigure Group Execute Trigger Selected Device Clear Go To Local Serial Poll Disable Local Lockout Serial Poll Enable My Listen Address Take Control Parallel Poll Configure Unlisten GPIB-LPT User Manual © National Instruments Corporation...
  • Page 45 MSA23,PPD MTA24 MSA24,PPD MTA25 MSA25,PPD MTA26 MSA26,PPD MTA27 MSA27,PPD MTA28 MSA28,PPD MTA29 MSA29,PPD MTA30 MSA30,PPD Message Definitions Parallel Poll Disable My Talk Address Parllel Poll Enable Serial Poll Enable My Secondary Address Untalk © National Instruments Corporation GPIB-LPT User Manual...
  • Page 46: Appendix C Specifications

    Appendix C Specifications This appendix has the specifications for the GPIB-LPT board. Power Requirement +5 VDC (±5%) 0.40 A typical Physical Dimensions 4.2 in. x 5.5 in. I/O Connector IEEE-488 Standard 24-pin Operation Environment Component Temperature 0° to 70°C Relative humidity...
  • Page 47 User Comment Form National Instruments encourages you to comment on the documentation supplied with our products. This information helps us provide quality products to meet your needs. Title: GPIB-LPT User Manual Edition Date October 1989 Part Number: 320161-01 Please comment on the completeness, clarity, and organization of the manual.

This manual is also suitable for:

180742-01

Table of Contents