Dec 272017
Capture and analyze serial data and communications. Good.
File SERDATA.ZIP from The Programmer’s Corner in
Category Communications
Capture and analyze serial data and communications. Good.
File Name File Size Zip Size Zip Type
SERDATA.COM 16283 11365 deflated
SERDATA.DOC 8017 2870 deflated
SERDATA.PAS 17167 4457 deflated
SERDATAN.COM 16321 11392 deflated
SERDATAN.PAS 17329 4502 deflated

Download File SERDATA.ZIP Here

Contents of the SERDATA.DOC file

Serial Data Analyzer - Turbo Pascal Version

I. Introduction

The SERDATA program was born out of a need to monitor the
communications occurring between two computer systems. I knew that
HP sold a system to perform this function, but I had neither the
time nor funds to purchase one. A co-worker suggested that I add a
second serial port to my Compaq and write the software in Turbo
Pascal to do the job. The SERDATA program performs in a manner
similar to the HP system as I remembered it, with the differences
due to the combination of my current needs, my programming skills,
and the fact that I haven't used a Serial Data Analyzer for several
years. I used code from the public domain program MODEM.PAS as the
basis for my serial communications routines, although I have made
some changes to utilize both ports and increase the buffer size. My
employer, Dairy Equipment Company of Madison, WI, has given me
permission to release this program into the public domain. I have
placed a copyright notice on the screen to protect the interests of
Dairy Equipment Company. You are free to copy, distribute, and/or
modify the code, but this does not constitute permission to sell the
program in any form. User groups may charge a disk media/copy
charge for distribution.

II. Instructions For Use

A. Hardware Required

1. IBM PC, XT, or AT or hardware compatible (I have tested this
on a PC, an AT, and a Compaq)

2. Two serial ports addressed as COM1 and COM2

B. Operation

Load the program by typing SERDATA. The title window at the top
of the screen shows the program name and copyright information,
plus a summary of the available special keys. All other keys
will result in a bell signal. The lower portion of the screen
will be the window where the data received will be displayed and
any user interaction will take place.

The first action required is the selection of the baud rate to be
used on BOTH channels. The default is 1200 baud. Use the left
and right arrow keys to highlight the desired baud rate, then
press the ESC or ENTER key to make your selection.

Connect on device to COM port 1, the other device to COM port 2.
Both devices must be set to the same baud rate. Control signals
are not used or transferred, so if you need to have handshaking

signals between devices, you will have to make up jumpers as
required. Also note that most PC serial ports have male
connectors on them, so you will probably need to make up a
female-female gender changer.

The Serial Data Analyzer program works by reading asynchronous
characters in from serial port 1 and transmitting them out to
serial port 2. The exact reverse is done with characters received
from serial port 2. All characters received are also stored in a
buffer and displayed on the screen. Data received from serial
port 1 is displayed in reverse video while data from serial port
2 is displayed in normal video. All printable ASCII characters
(hex $20 to $7E) will be displayed normally. The ASCII control
characters (hex $00 to $1F) will be displayed as [aaa] where the
aaa is the standard alpha symbol for the character, such as BS
for backspace. See Table I for a complete list of the symbols
used and their hexadecimal equivalents. Unprintable characters
(hex $7F to $FF) will be displayed as [hh] where hh is the
hexadecimal value. If characters are being received from both
serial ports at the same time, they will be mixed on the screen.
It is important to remember that there is some slight delay
between the time a character is received from one port and
transmitted to the other port. This delay may affect critical

To exit from the program back to DOS, simply press the ESCape

To change the baud rate (on both ports), press the B key. The
baud rate is selected as at the beginnning of the program.

To save the current contents of the buffer (which can hold up to
32K of text, press the F key, then enter a the desired file name.
If the specified file already exists, it will be erased and
written over. If the buffer is empty, a message will indicate
this and no file name will be requested. In the datafile
created, all characters will be stored as shown on the screen.
Characters received from port 2 will have the uppermost bit set.
This file can be printed to Epson printers directly, with the
characters from port 2 being printed as italic characters. The
file is a straight ASCII file, except that there are no carriage
returns or line feeds inserted. Writing the buffer to a file
will clear the buffer. Pressing the C key will also clear the

To set up a trigger string for either or both ports, press the T
key. You will be asked to enter a trigger string for each port.
An empty string for a port will mean that no trigger string will
be used for that port. Trigger strings can consist of any
characters the program will let you type in, except Carriage
Return, which ends the string. If a trigger string has been
defined for a port, the Serial Data Analyzer program will stop
receiving data from both ports as soon as a match is detected to
the target string.

To send a string of characters to either or both ports, press the
K key. You will be asked to type in a string, ending with a
carriage return. You will then be asked whether you want to
transmitted the carriage return/line feed; answer Y or N. Then
you will be given the option of sending the string to either or
both ports. After you answer the last question, the string will
be transmitted to the selected ports, and the Serial Data
Analyzer will return to normal mode.

Table I. - ASCII Control Codes and Hexadecimal Equivalents

Hex Symbol Hex Symbol

00 [NUL] 10 [DLE]
01 [SOH] 11 [DC1]
02 [STX] 12 [DC2]
03 [ETX] 13 [DC3]
04 [EOT] 14 [DC4]
05 [ENQ] 15 [NAK]
06 [ACK] 16 [SYN]
07 [BEL] 17 [ETB]
08 [BS] 18 [CAN]
09 [HT] 19 [EM]
0A [LF] 1A [SUB]
0B [VT] 1B [ESC]
0C [FF] 1C [FS]
0D [CR] 1D [GS]
0E [SO] 1E [RS]
0F [SI] 1F [US]

George Tucker
Sr. Software Project Engineer
Dairy Equipment Company
1919 S. Stoughton Road
Madison, WI 53716
(608) 222-3484

PS: I have also included SERDATAN, which is identical to SERDATA
except that it strips the Parity bit from all incoming data.

 December 27, 2017  Add comments

Leave a Reply