Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks, I'm in charge with a project which main characteristic is to receive s +ome data by serial port comunication. The layout of the Data Block is: |STX|STATUS1|STATUS2|DATA1|DATA2|ETX|CRC| where: STX = 1 byte - binary(02h) STATUS1 = 1 byte - binary STATUS2 = 1 byte - binary DATA1 = 5 bytes - ASCII DATA2 = 5 bytes - ASCII ETX = 1 byte - binary(03h) CRC = 1 byte Sample Data Received: ÇÇ0229700000¤ The application will comunicate with the serial port by the Win32::Ser +ialComm module. After to receive the block I'll must do a Checksum (XOR from STX up to + ETX inclusive) and compare it to CRC to verify the data integrity. My questions is: How can I do it? Thanks in Advance. Eustaquio.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CRC and Serial Port
by broquaint (Abbot) on Dec 05, 2001 at 01:18 UTC | |
|
Re: CRC and Serial Port
by twerq (Deacon) on Dec 05, 2001 at 01:47 UTC | |
by baku (Scribe) on Dec 06, 2001 at 02:48 UTC | |
by twerq (Deacon) on Dec 06, 2001 at 21:23 UTC |