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.
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.
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.
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.
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...
• 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.
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.
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).
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.
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.
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.
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;...
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...
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.
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.
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...
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.
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.
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.
*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);...
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.
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...
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.