Single Sideband Transmitter
I've been trying to figure out if the P2 can generate a clean enough RF signal. I guess the best way to find out is to do it and test. Also, it's neat that the P2 has enough hub memory for one minute of voice audio.
It doesn't work quite how you expect. As established here: https://forums.parallax.com/discussion/175003/hf-spectral-purity-comparison-p1-vs-p2 the signal from Goertzel mode is much cleaner than from the chroma modulator. But how to modulate the amplitude in Goertzel mode? Well, the DDS output can go to the color space converter. The CSC scales and mixes the signals together.
The problem with using the colorspace converter as an IQ modulator is the DAC input values are treated as Unsigned. If the CSC is used to reduce the sine wave amplitude, it would no longer average around Vcc/2. It would be nice to maintain a constant DC level regardless of the transmitted amplitude. Thankfully the CSC has 3 multiplier channels. I use the third channel as a constant to add a DC offset to compensate for varying sine and cosine output. There are other options to add DC offset to the CSC output. But the multipliers delay the signal by 4 clocks. I need the sine wave amplitude adjustment and the DC offset adjustment to happen at the exact same time. By routing everything through the CSC multipliers, the delay is equal. I haven't been able to rule out few transient samples after the CSC coefficient change. @cgracey Could you comment on whether adjustments to the CSC coefficients are glitch free? If the changes are limited to a few LSB, I wouldn't be able to see it on the scope, but it might affect RF spectral purity.
For a while I thought that I would need to do something like an Inverse Clarke Transform. Then I could add 3 positive sine waves together, at 120 degree phase offsets. But just doing IQ modulation and compensating for the varying DC offset is much faster computationally.
in-band spur (weaver artifact?) -77 (-38)
intermodulation spur -97 (-58)
spurs +-256khz (sample rate) -89 (-50)
2nd harmonic -91 (-52)
2rd harmonic -104 (-65)
imd peak -87 (-46)
sample rate spur -92 (-51)
the 14.5MHz spike is a DC offset artifact in the USRP, not from the P2.
I think this meets the requirements for at least a low power ham transmitter, with LPF of course. There is a tone in the audio passband that matches the weaver frequency. I'll need to look into that.