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





 

September 1998, Issue 98

TCP/IP Networking


by Ingo Cyliax
With Ethernet chips becoming a dime a dozen, it’s a lot easier to justify having your network Ethernet driven. Ingo walks you through all the nitty-gritty steps of how to get your Ethernet-based device working with real-time capabilities.

When I discussed network communication last month, I mentioned that Ethernet is starting to be viewed as a device interface bus. I also told you about the increasing availability of Ethernet-based data-acquisition devices. This month, let’s see what it takes to build a prototype of an Ethernet-based device.

First question: what do I define as an Ethernet-based device? Basically, a device that has an Ethernet port as its primary interface. A temperature sensor with an Ethernet port is one example, but I’m not sure about the economics of such a project.

To make developing such a device more interesting to me, it needs to solve one of my problems. So, here goes.

I frequently use a prototyping system called a logic engine, which is essentially a system tester. It has 128 I/O ports and is controlled via a PC-compatible parallel port.

The protocol used over the parallel port needs nonstandard software to drive it. This situation wasn’t a problem when a DOS-based machine controlled this board. I simply wrote a program to make the parallel port perform the function I wanted.

With the advent of Windows 95 and Windows NT–based systems, controlling the parallel port becomes an issue. I now need to write a device driver just so my program, which wants to control the logic engine, can talk to it. What’s worse, this device driver will probably break when I try it with Win98 or when NTS comes out.

The device I want to discuss is a Ethernet-to-parallel port device that controls the logic engine. In a sense, the parallel port–based logic engine becomes an Ethernet-based logic engine.

This technique has several advantages. First of all, I don’t need to write and install a device driver on the system controlling the logic engine. Secondly, I can share the logic engine between workstations or over the Internet.

Finally, I can use a variety of programming languages on many platforms to talk to this device. All my language on the workstation needs now is a network library. I don’t have to write various libraries like I did for the old parallel-based interface.

But before getting started on this project, I want to take a look at one of its major components—TCP/IP.