circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

May 2005, Issue 178

Network GPIB Controller


by Ron Battles, Patrick Jackson, & Scott Shumate

CONTROLLER HARDWARE

We used an eZ80F91 microcontroller to integrate a number of critical functions into a single device. The GPIB driver is the heart of the controller (see Figure 1). It implements an IEEE 488.1-compliant GPIB bus controller in the software by way of the eZ80F91 microcontroller’s external GPIO lines. The eZ80F91 microcontroller also incorporates an embedded Ethernet MAC, which helped reduce both the cost and complexity.

(Click here to enlarge)

Figure 1—The brains behind the network GPIB controller is an eZ80F91 microcontroller running at 50 MHz. A MAX6309 programmable reset device monitors the supply voltage and provides a stable reset. Run-time memory for the software is provided by 512 KB of SRAM.

The server software in the controller was built on top of ZTP, the free TCP/IP protocol stack provided by Zilog. We selected the XML remote procedure call (XML-RPC) protocol to be the main means of control between the remote client applications and the controller. XML-RPC is a simple protocol based on XML. It’s transported via HTTP. The XML-RPC’s main advantages are that it’s lightweight and well supported under a number of programming environments. 

To demonstrate the ability to embed a client application in the controller and use it to control GPIB equipment, we also implemented a GUI application in Java for the Tektronix TDS-210 oscilloscope. The application has the ability to graphically display waveforms as well as set and control operation, all via the oscilloscope’s GPIB connection. The Java application uses the XML-RPC protocol to control the operation of the GPIB bus via the controller.

The primary hardware design criterion for the network GPIB controller was that it must be inexpensive. To accomplish this goal, we focused on a design that integrated as many functions as possible in a minimum number of devices.

The eZ80F91 microcontroller is the heart of the system because of its high level of integration. It includes the primary flash memory storage for the software, an integrated 10/100 Ethernet MAC, address and data buses for external run-time memory, and ample GPIO pins.

Although dedicated GPIB controllers such as the industry-standard Texas Instruments TMS9914A and NEC Electronics uPD7210 are easy to use, they’re expensive and require additional real estate on the board. The eZ80F91 microcontroller is the perfect solution because it can implement the GPIB controller function in software. The GPIO pins on the eZ80F91 microcontroller make it easy to interface to the GPIB bus signals. Cutting out the dedicated GPIB controller not only reduces cost, but it gives you a measure of investment protection because any updates to the GPIB protocol can be made to the system in the field via a software update.

The GPIB bus signals require line drivers external to the eZ80F91 microcontroller. We chose two commonly used Texas Instruments parts for this task: SN75160 and SN75161 transceivers. The former, which drives the GPIB data bus, is interfaced to the eZ80F91 microcontroller via GPIO port A. The latter, which drives the GPIB control and handshaking signals, is interfaced to the eZ80F91 microcontroller via GPIO port B. Both devices have control signals that are interfaced via four pins on GPIO port C.

The integrated 10/100 Ethernet MAC on the eZ80F91 microcontroller reduces the cost and parts count. An MII bus connection interfaces the MAC to an external PHY, in this case the Advanced Micro Devices Am79C874 PHY, which we chose because it’s commonly available and Zilog already produces a driver for the ZTP protocol stack. An RJ-45 jack with integrated magnetics and LEDs rounds out the Ethernet interface (see Figure 2).

(Click here to enlarge)

Figure 2—The Am79C874 is an Ethernet 10/100 PHY device that connects directly to the eZ80F91’s media-independent interface (MII) on one side and an RJ-45 jack (with integrated magnetics and LEDs) on the other. The SN75160 and SN75161 provide some state decoding logic as well as line drivers that are electrically compliant with GPIB. The 5- and 3.3-V power supplies are standard fare.

The eZ80F91 microcontroller includes 256 KB of integrated flash memory that provides you with more than sufficient room to store the software image. The software boots out of this flash memory and copies itself to external SRAM for execution. This is done to provide maximum run-time performance and to give the network stack and server plenty of heap and stack space in which to run (see Figure 3).

(Click here to enlarge)

Figure 3—We satisfied our hardware design goal of having a highly integrated, low-cost system. The eZ80F91 microcontroller performs all of the important functions in the system. The other devices serve only to interface it to the outside world.

To accelerate the development schedule and to minimize initial costs, we prototyped the design with the eZ80F91 development kit because it contains the same processor and 10/100 Ethernet PHY as this design. We constructed an external circuit on a small prototype board for the GPIB line drivers. Because the development kit exposes the eZ80F91 GPIO pins on a set of 0.1" headers, it was easy to interface the circuit to the development kit via a standard ribbon cable. To connect the GPIB bus to the line drivers, we sacrificed a GPIB cable by cutting the connector off on one end to expose the wires inside.