I was searching a specific crystal oscillator for one of my projects. While I was looking for the right frequency, I was thinking about several variations around the central theme and found myself hunting for several crystals. That’s when I paused and thought that maybe I could use a programmable clock generator instead. These circuits are using precision crystals, phase-locked loops (PLLs), and dividers to synthesize arbitrary clock frequencies, exactly what I was looking for. Silicon Labs is manufacturing many clock generators and, in particular, the Si5351A/B/C-B. These CMOS generators are using a single 25 or 27 MHz crystal and can output frequencies from 2.5 kHz to 200 MHz. Also, it is programable via I2C. The cheapest version of the chip can synthesize three clocks and uses two PLLs internally. Conveniently, multiple breakout boards are available for this chip from providers such as Adafruit.
I bought a couple of these boards in the past, and recently I picked one from HiLetgo, along with three edge-launch SMA connectors, as well as three SMA-BNC cables. These boards are sharing the same design, which means that you can use the Arduino library developed by Adafruit. Many of them can generate three clock frequencies from 8 kHz to 160 MHz – with a few limitations. Although this frequency range is a tad heavy on the high end for my current needs, it will work fine. The cherry on the cake: I could check how far my 50 MHz rated oscilloscope can effectively measure. For the lower frequencies I need, I will have to come up with some tweaking, but nothing impossible. But for now, it will work. Although the chip can be programmed using any microcontroller via I2C, an Arduino seems to be the best fitted as software, and sample codes are available all over the Internet. Speaking of which, I would recommend downloading Silicon Labs’ ClockBuilder Desktop Software. It will be invaluable to compute the multipliers and dividers needed to program the chip to generate a given frequency.
Putting together the breakout boards is trivial, and you may be able to play with one without even soldering. These breakout boards have all the required circuitry to use either +3.3 V or +5 V. Such power sources can often be pulled directly from the microcontroller board. I used my good old Arduino Mega, but any flavor would work – the smaller, the better. With only four wires (+5 V, GND, SDA, SCL) hooked-up, we are ready to program our clocks. As mentioned earlier, I used the Adafruit Arduino library to do so. It allows the configuration of the two PLLs – which means that two clocks must share one of them. I used the fractional mode for better control – theoretically at the cost of some jitter (but I didn’t notice any).
The library accepts multipliers from the 25 Mhz crystal ranging from 15 to 90, which gives internal frequencies up to 2.25 GHz. In fractional mode, besides the multiplier, a fraction can be specified as a numerator and denominator (both from 0 to 1,048,575). If needed, one PLL can be configured as fractional, while the other one as an integer. Next, we need to define the clocks (0, 1, and 2) by specifying the PLL to use (A or B) and the divider to apply to the PLL’s frequency. Several defines exist, so errors are harder to make (SI5351_MULTISYNTH_DIV_4, SI5351_MULTISYNTH_DIV_6, etc.). In fractional mode, the divider can range from 4 to 900 and also has a fractional part (numerator and denominator, both ranging from 0 to 1,048,575). Finally, we can specify an extra R divider for frequencies less than 100 kHz. (SI5351_R_DIV_1, SI5351_R_DIV_2, SI5351_R_DIV_4, …, SI5351_R_DIV_128). To illustrate this, I used the program below. Dirt easy!
#include <assert.h> #include <Wire.h> #include <Adafruit_SI5351.h> Adafruit_SI5351 clockgen = Adafruit_SI5351(); void setup(void) { clockgen.begin(); clockgen.setupPLL(SI5351_PLL_A, 15, 0, 1); clockgen.setupPLL(SI5351_PLL_B, 90, 0, 1); clockgen.setupMultisynth(0, SI5351_PLL_A, 900, 1, 1); clockgen.setupRdiv(0, SI5351_R_DIV_128); clockgen.setupMultisynth(1, SI5351_PLL_A, 900, 1, 1); clockgen.setupRdiv(1, SI5351_R_DIV_64); clockgen.setupMultisynth(2, SI5351_PLL_B, 4, 1, 1); cclockgen.enableOutputs(true); } void loop(void) { ; }
But wait, wait for a second! Why can’t we simply specify a frequency instead? Well, this is where the ClockBuilder comes handy! This simple utility computes for us the frequency plan (all the parameters we feed to the chip via the library) from the target frequency. When ClockBuilder launches, select the right chip reference, and change the default oscillator frequency from 27 MHz to 25 MHz. After, simply enter the target frequencies for each clock, click on Create Frequency Plan. Finally, click View Plan Details, et voila! The tool computed all the parameters in a blink. These breakout boards are a neat and efficient solution for your clock problems. So, next time you need multiple clocks for your project, or if you want to program-define clock frequencies, give the Si5351 a try.
Now to the Rigol DS1054Z. Although Rigol sold this oscilloscope as 50 MHz rated, it is possible to hack it and convert it into a 100 MHz scope. This trick is possible because, for this model, Rigol built one hardware and used software license keys to unlock extra capabilities. Very quickly, cracks were available to expose these features. Although you may think that this could have translated into losses for the manufacturer, this undoubtedly contributed to the commercial success of this scope. This practice reminds me of the loopholes Hewlett-Packard used to leave behind in calculators’ ROMs allowing the use of undocumented and advanced features. The best example of this is arguably the HP-41C’s synthetic programming.