13.07.2015 Views

Data Acquisition

Data Acquisition

Data Acquisition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The mechanism of operation of the CRC is fairly straightforward and is based on thefollowing approach for a typical message which can be of variable length:• Take the MESSAGE and multiply by 2 16 .• Divide (using modulo 2 arithmetic) by an arithmetic divisor (typically the CRC-CCITT which is 1000 100 00001 00 001) to obtain a quotient and remainder. Theremainder is the CRC checksum.• Append the CRC checksum to the message.The receiver carries out the same calculation and compares the result with the checksumreceived.When trouble shooting a serial data communications interface, a logical approach needs to befollowed, to avoid wasting many frustrating hours trying to find the problem.A procedure similar to that outlined below is recommended:• Check the basic parametersAre the baud rate, stop/start bits and parity set identical for both devices? Theseare usually set on DIP switches in the device. However, the modern trend is towardsusing software configuration from a terminal for these basic parameters.• Identify which is DTE or DCEExamine the documentation to establish what actually happens at pins 2 and 3 ofeach device. At the DTE device, pin 2 is used for transmission of data and shouldhave a negative voltage (Mark), whilst pin 3 is used for the receipt of data(passive) and should be at approximately 0 volts. Conversely, at the DCE device,pin 3 should have a negative voltage, whilst pin 2 should be at 0 volts. If novoltage can be detected on either pin 2 or 3, then the device is probably not EIA-232 compatible and could be connected according to another interface standard,such as EIA-422, EIA-485, etc.• Clarify the needs of the hardware handshakingWhen used, this causes the greatest difficulty and the documentation should becarefully studied to yield some clues about the handshaking sequence.• Check the actual protocol usedThis is seldom a problem but, when the above three points still do not yieldresults, it is possible that there are irregularities in the protocol structure betweenthe DCE and DTE devices.From a testing point of view, section 2.1.2 in the EIA-232-C interface standard sounds toogood to be true. It states that:‘…The generator on the interchange circuit shall be designed to withstand an open circuit,a short circuit between the conductor carrying that interchange circuit in the interconnectingcable, and any other conductor in that cable including signal ground, without sustainingdamage to itself or its associated equipment…’In other words, any pin may be connected to any other pin, or even earth, without damageand, theoretically, one cannot blow anything up! This does not mean that the EIA-232interface cannot be damaged. The incorrect connection of incompatible external voltages candamage the interface, as can static charges!

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!