Serial Communications Question

matapan

New Member
Hi,

I'm new to serial communications. I have a device that uses the serial port to receive commands. I would like to test the device using a PC and a terminal program. The command format looks like this:

0100232<1><2><CHK>

where <1> is a 3 digit parameter, <2> is another 3 digit parameter, and CHK is the checksum

After establishing the proper comm parameters between the PC serial port and device (say, 19200,n,8,1), what would I actually send from the terminal program?

Sorry about the basic question, but most of the resources I've looked at so far don't really delve into this question.
 
It would depend on how the checksum is calcuated, and whether the protocol is binary or ASCII. Here is an article I wrote. It's really for non-automation savvy folks who build hardware devices to get an broad understanding of protocols and how to create good ones, in order to add one to their hardware, but it'll probably have a good bit of information that you will find useful in what you are trying to figure out.

http://www.hometoys.com/ezine/11.10/quark/index.htm
 
at a guess this is ASCII as there is no pairing (odd number of digits).

Simply use hyperterminal and type in the numbers.

you dont indicate what terminator is required, wither a carriage return, line feed or both, but at a guess a return will work.

There is a better terminal program available, herculese that also supports sending hex values.

Dont forget to check the cabling requirements - 3 wire, 3 wire cross over, or all wires needed - most devices just use 3 wires, RX, TX and Gnd. There are plentt of sites that will give you details ont eh pinouts of com ports and how to make different serial cables - google is your friend here.

BUT

Most importantly - just give it a go. You wont break anything and you will learn lots alng the way.

Mick
 
Back
Top