3
$\begingroup$

I am creating a system (modulator and demodulator) for broadcasting binary data through an analog signal. I'm using BPSK with great success – at least, I'm generating great graphs.

image

Green is input signal, red is carrier phase, pink is digital zeroes and ones.

My question is – now that I have that pink stream of binary data, how to delineate bytes? I have been reading about clock recovery, 8b/10b, Manchester, NRZI... And I'm a little confused about what those offer me.

I imagine I could just come up with a system like Manchester, where each 0 is just 01 and each 1 is 10 – and then use a pattern like 0000 to mean "start of next byte" – but this doesn't seem right. Under that system, how would you interpret 10000010? It could mean the last byte ended with a 1 and the next byte starts with a 1 – or it could mean the exact opposite – the last byte ends with a 0 and the next byte starts with a 0.

I know there must be some basic DSP concepts that could help me here, please point me to some resources!

$\endgroup$
1
  • $\begingroup$ With Manchester coding, each $8$-bit data byte will get mapped to $16$ zeroes and ones on the channel. Consider inserting a pattern such as $10111101$ into the Manchester-coded bit pattern after, say, $4$ data bytes $= 1$ $32$-bit data word $=64$ Manchester-coded channel bits. $\endgroup$ May 6, 2013 at 14:38

1 Answer 1

2
$\begingroup$

I would use a frame alignment word to synchronize your data. The basic idea is to insert your FAW at the beginning of every $N$ bytes. After you demodulate the data you look for the FAW to synchronize the data. To avoid false positives you should try to have a longish FAW (16 bits should be plenty) and look for repeated FAWs. To avoid inefficient overhead you should try to make $N$ large compared to the size of the FAW.

$\endgroup$
3
  • $\begingroup$ So then I would just need to come up with an encoding that prevented the FAW from appearing in the data? And I'd have to design the FAW so it had clear edges on either side? $\endgroup$
    – Keith
    May 7, 2013 at 4:06
  • 1
    $\begingroup$ I would just come up with a sequence that has decent autocorrelation properties, like a Barker code, and then just look for the FAW. Make sure that you see a few of them- perhaps 3 or 4- in a row where you expect them to be, and then you are synced. Then simply remove the FAWs from the data stream and make the remaining bits bytes. $\endgroup$
    – Jim Clay
    May 7, 2013 at 12:54
  • $\begingroup$ Wow thanks this is exactly the kind of thing I was looking for! $\endgroup$
    – Keith
    May 7, 2013 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.