Updated  29 Mar '11

--> home/projects/pic-plot


NEW! Go and see the Pic-plot2: our GPIB to USB converter 

Pic-Plot: a GPIB to RS-232 converter

Plot or print on a PC using Pic-plot
Guida rapida in Italiano


Mounted Pic-plot

This project fills the need of anybody who has a test instrument with the GPIB port and likes to get the screen dump on his PC without any GPIB card. It emulates the HP7470A operation on the GPIB side, and outputs the HP-GL data at the RS-232 port to be read and stored on the PC by any suitable software. The operation of this interface is not just limited to plotter emulation: any data intended to be received by a GPIB Device (addressable or listener only) can be captured and brought out to the RS-232 port, including raw data from the instrument or rasterized data for a GPIB graphic printer. GPIB addresses and other set-and-forget parameters can be modified and permanently stored using a simple setup menu. It is based on a PIC16F628A microcontroller, and the PCB size is just 7x7.5cm.








The hardware of Pic-Plot interface is quite simple: the active components are just a PIC16F628A, a 5V regulator and three transistors. External connections are a GPIB connector, a Serial port and a DC power connector.

(click on picture to open in new frame)



The microcontroller does all the necessary jobs to emulate GPIB Device functionality, in both Listener and Talker mode, by recognizing addressing, commands and managing the Handshake lines. Controller mode is not needed for the intended functionality, and therefore is not supported. Once the device is addressed and it receives data from the Talker, the same data are forwarded to the COM port at 9600 baud: the hardware UART inside the PIC16F628A generates the serial data going to the PC through the RS232 port. Only in Setup mode the data flow is bidirectional at the same baud rate. The RS-232 connector on the interface is a standard male DB-9, and should be connected to the PC using a null-modem female-to-female serial cable.

PCs missing the COM port but equipped with an USB port can be still used with the aid of an inexpensive USB to serial converter, provided that the necessary Virtual Com Port drivers are properly installed.

A jumper is provided to enter Setup mode: when Pic-Plot it powered with this jumper in the closed (short) position, then it starts-up in Setup mode. In this mode the microcontroller UART is used to read/change a few set-and-forget parameters. GPIB cable can be left connected to the instrument, but in Setup mode the GPIB port is not monitored by the Pic-Plot. For normal operation this jumper must be left open. More details about Setup mode can be found in the USE AND OPERATION section.

Power supply can be any voltage between 8 and 16V, and current drain is far below 20mA. With such a large supply requirements, a low-cost unregulated 12V wall adaptor can be used as a power source. Connector polarity is center positive (+). An interesting possibility for those who use the USB-to-serial bridge is to bypass the Pic-Plot 5V onboard regulator and spill the 5V supply from the USB connector mounted on the bridge. This solution of course asks for a simple modification of the bridge or a modified USB cable, then it is suggested only to people having the necessary technical skills to do things right. You can find details by clicking here, or you might prefer to see our new Pic-plot2 which directly supports GPIB-USB conversion.

Here below the pictures of the PCB layout we have adopted:


If you want to build by yourself a similar equipment, at a little charge we can ship the most important parts: the preprogrammed micro and a good quality unpopulated PCB. We can also provide mounted and tested units: check here for prices and drop an e-mail to us.

PCB and schematic files, together with a quick reference manual, are available in the downloads section.


  Back to top


The serial data available at the DB9 connector of the Pic-Plot interface can be either:


  • captured using a communication software like Hyper-Terminal (9600baud, 8 bit, no parity, no flow control). Data files should be saved with the appropriate extension (.plt in the case of HPGL data or .txt in case of raw ASCII measurement data) and then post-processed with any software of your choice.

  • Captured, processed and stored using a specific SW that manages the data type sent over the GPIB bus. A very good example for screen-dump HPGL plots is the 7470.exe freeware application from John Miles: it perfectly manages device-initiated plots, displays them on the PC screen, and converts/saves plot images in most useful formats (including .gif and .pcx). For example, the .gif picture shown here is an HP8753A screenshot taken with Pic-Plot and the 7470.exe. More details about this software can be found in John Miles' KE5FX website.


Plot example of 8753A VNA

Plot example of 8757 SNA

Plot example of 370A Curve Tracer

Plot example of TDS754C Oscilloscope

Plot example of 8560E Spectrum Analyzer

There are also good commercial solutions that can be found online, like Plottergeist and PrintCapture. We have tested PrintCapture during the 30-days trial period, mostly verifying the print-through-GPIB capabilities of some oscilloscopes using our Pic-Plot with excellent results.

Print example of 370A Curve Tracer

Print example of TDS644 Oscilloscope


We have also received some plot examples from Pic-plot users who have given their preference to other rendering software:

Plot example of Marconi 2382 SA (rendered with SPLOT)

Plot example of Advantest R4136 SA (rendered with FPLOT)


