At 02:32 24/08/99 +0000, you wrote: >Assuming I'm going to be generating between two to eight words of twelve >bits each in a data stream over a remote control UHF link, what sort of >checksum or CRC is appropriate? > >I get the impression that calculating a checksum or a CRC on such small >data streams might be ineffective, because of the probabilities >involved. > >For example; sending 24 bits of data followed by a 12 bit arithmetic >checksum ... the chances of corruption affecting one of the 24 bits and >then also one of the 12 bits of checksum to mask the corruption seem to >be higher. > >I'm not exactly sure how to express this ... but is there a concern? > >-- >James Cameron (quozl@us.netrek.org) > >Linux, Firewalls, OpenVMS, Software Engineering, CGI, HTTP, X, C, FORTH, >COBOL, BASIC, DCL, csh, bash, ksh, sh, Electronics, Microcontrollers, >Disability Engineering, Netrek, Bicycles, Pedant, Farming, Home Control, >Remote Area Power, Greek Scholar, Tenor Vocalist, Church Sound, Husband. > >"Specialisation is for insects." -- Robert Heinlein. > > The effectiveness will depend on the target requirments. Forward error correction of say 16bits with a simple polynomial will correct 2 bits in 48 (Including the CRC). But in a radio system, errors are nominaly determined by fading, hence the chance of one bit in error is slim, whereas fade or a noise hit will corrupt 2 or more bits in a row (Note that the nominal checksum is weighted on bits in a row being hit not just one here and there (Generally speaking only, so don't flame me on that)), you may also find that a simple 2s complement checksum of 8 to 16 bits is quite OK for up to 256 bytes of data. If you need to correct the data, then a hamming code will be required (Interleaving) to ensure that you don't get caught with unfixable errors (Take a look at the GSM format for the "protected" data for some ideas on how it was done) . In large you will find that CRCs like x7+x5+x2+1 will be quite OK at detecting the error in a small packet, however if the data is IMPORTANT, then this simple CRC WILL NOT SURRFICE, and another signature check may also be required etc. I know that this has not answered your question, but do hope that it makes you think about how important the data transmitted is etc. This may then help you answer the questions you have raised. Dennis