It uses a very small SI5351 which is a PLL locked to a crystal, and subsequently divided down to the output you want. It has two PLLs and three outputs, all separately programmable.
Here's the very simple connections:
What I have in mind is to squeeze a Softrock Lite ll SDR radio and one of these onto an Arduino shield to make a complete tuneable SDR. Unfortunately my build of the Softrock went wrong as I mounted the FST3253 IC up-side-down! Now I am waiting for replacement parts.
Code
// SI5351 dds
#include "Wire.h"
#include "Adafruit_SI5351.h"
// PLL frequency
#define XTAL 25
#define MULT 28
// dds object
Adafruit_SI5351 dds = Adafruit_SI5351();
float pll; // PLL freq
float freq = 3.6; // requested output freq
void setup()
{
Serial.begin(9600);
dds.begin();
dds.setupPLLInt(SI5351_PLL_A, 28); // PLL = 25 * 28 = 700MHz
Serial.println(freq);
}
void loop()
{
float frac;
float synth;
long n;
long m;
int div;
m = 100000;
pll = XTAL * MULT;
synth = pll/freq;
div = (int)synth; // get integer part
frac = (synth - div) * 100000; // get fractional part
n = (long) frac;
Serial.print("Frequency = ");
Serial.println(freq);
dds.setupMultisynth(0, SI5351_PLL_A, div, n, m); // out = PLL/(div+n/m)
dds.enableOutputs(true);
freq = get(); // get input freq MHz
}
// get input as an float
float get()
{
float in;
while(Serial.available() > 0)
Serial.read();
while(Serial.available() == 0)
in = Serial.parseFloat();
return in;
}
No comments:
Post a Comment