Skip to content

Month: March 2018

si5351 quadrature

I’ve been following ZL2CTM’s video series on building a phasing sdr rig with a teensy and an si5351. Charlie used a SN74HC74 and an RF splitter to generate the quadrature oscillator signals, but I wanted to see if i could get the si5351 to generate the quadrature signals using two of its outputs.

The Etherkit SI5351 library has an example that shows how to set the phase and I took that example along with Charlie’s teensy sketch and put together a quick example of generating quadrature signals from CLK0 and CLK1 of an SI5351. This is just an example and the code should probably be optimized and cleaned up a bit before using it, but it does currently work for me.

From the Etherkit README:

If you need a 90 degree phase shift (as in many RF applications), then it is quite easy to determine your parameters. Pick a PLL frequency that is an even multiple of your clock frequency (remember that the PLL needs to be in the range of 600 to 900 MHz). Then to set a 90 degree phase shift, you simply enter that multiple into the phase register. Remember when setting multiple outputs to be phase-related to each other, they each need to be referenced to the same PLL.

So, in the sketch below, most of the work takes place in GetPLLFrequency(). This sets the pll frequency and the multiplier needed for set_freq_manual() and set_phase(). I’m using the set_freq_manual function to set the clock frequency and the pll frequency. Then I set the phase on CLK0 to 0 and the phase of CLK1 to the multiple set in GetPLLFrequency().

I didn’t have an lcd hooked up, so I just commented out all the lcd stuff.

Comments closed