ejames
Posts: 15
Joined: Thu Feb 02, 2012 1:19 pm

GPIB Controller

Thu Apr 25, 2013 1:39 pm

Interfacing a PC with GPIB is a very expensive business. I was wondering if it would be possible to send and receive GPIB data (almost) directly from the Pi using the GPIO pins. This would negate the need for any expensive USB adapters and we'd be able to drive it with the relatively fast CPU on the pi instead of being limited to what a 20MHz avr chip could do if we were using one of those coupled with an ftdi chip. Does anyone have any pointers on trying to achieve this ? My main issue is that gpib uses 8 pins for bi-directional i/o so sometimes pins would need to be set as input, othertimes output so there is the potential to blow the pi. Pointers on avoiding this would be much appreciated.

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: GPIB Controller

Thu Apr 25, 2013 3:30 pm

These days people either use USB or PCI(x) cards in PCs.

Failing that they find controller chips and transceivers, alternatively programme a micro or micro and PLD/FPGA to be a controller for GPIB.

Generally less and less people are using GPIB in preference for ethernet, wireless and USB to a PC.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

User avatar
joan
Posts: 14691
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: GPIB Controller

Thu Apr 25, 2013 3:39 pm

This sounds like a practical schools type project and an interesting exercise in its own right. Useful if you have some ancient test equipment which talks gpib.

It's either going to be straightforward or impossible, surely only a day or so to tell. If your company has a graduate new starter it might be a perfect first project.

User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: GPIB Controller

Thu Apr 25, 2013 3:57 pm

ejames wrote:Interfacing a PC with GPIB is a very expensive business. I was wondering if it would be possible to send and receive GPIB data (almost) directly from the Pi using the GPIO pins. This would negate the need for any expensive USB adapters and we'd be able to drive it with the relatively fast CPU on the pi instead of being limited to what a 20MHz avr chip could do if we were using one of those coupled with an ftdi chip. Does anyone have any pointers on trying to achieve this ? My main issue is that gpib uses 8 pins for bi-directional i/o so sometimes pins would need to be set as input, othertimes output so there is the potential to blow the pi. Pointers on avoiding this would be much appreciated.
GPIB, HP-IB, or IEEE-488...

It's a relatively simple bus, if somewhat old & slow now. Looking in the lab of the place I am working in today, all the 'scopes, plotters, signal analysers and lots of other wibbly wobbly stuff are all connected together on the LAN...

But once upon a time it would have been GPIB.

The hardest part, and the most expensive is going to be the physical connectors...

but if you can solve that, then the actual bus protocol isn't that complex from what I remember (I did some work with it some 25 years ago). A quick refresh - 8 data lines and 8 control lines, so the Pi could drive it but no serial port on a standard Pi, or leave the serial and use the extra P5 pins on a model B ...

Software wise - no but issue - if it could be done on an old 6502 25+ years ago, then it's not going to bre hard on the Pi..

Good luck!

-Gordon
--
Gordons projects: https://projects.drogon.net/

LesTroyer
Posts: 14
Joined: Wed Aug 29, 2012 2:38 pm

Re: GPIB Controller

Thu Apr 25, 2013 4:18 pm

I implimented a GPIB (or HPIB or IEEE 488) using a PC printer port 20+ years ago. I probably still have the cable in the junk bucket. As stated it should be easy to impliment in software - You will need some buffer/driver chips, Still think it might be quicker in a AVR -- You really should know when your reading -vs- writing data and the control lines to change (IIRC).

Les

chiques
Posts: 12
Joined: Tue Jul 09, 2013 2:11 pm

Re: GPIB Controller

Fri Aug 09, 2013 2:37 pm

This thread has some inaccuracy in it.

Yes, it is possible to perform this functionality via LAN, but realistically many companies use "ancient" measurement equipment because:
1. COST (if it isn't broke, don't fix it)
2. It last longer than the newer stuff
3. It works better than the newer stuff
4. GPIB automation is much cheaper and simpler to implement.

I work in the RF world where some of the most expensive measurement equipment exists. Replacing an HP VNA from 15 years ago could be a $100,000 USD expense. This is includes spectrum analyzers, oscilloscopes and DMM's. A RaspberryPi interface would be a GodSend in this network. The ability to send, receive, capture and store the strings in the bus would be great!

Return to “Automation, sensing and robotics”