And, finally, one example sent to us by F4EXB who has setup a scalar bench by sweeping a PLL YIG oscillator and getting through a Pic-plot the relative-power readings of an HP436 (with GPIB option). He has written the Matplotlib scripts for the graphic display:

Plotted data of an HP436 Microwattmeter (rendered with Matplotlib)



   Back to top



Before starting:

Pic-Plot operates by exchanging serial data with the PC, therefore it is assumed that:


- your PC has a serial COM port


- you are using an USB to serial bridge and a Virtual Com Port (VCP) has been created with the appropriate drivers. Check which COM# is actually assigned to the VCP using the Control Panel/System/Peripherals settings.


Connecting the Pic-Plot:

Connect the Pic-Plot to the PC serial port using a null-modem female-to-female cable. You can build your own cable following the schematic.

Connection to the GPIB instrument must be done with a standard GPIB cable. Because of limited I/O capabilities of the microcontroller used, it is recommended to limit the cable length to max 2meters and to disconnect all other instruments or controllers from the GBIP bus. After checking operation with a simple point-to-point configuration, you may try loading the bus with more instruments.

Connect an 8~16V power supply or wall adaptor to the power jack, observing polarity. Max supply current is 50mA.


Setting the Pic-Plot:

You may need to configure some basic parameters of the Pic-Plot, even though most of the times the pre-programmed values will work for you. To do this the Pic-Plot must be connected to a PC and put in Setup mode. Setup procedure maybe also useful to test the serial link between Pic-Plot and the PC during first installation or when troubleshooting. Setup parameters are stored in the EEPROM area of the microcontroller, therefore they remain unchanged with power cycling, but can be reprogrammed at will by redoing the setup procedure.

NOTE: to enter in setup mode, power must be applied to Pic-plot AFTER closing the setup jumper.

Setup procedure (SW version 3E):

1. Connect the Pic-Plot to the PC using a null-modem serial cable. This is the same cable that will be needed for normal operation.

2. Launch HyperTerminal, specify the COM port (hardware or virtual) to which you have connected the Pic-Plot and set the communication parameters as follows:
bit/sec=9600, databit=8, parity=none, stop bit=1, flow control=none. These are the same settings that will be needed for normal operation

3. Close the jumper named "SETUP" first and then power-up the Pic-Plot. If everything is properly working, a prompt text with SW version will show up on the HyperTerminal window. You are now allowed to remove the SETUP jumper if you like. You can also remove the power to quit the Setup procedure without changing any previously stored parameter.

4. Then you are prompted to enter a new value for the plotter address that Pic-Plot will respond to. Allowed values are two digits 00~29, pre-programmed value is 05. The entered value is echoed for confirmation.

5. You are now prompted to enter a new value for the printer address that Pic-Plot will respond to. Allowed values are two digits 00~29 excluding the current plot address, pre-programmed value is 01. The entered value is echoed for confirmation.

6. Next parameter to be set is the Listen On Reset function. Allowed values are y or n (lowercase), pre-programmed value is n. Set it to y (yes) only if you plan to connect the Pic-Plot to a GPIB instrument that has no System Controller capability. In this case the Pic-Plot automatically starts in Listen mode at every power-on even if not instructed to do so. The entered value is echoed for confirmation

7. Don't forget to open (remove) the SETUP jumper for normal operation



Plot and print capturing with Pic-Plot:

Pic-Plot has no practical use where the PC is the System Controller of the GPIB bus because instrument screen dumps can be directly captured by the PC through its GPIB add-on card . Its application field, instead, is when your instrument has Controller capability or is a Talk-only GPIB device. Typical configuration is the following:


Be sure that Pic-Plot is correctly powered. If you have been able to complete the Setup procedure, then you are sure that Pic-Plot at least correctly communicates with the PC and is ready to work.

To connect the instrument to the Pic-Plot you need a standard GPIB cable, and the instrument has to be configured exactly as it should be when connected to a real GPIB plotter or printer: refer to instrument manuals for proper settings. The choice whether to plot or to print is related to the application you have chosen in your PC but also to the actual capability of your instrument: for example there are instruments not designed to provide rasterized data to a GPIB graphic printer. On the other hand, many instruments are capable to print the raw measurement data in ASCII form, and the Pic-Plot is able to capture also this kind of data arrays that can be easily analyzed or post-processed with Excel.

As a general reference, if the instrument has Controller capability, it should be set as System Controller. Set the Plot Address (or Printer Address) to the same value you have set on the Pic-Plot: default values are respectively 5 and 1. Normally you can do all these settings from the instrument front panel in the GPIB settings menu. In some case you have also to specify the type of peripheral and which port you want to use for screen-dump: choose plotter (or printer) and GPIB. If your instrument cannot act as a System Controller, then it acts as a Talk-only Device when it outputs the screen-dumps on the GPIB: most oscilloscopes, many SA and (we believe) all curve tracers work that way. No matter if you choose to plot or to print, for this kind of instruments the Pic-Plot has to be first configured with 'y' in the Listen On Reset option of its Setup menu (see Setup procedure). The same setting works also for some "screenless" instruments like the microwattmeter HP436 with GPIB card installed, that keeps generating data points once it has been manually switched to talk mode.

