Pages: [1] 2   Go Down
Author Topic: Arduino as a GPIB Controller  (Read 5774 times)
0 Members and 1 Guest are viewing this topic.
Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Anyone have ideas (or attempt) to use the Arduino as a GPIB Controller?  I am trying to use the Arduino to control some GPIB-based instruments.  It doesn't look like anyone has tried this before, but I thought I would ask anyway.
« Last Edit: June 27, 2010, 02:52:16 pm by cmiyc » Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It is not difficult but there are a fair number of details to work through.
You need to implement the various state diagrams that
are in the GPIB specification. I did this on a 68HC11 a LONG time ago.

There were a couple of GPIB interface ICs that were used on
the GPIB interface cards that plugged into PCs. IIRC one was made by NEC.
Not sure if these are made anymore or if there are replacement ICs.

You don't need the IC but it could make the "glue" logic simpler.
In the October 1995 issue of Electronics World there was an article about
implementing IEEE. You could start there or with the specification or
with the IC manufacturer datasheet.

Could be a fun FPGA project to implement the various state diagrams.

(* jcl *)

------------------------------------
www: http://www.wiblocks.com
twitter: http://twitter.com/wiblocks
blog: http://luciani.org
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I just ran into your post and was curious if you got any further. I am intending to take up the same task.

Do you have any thoughts on the GPIB side of the connection? If it should be conforming to standards, the GPIB port needs to be terminated towards VCC and GND with resistors in each direction and the Arduino would need to drive "open collector".

People have done this using non-Arduino ATMEGA boards so it should not be to challenging.

Regards, Jan

« Last Edit: October 21, 2010, 01:07:42 am by QCK100 » Logged

Greenwood, Indiana
Offline Offline
God Member
*****
Karma: 0
Posts: 508
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you would like to try an FPGA Lattice is offering a dev kit for 29 and you can use their microcontroller core for non-commercial use.

http://www.latticesemi.com/products/developmenthardware/developmentkits/xp2breviadevelopmentkit.cfm

I think that chip can do somewhat more than an arduino but the learning curve will be painful. I have one but need to get a parallel port to use it. smiley-wink

Logged

If it was designed by man it can be repaired by man.

Land of Fruits & Nuts
Offline Offline
Newbie
*
Karma: 0
Posts: 42
For every PhD, there's an equal and opposite PhD.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Looks like it's time to raise this thread again.  I'm considering implementing a GPIB controller to work with some Tek equipment I've got.  From what I know of GPIB, it looks like a reasonable task for an Arduino.

What I haven't been able to find is a formal definition (state machine, timing, etc.) of the bus protocol.  Since this is for non-commercial use, I'd prefer to neither reverse-engineer it nor purchase the IEEE/IEC spec.  

Does anyone know of a public domain spec?  

Murray
« Last Edit: December 20, 2010, 07:46:17 pm by MurMan » Logged

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Check the Electronics World article that I mentioned in my
original message for references.

A lot of interfaces were based on the NEC 7210 IC. If you
could dig up the datasheet for that part it may have the state
diagrams.

(* jcl *)

http://www.wiblocks.com
« Last Edit: December 20, 2010, 07:59:53 pm by jluciani » Logged


Land of Fruits & Nuts
Offline Offline
Newbie
*
Karma: 0
Posts: 42
For every PhD, there's an equal and opposite PhD.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, jcl.  I looked at the NEC datasheet.  It documents the interface to the chip but not the chip's interface to GPIB.  

I couldn't get a link to the EW article.  
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Another approach I considered is looking for a FPGA implementation of GPIB.  I thought maybe someone has done the state machine in VHDL, which might give enough information.

If I had continued with my original project idea, I decided to implement the GPIB state machine in a FPGA.  But, life happened and I moved-on from the project.  (Though I still think it would be interesting to have some kind of GPIB interface, just don't have a need for it anymore.)
« Last Edit: December 20, 2010, 08:56:04 pm by cmiyc » Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here are the relevant references from the EW article --

ANSI/IEEE STD488.1 - 1987 Standard Digital Interface for Programming Instrumentation

ANSI/IEEE STD488.2 - 1987 IEEE Standard Codes, Formats, Protocols
and Common Commands for use with IEEE-488

Hewlett-Packard, Tutorial description of the Hewlett-Packard Interface Bus (1983)

Takeda Riken (Tokyo) Application note No. 2 - 1 GP-IB INTERFACE: General Description.

I had a copy of the spec at one time but that was a long time
ago.

(* jcl *)

http://www.wiblocks.com
Logged


Land of Fruits & Nuts
Offline Offline
Newbie
*
Karma: 0
Posts: 42
For every PhD, there's an equal and opposite PhD.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You guys are fast.

Actually, I still think of it as HPIB.  Guess that dates me.  Used a lot of HP gear in the late 1970's to analyze process control problems.

I got a hit on "Tutorial description of the Hewlett-Packard Interface Bus" and found a copy.  It has the bus protocol documented pretty well.  

Thanks.
Logged

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

When we're fast we're slacking off smiley-wink

(* jcl *)

http://www.wiblocks.com
Logged


Land of Fruits & Nuts
Offline Offline
Newbie
*
Karma: 0
Posts: 42
For every PhD, there's an equal and opposite PhD.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, I've spent a few hours with the 178 page HP-IB tutorial that jcl referenced.  Plus a few docs, like the TEK device-specific commands for the scope and logic analyzer I'd like to interface to.

Some thoughts on building an interface:

1. The bus electical interface looks like it could be driven directly from the Arduino.  I'd probably buffer them anyway.
2. The bus byte transfer and data management protocols could be easily implemented in software.
3. Implementing IEEE 488.2 gets more complicated.  The HP doc describes the nine device states, but doesn't define the state machine.  Since this is what makes the bus recover from errors, I'd need the full documentation.  Probably would be flakey without doing it right.
4. Everything above the device message protocol (common commands, device commands, etc) would best be implemented in the host computer.  Probably would use Delphi, my fav dev environment.  I don't see anything too difficult, but it would be a lot of work.  Probably several times the effort to build the interface.

I'm coming to the conclusion that this is a much bigger project than I thought.  While it would be interesting to control a scope and logic analyzer, I don't have an overwhelming need that would justify this kind of effort.  Might be worthwhile as a team effort, but that's its own can-o-worms.

I'm going to sleep on it for a few days ...    :-/
Logged

Land of Fruits & Nuts
Offline Offline
Newbie
*
Karma: 0
Posts: 42
For every PhD, there's an equal and opposite PhD.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Richard,

Yeah, the same thoughts crossed my mind.  My need is to implement one controller connected to two talker/listeners.  Without the need for controller arbitration and with short cable runs, the bus would probably never get into most of the error states.  Plus, running the bus protocol in software would slow it down enough to eliminate timing issues.

If it didn't run reliably, I'm pretty sure I could track it down with the gear I've got.  And since this is for home lab use, there's always the reset button.

Maybe this project could be phased in ...  Darn you, Richard.
Logged

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are there controller chips like the NEC still available?
You see if you find some cards with socketed ICs smiley-wink

IIRC a **long** time ago Capital Equipment Corp use
to sell these.

(* jcl *)

http://www.wiblocks.com
Logged


Land of Fruits & Nuts
Offline Offline
Newbie
*
Karma: 0
Posts: 42
For every PhD, there's an equal and opposite PhD.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Are there controller chips like the NEC still available?
Using a controller chip would take all the fun out of this project.   ;D
Logged

Pages: [1] 2   Go Up
Jump to: