Application Note powered by the eZ80 Remote Access™ |
ZiLOG Application Note |
---|
Using eZ80 family processors as a bridge between RS232 and Ethernet interfaces |
Author: Andrei Kovalev FAE ZiLOG Germany |
1. The general idea.
Any device with a serial output can be connected to the gateway
to copy the data to TCP/IP connection. The plan serial data
must be thus converted to TCP packets. To ensure the proper reception
we put the data to packets with a certain format. For instance,
a header is created to hold such data as the length of the packet
and the checksum.
2. The hardware configuration.
The hardware configuration of the functioning gateway is shown on the picture
The task of the gateway is to transfer the data from one of the serial communication ports to the client PC running the Remote Access JClient application. The JClient module called Serial2TCP accepts the data and displays them in a form of dialog window.
An eZ80 evaluation board allows for connection of up to two serial devices, offering for this purpose the serial communication ports COM1 and COM2. The driver included with this application note services this two devices. This application note allows gateway to function on a one of the serial ports only. A configutation command should be send from the client PC to select the port and set its parameters. After the command is received the gateway start gathering data on the selected port. The gateway accepts the serial data, puts them in form of packets into a queue in the memory of aZ80 webserver.
The client PC setups the TCP/IP connection and sends the command for the server to start sending the data. After this the server sends all data currently gathered in the queue onto the client PC.
The client has a special window to view the incoming data. Also the user can enter the data into that window to be sent to the server and transferred to the opened COM port. Thus the transfer is bidirectional. Ideally, the user has the impression that he works with the serial device directly.