To connect Pic-Plot to the PC you need a null-modem female-to-female serial cable. The software of your choice should be installed on your PC (see SOFTWARE section), and the COM port # (real or virtual) in use should be identified: use the Control Panel/System/Hardware/Device Manager/Ports(COM&LPT). Alternatively, you can just see the raw data output from Pic-Plot using HyperTerminal, keeping the same settings used in the Setup procedure.

In the next sections we give you directions about how to use the Pic-Plot with the 7470.exe, but our interface will work with other similar capturing softwares for which we recommend to read the relevant supporting documentation.
NOTE: KE5FX GPIB Toolkit has been recently updated to ver.1.67. The following configuration applies to this last version.

How to configure 7470.exe ver.1.67:


  1. open the text file connect.ini with Notepad.
  2. Identify the 4 lines without  the ; at the beginning: these are the lines with the parameters to be set
  3. parameters must be set as follows (NOTE: # is the number of the COM to which the Pic-Plot is connected):

    interface_settings com#:baud=9600 parity=N data=8 stop=1
    is_Prologix    0
    reset_to_local 1
    write_delay_ms   100

  5. save and close connect.ini


How to use 7470.exe:

Launch 7470.exe and select 'Wait for device initiated plot' in the 'Acquire' menu. Start the plot from the instrument, and see the progress of received data bytes. At the end, you should see the copy of instrument screen on your PC: if this doesn't happen, there could be an error in the GPIB communication (normally a mismatched GPIB address) or a wrong configuration of the 7470.exe. The latter often happens if you are using a Virtual COM Port with an USB bridge: check if you have correctly specified the COM port# in the connect.ini file. In case of doubt, verify in the Control Panel/System/Hardware/Device Manager/Ports(COM&LPT), or specify the same COM# you have set in HyperTerminal for the Setup procedure. If you want to save the plot, don't forget to press the spacebar to exit the acquisition mode first. Again, refer to John Miles' KE5FX website to get the most from his nice software.

You can see some example results in the SOFTWARE section. And below a photo of a typical setup in which the Pic-Plot is capturing a 2.4GHz bandpass filter response taken with a VNA.

Pic-plot at work

   Back to top



Basically, any GPIB instrument having System Controller capability, or Direct-plot function, or Talk-only plot/print function will work with the Pic-plot. So far, we have direct evidence that the Pic-plot interface has been successfully working with the following instruments:


  • HP3588A Spectrum Analyzer
  • HP8559A Spectrum Analyzer 
  • HP8560E Spectrum Analyzer
  • HP8568B Spectrum Analyzer
  • HP8569B Spectrum Analyzer
  • HP8591EM Spectrum Analyzer
  • HP8593E  Spectrum Analyzer
  • HP8714EM Network Analyzer
  • HP8720C Network Analyzer
  • HP8753A Network Analyzer
  • HP8753ES Network Analyzer
  • HP8756 Network Analyzer
  • HP8757A Network Analyzer
  • HP8922  Test Set   (note: HP8922 only outputs print data)
  • Tektronix 492BP Spectrum Analyzer (Listen-On-Reset = y)
  • Advantest R4131A Spectrum Analyzer
  • Advantest R4136 Spectrum Analyzer
  • Marconi 2382 Spectrum Analyzer (Listen-On-Reset = y)
  • HP54504A Oscilloscope
  • TDS540 Oscilloscope (Listen-On-Reset = y)
  • TDS574 Oscilloscope (Listen-On-Reset = y)
  • TDS644 Oscilloscope (Listen-On-Reset = y)
  • TEK 370A Curve Tracer (Listen-On-Reset = y)
  • HP5370B Counter  (Listen-On-Reset = y)
  • HP436A +opt.022  Power Meter (Listen-On-Reset = y)

The list gets longer and longer thanks to the contribution of the many Pic-plot users who kindly have given us a feedback.


  Back to top

The projects presented in these pages are our own design and have been tested and verified by ourselves at the best we can. However, they might be inspired by concepts, ideas, solutions coming from known-art or free resources on the Web. We provide them as  reference designs to skilled hobbyists and technicians  who are willing to reproduce them for non-commercial use. Your results might be different from ours and we cannot be considered responsible for that. Similarly, we are not responsible for any damage or injury you might incur while building, assembling or using the equipments, projects or ideas presented in these pages. The firmware embedded in our projects is our property unless differently stated and, when available in the Download Area, it is license-free only for non-commercial purposes.  

Hotwater 2007-2011