Generating spread-spectrum (DSSS) signals

I had play with using the video generator to directly generate binary-phase-shift spread-spectrum signal.

My thought was to switch between sending $55555555 and $AAAAAAAA to the video hardware (running at 80MHz clock, so 40MHz carrier
with 2.5MHz chip-rate.

So the basic step is:
		rcl	chip, #1  wc        
	if_c	mov	patt, HAAAAAAAA
	if_nc	mov	patt, H55555555
		WAITVID colour, patt
With 8 instructions per chip at these rates, and waitvid taking 7 cycles minimum I think, that leaves room for 3 more instructions per chip,
allowing stepping through my 32 long chip table (1024 random bits but with zero disparity), and modulating from a bitstream at about 2.4kbaud.

I used a single long repeated as my bitstream, so about 13ms before the stream repeats, ie 76Hz or so.

Spectrum analyzer traces show the overall modulation envelope, and zoomed right in the 76Hz spaced carriers due
to the repetition rate, pretty clean (owing to the power-of-two FRQA setting of $10000000.


(I'd like to add a low-Q bandpass filter to this of course)



I've also played with baseband generation of the chips, which has the potential to be more insensitive to
PLL not being a power-of-two - the time-domain jitter ought to be less serious, allowing a receiver to vary its
PLL ratio to search for the correlation and then phase lock to the transmitter.

Using differential output PLL mode would be able to directly drive a balanced mixer for upconversion and
demodulation I think.

I've read a bit on Gold codes too, perhaps something to tie in to the chip generation.


  • 9 Comments sorted by Date Added Votes
  • Interesting project! Have you tried receiving and decoding the signals you're sending?

    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Erm, no, that's more complicated, involves clock recovery, correlation search etc.

    I suppose I could do the decoding logic for baseband, and mix the output down using a 612
    (avoids clock-discovery, but still needs correlation search in the receiving cog. It could vary
    the LO frequency to do this which would test if the non-power-of-two PLL output is an issue
    for this kind of modulation.
  • I was thinking about decoding whilst walking in this morning and realized in non-PLL mode the counter
    can do XOR mode, ie count the correlation values for you, so perhaps using counter A in PLL mode to generate
    the chips and feeding that to one of the pins for counter B which runs in mode %10110, and the limited/schmitt-triggered
    RF input to the other pin for counter B, means the counts for B can be sampled regularly to assess correlation values.

    I presume there's no issue having one counter's output pin used as an input pin for the other counter?
  • Yes, you can use a counter's output pin as the input to another counter.

    Take a look at my AM radio thread for some ideas about using counters in correlation assessment:

    By using both I and Q mixers, their outputs can be used for nearly any kind of demodulation scheme.

    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Yes I think I'd skimmed that before, but reading avidly this time!
  • So tonight I generated the baseband variation, running at 5MHz not 80, and into a 3-pole low-pass LC pi-filter with a bandwidth of about 2.7MHz.

    Was hoping for more attenuation at higher frequencies than 40dB though, but I think this sort of circuit done on a breadboard isn't ideal - there's scope for an RC stage as well.

    The idea is to put the low-pass filtered baseband spread-spectrum signal direct into a 612 active mixer (which only needs
    50 to 100mV or similar levels).

  • And the 'scope output for the signal before and after low-pass:
  • I think Mark is on a good path with the external mixer and filtering. I'm posting this information here for reference, in case anyone want to make a quick and dirty signal. (It will be dirty from the lack of filtering and the jitter in the PLL.) This was developed from cog_vid.v and is currently untested.

    The broadcast mode part of the video generator switches between 2 values at the carrier frequency. It is able to generate a carrier with a peak to peak amplitude between 7 and 0 using a 3 bit DAC. That's great for AM, but useless for PSK or DSSS. But, don't give up yet. By using only bits 1 and 0 it is possible to reverse the phase of the carrier. The number of possible amplitudes is reduced from 8 to 4, but you gain the capability to apply a 180 degree phase shift. Or use only colors 2 and 4 to generate a differential BPSK / DSSS signal.
    Color	BC+	BC-	2lsb+	2lsb-	difference
    0	7	0	3	0	 3
    1	6	0	2	0	 2
    2	6	1	2	1	 1	differential +
    3	5	1	1	1	 0
    4	5	2	1	2	-1	differential -
    5	4	2	0	2	-2
    6	4	3	0	3	-3
    7	3	3	3	3	 0

    Invention is the Science of Laziness
  • Interesting - I'm not upto speed with the broadcast/baseband/chroma use of the video-generator,
    the Prop manual seems to gloss over the details - do you have the video register settings for the above
Sign In or Register to comment.