cyclic redundancy check 4-bit

Any standard implementation? I need to send 4-bit messages over a very slow and noisy link, I cannot afford 8-bit crc. thank you.

Reply to
bwv539
Loading thread data ...

The Hamming code 7.4 or 8.4 is what you need.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

A total of 7 bits will give you a self-correcting code.

--
 
 
 
 
                        cbfalconer at maineline dot net
Reply to
CBFalconer

Well, maybe.

But if the link is very slow, or the noise is bursty, a single-bit ECC code that doubles the required bandwidth isn't going to help him much.

Then again, a 4-bit CRC isn't going to help much more than a simple checksum, either...

Regards, -=Dave

Reply to
Dave Hansen

The Hamming code is a perfect code; no other scheme can have better performance with the same number of data and redundancy bits.

If Hamming 8.4 will be used for the error detection, it will detect all possible combinations of up to three errors, and all error bursts with the length of up to 4 bits.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

Define "Afford" Size, Speed, Transmit band width? The table methods for CRC can be very fast (256 Byte Table) or small (32 byte table)

Reply to
Neil

If the total message net size is really 4 bits, then there is not much that can be done with error bursts, since there is not much use of interleaving (and hence spreading out the burst error to individual bit errors) that are usually easier to correct.

Are all 16 possible states of the 4 bit messages actually used ? If for instance only 10 different messages are actually used, it might be better to assign 10 sufficiently different transmit sequences (longer than 4 bits), in which the correct sequence can be determined, even if some bits are incorrect.

If less than 16 message types, are not all messages equally important, use more ECC for the critical messages (such as reset).

What about clock synchronisation, is it synchronous or asynchronous ?

If asynchronous, if the noise generates a false start bit just before the real start bit, the bit synchronisation will be incorrect for all the remaining bits, so one should check that a shifted copy of a valid message is not a valid different message.

When talking about CRCs and checksums, there must either be a way to ask for retransmission if an error occur or simply discard the message (in a sampled system, hold the previous value or use the average between the previous and next valid sample).

If this is not possible, then some kind of ECC should be used.

Paul

Reply to
Paul Keinanen

Well, first of all, thanks to everybody for the answers. I know noting about Hamming code. I am reading some information on Wikipedia, if you have more resources please tell me. I have to implement this in C. I try to explain better my application: I have to transmit a single bit every 80ms, so an 8-bit sequence takes 0.64s. The receiver will trigger on the first bit and start collecting a sequence of 8 bits. The information to be transferred requires 4 bits, so I thought that a good use of the other 4 bits is for error checking, but if there is a way to decrease total number of bits it is better even if not strictly required. Time is not critical, so I might even increase the sequence lenght, but that might increase probability of loosing a bit and could increase rentransmission. Hope this will help to understand better the setup.

Reply to
bwv539

... snip ...

You don't want CRC, or checksums. You want an error correcting code, which requires at least 3 extra bits for the OPs application. Using a full eight bits improves the statistics, which are that all 1 bit errors are corrected, and multiple bit errors are detected.

--
 
 
 
 
                        cbfalconer at maineline dot net
Reply to
CBFalconer

That's very simple.

formatting link

Just curious what could be such a slow system. The only thing that I can guess of is the communication to the drill head by the fluid pressure in the drill column.

Then Hamming 8.4 is a way to go.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

Very nice website! Thank you.

Ask in private.

Ok, I'll give a try.

Reply to
bwv539

Power-line carrier systems can be very slow; a well-known company in our region makes an AMR ultra-narrow-band vlf system that talks at .0005 baud.

Regards,

Michael

Reply to
msg

Say again? It takes over 1/2 hour to transmit one bit? How do you do a filter for anything that slow -- drive stakes? ["Driving stakes" is construction humor for something that's going so slowly that you have to set stakes to see if it's moving.]

Reply to
Everett M. Greene

Sounds like some amateur radio LF experiments on 135 kHz, in which the transmission time of a single bit can be minutes. Distances of several thousand kilometers with less than 1 W radiated power can be achieved despite the strong atmospheric background noise. Due the extremely low antenna efficiency with practical antenna towers (10-30 m), you still have to feed up to 1000 W into the antenna to get the 1 W radiated power.

In LF amateur radio experiments a "waterfall" display (frequency as the horizontal axis and time on the vertical axis) is often used and visually try to detect some kind of pattern that would indicate the presence of a carrier.

To automatically detect such slow signals, one could for instance multiply the incoming signal (with an I/Q-multiplier, to avoid the unknown phase problem) with a locally generated carrier at the same frequency and do some integration to measure the amount of power received.

For 2FSK, generate the carriers for the two possible tones and multiply by two I/Q multipliers and compare which frequency had the larger output. This compensates for signal strength variations due to propagation changes and receiver gain drift as long as the bits are shorter than the fade cycle.

Other possibilities might be to use direct sequence spread spectrum with some moderate chip rate and sending two alternate sequences and then try to detect, which gives the best correlation.

With PCs and sound cards and extremely low data rates, quite a few operations can be performed on each bit.

Paul

Reply to
Paul Keinanen

For 135kHz and 30m, the radiating resistance would be at the order of 5 milliohms at the best. To have the 1Wt radiated, the current of 14A has to be pumped into the antenna. To create such current in the antenna, the input voltage has to be about 15kV. The loss resistance would be at the order of Ohms, so the antenna efficiency is ~0.1% like you mentioned. I can see some technical problems there, and the practical part is rather questionable :)

The obvious limitation is the stability of the frequency, so the integration time can't be longer then tens of seconds for the reasonable free running oscillators. However, it can be better if locking on the external frq reference like GPS.

Due to the high Q, the antenna bandwidth is ~hundreds of Hz. Not much space for FSK, no space at all for the spead spectrum.

This compensates for signal strength variations due to

Synchronization is the key.

What for? Why can't you just make a telephone call to whatever place in the world?

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

The usual practice is to put a large capacitance hat on top of the tower, consisting of horizontal wires spreading out radially from the top.

There have been cases when the loading coil catch fire :-).

The real issue is the grounding resistance, so unless you live on the coast of a salty ocean, much of the power is dissipated in the ground.

Or previously Loran-C, which was a nuisance anyway, with much sidebands above 135 kHz, even if the Loran-C nominal frequency was 100 kHz.

If the symbol rate is well below 1 Baud, a 1 Hz FSK separation is more than sufficient.

A 100 Hz antenna bandwidth would be more than enough if for instance a SS system with 10 Hz chip rate and 102.3 s bit period could be used.

With very low data rates and hundreds of megabytes or PC RAM and lots of processing power, storing a sequence of signals into RAM and matching all possible delayed versions of the PRN key is sooner or later going to bring up a good correlation.

Paul

Reply to
Paul Keinanen

Wouldn't smoke signals or carrier pigeons be faster?

Reply to
Everett M. Greene

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.