# Adafruit Si5351 Clock Generator Breakout

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/116/502/medium800/adafruit_products_dblclocks.jpg?1667835842)

Never hunt around for another crystal again, with the Si5351 clock generator breakout from Adafruit! This chip has a precision 25MHz crystal reference and internal PLL and dividers so it can generate just about any frequency, from \<8KHz up to 150+ MHz. This chip is available on the original breakout board with three full [edge-launch SMA connectors](https://www.adafruit.com/product/1865)&nbsp;or a PCB in the[&nbsp; **STEMMA QT** &nbsp;form factor](https://www.adafruit.com/?q=stemma%20qt%20sensor "STEMMA QT form factor"), making it easy to interface with.

![](https://cdn-learn.adafruit.com/assets/assets/000/018/785/medium800/adafruit_products_2045kit_ORIG.jpg?1407880245)

The Si5351 clock generator is an I2C controller clock generator. It uses the onboard precision clock to drive multiple PLL's and clock dividers using I2C instructions. By setting up the PLL and dividers you can create precise and arbitrary frequencies.

There are three independent outputs, and each one can have a different frequency. Outputs are 3Vpp, either through a breadboard-friendly header or, for RF work, an optional SMA connector. The STEMMA QT version has an SMA connector for output #1 and the non-QT breakout has outputs for all three ports.

![with](https://cdn-shop.adafruit.com/970x728/5640-05.jpg )

There is a 3.3V LDO regulator so it can be powered from 3-5VDC. We also put level shifting circuitry on the I2C lines so you can use this chip safely with 3V or 5V logic.

![STEMMA](https://cdn-shop.adafruit.com/970x728/5640-03.jpg )

On the PCB in the[&nbsp; **STEMMA QT** &nbsp;form factor](https://www.adafruit.com/?q=stemma%20qt%20sensor "STEMMA QT form factor"), there are [STEMMA QT connectors](https://learn.adafruit.com/introducing-adafruit-stemma-qt/what-is-stemma-qt) on either side that are compatible with the [SparkFun Qwiic](https://www.sparkfun.com/qwiic)&nbsp;I2C connectors. This allows you to make solderless connections between your development board and the Si5351 or to chain it with a wide range of other sensors and accessories using a&nbsp;[**compatible cable**](https://www.adafruit.com/?q=stemma%20qt%20cable).&nbsp;

# Adafruit Si5351 Clock Generator Breakout

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/018/783/medium800/adafruit_products_pinouts.jpg?1407880199)

## Power Pins
The clock generator on the breakout requires 3V power. Since many customers have 5V microcontrollers like Arduino, we tossed a 3.3V regulator on the board. Its ultra-low dropout so you can power it from 3.3V-5V just fine.  

- **Vin** - this is the power pin. Since the chip uses 3 VDC, we have included a voltage regulator on board that will take 3-5VDC and safely convert it down. To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V micro like Arduino, use 5V
- **GND** - common ground for power and logic

 
## I2C Pins
 
- **SCL** - I2C clock pin, connect to your microcontrollers I2C clock line. This pin is level shifted so you can use 3-5V logic, and there's a 10K pullup on this pin.  
- **SDA** - I2C data pin, connect to your microcontrollers I2C data line. This pin is level shifted so you can use 3-5V logic, and there's a 10K pullup on this pin.

 **Clock Out Pins**  

- **0** , **1** , and **2** - These are the 3 independent clock generated outputs. They are square waves, from 0-3V.

The clock out pins are also brought out to SMA edge-launch connectors on the other side of the PCB. [You can purchase and solder on some edge-launch SMA connectors](https://www.adafruit.com/product/1865) if you want to pipe the signal into an RF cable.  
 ![](https://cdn-learn.adafruit.com/assets/assets/000/018/748/medium800/adafruit_products_1865-04.jpg?1407864192)

![](https://cdn-learn.adafruit.com/assets/assets/000/018/747/medium800/adafruit_products_1865-05.jpg?1407864177)

# Adafruit Si5351 Clock Generator Breakout

## STEMMA QT Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/116/503/medium800/adafruit_products_front_back.jpg?1667836681)

The default I2C address is&nbsp; **0x60**.

## Power Pins

- **VIN** &nbsp;- this is the power pin. Since the clock generator chip may use 3 VDC, we have included a voltage regulator on board that will take 3-5VDC and safely convert it down. To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V microcontroller like Arduino, use 5V.
- **3Vo** &nbsp;- this is the 3.3V output from the voltage regulator, you can grab up to 100mA from this if you like.
- **GND** &nbsp;- common ground for power and logic.

## I2C Logic Pins

- **SCL**** &nbsp; **- I2C clock pin, connect to your microcontroller I2C clock line. This pin is level shifted so you can use 3-5V logic, and there's a&nbsp;** 10K pullup**&nbsp;on this pin.
- **SDA**** &nbsp; **- I2C data pin, connect to your microcontroller I2C data line. This pin is level shifted so you can use 3-5V logic, and there's a&nbsp;** 10K pullup**&nbsp;on this pin.
- **[STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt)&nbsp;-&nbsp;**These connectors allow you to connectors to dev boards with&nbsp; **STEMMA QT** &nbsp;connectors or to other things with&nbsp;[various associated accessories](https://www.adafruit.com/category/619).

## Clock Out Pins

- **0** , **1** , and **2** - These are the 3 independent clock generated outputs. They are square waves, from 0-3V.

Clock output **1** is also brought out to an SMA edge-launch connector on the other side of the PCB. [You can purchase and solder on an edge-launch SMA connector](https://www.adafruit.com/product/1865) if you want to pipe the signal into an RF cable.

## Power LED and LED Jumper

- **Power LED -&nbsp;** In the upper left corner, above the STEMMA connector, on the front of the board, is the power LED, labeled **&nbsp;on**. It is the green LED.
- **LED jumper&nbsp;** - This jumper is located on the back of the board. Cut the trace on this jumper to cut power to the "on" LED.

# Adafruit Si5351 Clock Generator Breakout

## Assembly

![](https://cdn-learn.adafruit.com/assets/assets/000/018/782/medium800/adafruit_products_2045kit_ORIG.jpg?1407880185)

If you have the breadboard version of this sensor, you'll want to solder some header onto the sensor so it can be used in a breadboard.

## Prepare the header strip:

Cut the strip to length if necessary. It will be easier to solder if you insert it into a breadboard - **long pins down**

![adafruit_products_header.jpg](https://cdn-learn.adafruit.com/assets/assets/000/018/749/medium640/adafruit_products_header.jpg?1407866306)

## Add the breakout board:
Place the breakout board over the pins so that the short pins poke through the breakout pads![adafruit_products_place.jpg](https://cdn-learn.adafruit.com/assets/assets/000/018/750/medium640/adafruit_products_place.jpg?1407866319)

## And Solder!
Be sure to solder all pins for reliable electrical contact.  
  
Solder the longer power/data strip first  
  
_(For tips on soldering, be sure to check out our_ [_Guide to Excellent Soldering_](http://learn.adafruit.com/adafruit-guide-excellent-soldering)_)._![adafruit_products_solder1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/018/751/medium640/adafruit_products_solder1.jpg?1407866334)

![adafruit_products_solder2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/018/752/medium640/adafruit_products_solder2.jpg?1407866341)

![adafruit_products_solder3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/018/753/medium640/adafruit_products_solder3.jpg?1407866347)

You're done! Check your solder joints visually and continue onto the next steps

![adafruit_products_done.jpg](https://cdn-learn.adafruit.com/assets/assets/000/018/754/medium640/adafruit_products_done.jpg?1407866369)

# Adafruit Si5351 Clock Generator Breakout

## Arduino Code

## Wiring for Arduino

You can easily wire this breakout to any microcontroller, we'll be using an Arduino. For another kind of microcontroller, just make sure it has I2C capability, then port the code - its pretty simple stuff!

![](https://cdn-learn.adafruit.com/assets/assets/000/116/505/medium800/adafruit_products_metroBB_bb.png?1667837908)

[](https://learn.adafruit.com/assets/18589)

[![adafruit_products_wiring.jpg](/system/assets/assets/000/018/755/medium800/adafruit_products_wiring.jpg?1407870042) ](/assets/18755)

- Connect **Vin** to the power supply, 3-5V is fine. Use the same voltage that the microcontroller logic is based off of. For most Arduinos, that is 5V. Feathers, ItsyBitsys, etc. use 3V. Check your board documentation.
- Connect **GND** to common power/data ground
- Connect the **SCL** pin to the I2C clock **SCL** pin on your Arduino. On an UNO & '328 based Arduino, this is also known as **A5** , on a Mega it is also known as **digital 21** and on a Leonardo/Micro, **digital 3**
- Connect the **SDA** pin to the I2C data **SDA** pin on your Arduino. On an UNO & '328 based Arduino, this is also known as **A4** , on a Mega it is also known as **digital 20** and on a Leonardo/Micro, **digital 2**

## Download Adafruit\_Si5351

To begin reading sensor data, you will need to download the&nbsp; **Adafruit Si5351&nbsp;** library from the Arduino library manager.

Open up the Arduino library manager:

![](https://cdn-learn.adafruit.com/assets/assets/000/084/453/medium800/adafruit_products_1library_manager_menu.png?1574045400)

Search for the&nbsp; **Adafruit Si5351&nbsp;** library and install it

![](https://cdn-learn.adafruit.com/assets/assets/000/084/455/medium800/adafruit_products_si5351.png?1574045456)

We also have a great tutorial on Arduino library installation at:  
[http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use](http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use "Link: http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use")

## Load Demo Sketch

Now you can open up **File-\>Examples-\>Adafruit\_Si5351**** -\>Si5351** and upload to your Arduino wired up to the sensor

![](https://cdn-learn.adafruit.com/assets/assets/000/018/756/medium800/adafruit_products_si5351demo.png?1407870338)

Then open up the Serial console at 9600 baud to check the output. You should see the following:

![](https://cdn-learn.adafruit.com/assets/assets/000/018/757/medium800/adafruit_products_demoout.png?1407870390)

Now you can use your oscilloscope to probe the #0, #1 and #2 outputs

Danger: 

![](https://cdn-learn.adafruit.com/assets/assets/000/018/758/medium800/adafruit_products_tek00003.png?1407871139)

![](https://cdn-learn.adafruit.com/assets/assets/000/018/759/medium800/adafruit_products_tek00005.png?1407871156)

![](https://cdn-learn.adafruit.com/assets/assets/000/018/760/medium800/adafruit_products_tek00008.png?1407871166)

That's it! If you want to change the frequencies, adjust the example sketch and re-upload.

## Library Reference

The library we have is simple and easy to use  
  
You can create the `Adafruit_Si5351` object with:

```auto
Adafruit_SI5351 clockgen = Adafruit_SI5351();
```

I2C does not have pins, as they are fixed in hardware.

## Begin!

To initialize the chip, call `clockgen.begin()` which will check that it can be found. `Begin()` returns true/false depending on these checks. We suggest you wrap `begin()` in a statement that will check if the chip was located:

```auto
  if (clockgen.begin() != ERROR_NONE)
  {
    /* There was a problem detecting the IC ... check your connections */
    Serial.print("Ooops, no Si5351 detected ... Check your wiring or I2C ADDR!");
    while(1);
  }
```

## Set up the PLL

The chip uses two subsections to generate clock outputs. First it **multiplies** the 25MHz reference clock by some amount (setting up the PLL), then it **divides** that new clock by some other amount (setting up the clock divider)  
  
By noodling with the multiplier and divider you can generate just about any clock frequency!  
  
There are **two** PLL multipliers (A and B), so if you want to have three outputs, two outputs will have to share one PLL.

## Set up the PLL with 'integer mode'

The cleanest way to run the PLL is to do a straight up integer multiplication:

```auto
clockgen.setupPLLInt(SI5351_PLL_A or SI5351_PLL_B, m);
```

This sets `PLL_A` or `PLL_B` to be **25MHz \*** `m` and `m` (the integer multiplier) can range from **15** to **90**!

## Set up the PLL with 'fractional mode'
This mode allows a much more flexible PLL setting by using fractional multipliers for the PLL setup, however, the output may have a slight amount of jitter so if possible, try to use integer mode!  
```auto
clockgen.setupPLLInt(SI5351_PLL_A or SI5351_PLL_B, m, n, d);
```

This sets `PLL_A` or `PLL_B` to be **25MHz \* (m** + **n/d** )

- `m` (the integer multiplier) can range from **15** to **90**
- `n` (the numerator) can range from **0 to 1,048,575**
- `d` (the denominator) can range from **1** to **1,048,575**

## Set up the clock divider

Once you have the PLLs set up, you can now divide that high frequency down to get the number you want for the output  
  
Each output has its own divider. You can use the cleaner Integer-only divider:

```auto
clockgen.setupMultisynthInt(output, SI5351_PLL_x, SI5351_MULTISYNTH_DIV_x);
```

- For the `output` use 0, 1 or 2
- For the PLL input, use either `SI5351_PLL_A` or `SI5351_PLL_B`
- For the divider, you can divide by `SI5351_MULTISYNTH_DIV_4`, `SI5351_MULTISYNTH_DIV_6`, or `SI5351_MULTISYNTH_DIV_8`

Again, integer output will give you the cleanest clock. If you need more flexibility, use the fractional generator/divider:

```auto
clockgen.setupMultisynth(output, SI5351_PLL_x, div, n, d);
```

- For the `output` use 0, 1 or 2
- For the PLL input, use either `SI5351_PLL_A` or `SI5351_PLL_B`
- The final frequency is equal to the **PLL / (div + n/d)**
- `div` can range from **4** to **900**
- `n` can range from **0 to 1,048,575**
- `d` can range from **1 to 1,048,575**

## Additional R Divider

If you need to divide even more, to get to the \< 100 KHz frequencies, there's an additional R divider, that divides the output once more by a fixed number:

```auto
clockgen.setupRdiv(output, SI5351_R_DIV_x);
```

`output` is the clock output #  
The R divider can be any of the following:

- `SI5351_R_DIV_1`
- `SI5351_R_DIV_2`
- `SI5351_R_DIV_4`
- `SI5351_R_DIV_8`
- `SI5351_R_DIV_16`
- `SI5351_R_DIV_32`
- `SI5351_R_DIV_64`
- `SI5351_R_DIV_128`

## Software

[As you can see, the annoying part here is figuring out the best choice for PLL multipler & divider! SiLabs has a desktop application called ClockBuilder](http://www.adafruit.com/downloads/ClockBuilderDesktopSwInstallSi5351.zip "Link: http://www.adafruit.com/downloads/ClockBuilderDesktopSwInstallSi5351.zip") that can do some calculation of the PLL divider/multiplier for you. It's Windows only, but you only need to use it once for calculation.  
  
Install and run, select the **Si5351A** with 3 outputs, and **Do not connect to the EVB**

![](https://cdn-learn.adafruit.com/assets/assets/000/018/761/medium800/adafruit_products_clockbuildernoEVB.png?1407873008)

Enable the output you want, and set the frequency as floating point or fraction

![](https://cdn-learn.adafruit.com/assets/assets/000/018/762/medium800/adafruit_products_configout.png?1407873045)

Set up the crystal to be 25 MHz (the default is 27 MHz)

![](https://cdn-learn.adafruit.com/assets/assets/000/018/764/medium800/adafruit_products_set_xtal_freq.png?1407873202)

Click on **Create Frequency Plan** to see the PLL and divider setups!

![](https://cdn-learn.adafruit.com/assets/assets/000/018/763/medium800/adafruit_products_freqplan.png?1407873091)

Earlier versions of this chip only take a divider of 900 or less, and our library doesn't let you select \> 900 for the integer div. So if you get a higher value from the calculator, you may need to adjust it!

# Adafruit Si5351 Clock Generator Breakout

## CircuitPython Code

It's easy to use the Si5351 clock generator with Python or CircuitPython, and the [Adafruit CircuitPython SI5351](https://github.com/adafruit/Adafruit_CircuitPython_SI5351) module. This module allows you to easily write Python code that controls the clock output of the board.

You can use this sensor with any CircuitPython microcontroller board or with a computer that has GPIO and Python [thanks to Adafruit\_Blinka, our CircuitPython-for-Python compatibility library](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).

## CircuitPython Microcontroller Wiring

First wire up a Si5351 to your board exactly as shown on the previous pages for Arduino using an I2C connection. Here's an example of wiring a Feather M0 to the sensor with I2C:

- **Board 3V** &nbsp;to&nbsp; **clock generator VIN**
- **Board GND** to **clock generator**** &nbsp;GND**
- **Board SCL** to **clock generator**** &nbsp;SCL**
- **Board SDA** to **clock generator**** &nbsp;SDA**

![adafruit_products_m0_si5351_bb.png](https://cdn-learn.adafruit.com/assets/assets/000/050/647/medium640/adafruit_products_m0_si5351_bb.png?1534446666)

![adafruit_products_featherBB_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/116/506/medium640/adafruit_products_featherBB_bb.jpg?1667837941)

## Python Computer Wiring

Since there's _dozens_ of Linux computers/boards you can use we will show wiring for Raspberry Pi. For other platforms, [please visit the guide for CircuitPython on Linux to see whether your platform is supported](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).&nbsp;

Here's the Raspberry Pi wired with I2C:

- **Pi 3V3** to **clock generator**** &nbsp;VIN**
- **Pi GND** to **clock generator**** &nbsp;GND**
- **Pi SCL** to **clock generator**** &nbsp;SCL**
- **Pi SDA** to **clock generator**** &nbsp;SDA**

![adafruit_products_raspi_si5351_i2c_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/059/247/medium640/adafruit_products_raspi_si5351_i2c_bb.jpg?1534446743)

![adafruit_products_piBreadboard_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/116/507/medium640/adafruit_products_piBreadboard_bb.jpg?1667837962)

## CircuitPython Installation of SI5351 Library

Next you'll need to install the&nbsp;[Adafruit CircuitPython SI5351](https://github.com/adafruit/Adafruit_CircuitPython_SI5351)&nbsp;library on your CircuitPython board.

First make sure you are running the&nbsp;[latest version of Adafruit CircuitPython](../../../../welcome-to-circuitpython/installing-circuitpython)&nbsp;for your board.

Next you'll need to install the necessary libraries&nbsp;to use the hardware--carefully follow the steps to find and install these libraries from&nbsp;[Adafruit's CircuitPython library bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle).&nbsp; Our introduction guide has&nbsp;[a great page on how to install the library bundle](../../../../welcome-to-circuitpython/circuitpython-libraries)&nbsp;for both express and non-express boards.

Remember for non-express boards like the, you'll need to manually install the necessary libraries from the bundle:

- **adafruit\_si5351.mpy**
- **adafruit\_bus\_device**

Before continuing make sure your board's lib folder or root filesystem has the&nbsp; **adafruit\_si5351.mpy,&nbsp;** and **&nbsp;adafruit\_bus\_device**** &nbsp; **files and folders** &nbsp;**copied over.

Next[&nbsp;connect to the board's serial REPL](https://learn.adafruit.com/welcome-to-circuitpython/the-repl) so you are at the CircuitPython&nbsp; **\>\>\>** &nbsp;prompt.

## Python Installation of SI5351 Library

You'll need to install the Adafruit\_Blinka library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3. [Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux)!

Once that's done, from your command line run the following command:

- `pip3 install adafruit-circuitpython-si5351`

If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

## CircuitPython & Python Usage

To demonstrate the usage of the sensor we'll initialize it and control the clocks from the board's Python REPL. &nbsp;Run the following code to import the necessary modules and initialize the I2C connection with the sensor:

```auto
import board
import busio
import adafruit_si5351
i2c = busio.I2C(board.SCL, board.SDA)
si5351 = adafruit_si5351.SI5351(i2c)
```

Now you're ready to configure the PLLs and clock outputs on the chip.&nbsp; The SI5351 is somewhat complex and allows quite many configurations to balance the accuracy and range of clock output values.&nbsp; You'll want to [review the datasheet](https://cdn-shop.adafruit.com/datasheets/Si5351.pdf) to understand the capabilities and features of the chip.

## Configure Phase Lock Loops

First you'll need to configure one of the two PLLs (phase-locked loops, special hardware that can 'multiply' the 25 MHz crystal to much faster speeds) which will be used as the source of any of the clock outputs.&nbsp; The Si5351 object has two PLL objects you can manipulate:

- `pll_a` This is the PLL A hardware on the chip.
- `pll_b` This is the PLL B hardware on the chip.

You can configure each PLL's multiplier by calling the `configure_integer` or `configure_fractional `function.&nbsp; The integer configuration lets you set an integer multiplier for the 25 MHz base crystal frequency.&nbsp; This is the most accurate way to control frequency but you can only set integer multiples.&nbsp; For example to set PLL A to 500 MHz you'd set an integer multiplier of 20 (25 MHz \* 20 = 500 MHz):

```auto
si5351.pll_a.configure_integer(20)
```

 **Don't forget, if you read the datasheet you'll see the Si5351 only supports a PLL multiple of 15-90!**

If you're curious you can read the `frequency` property of the PLL to read back what frequency it is configured to use:

```auto
print('PLL A: {0} MHz'.format(si5351.pll_a.frequency/1000000))
```

![](https://cdn-learn.adafruit.com/assets/assets/000/050/648/medium800/adafruit_products_Screen_Shot_2018-02-02_at_3.41.45_PM.png?1517614929)

The other way to configure a PLL is with a fractional multiplier.&nbsp; This allows you to set both the integer multiple and a fractional multiple (specified by a numerator and denominator).&nbsp; Fractional multipliers can let you specify an even greater range of frequencies, but they might not be accurate and could be susceptible to jitter over time.

For example to configure PLL B to 512.5 MHz you can specify a multiplier of 20.5 by calling:

```auto
si5351.pll_b.configure_fractional(20, 1, 2)
```

Notice the `configure_fractional` function takes in again the integer multiple (20) but also adds a numerator (1) and denominator (2) value.&nbsp; The actual multiplier will be the combination of the integer multiplier plus the numerator/denominator.&nbsp; In this case 20.5 or 20 1/2 is the multiplier.

Again you can read the `frequency` property to confirm the value that was set.

```auto
print('PLL B: {0} MHz'.format(si5351.pll_b.frequency/1000000))
```

![](https://cdn-learn.adafruit.com/assets/assets/000/050/649/medium800/adafruit_products_Screen_Shot_2018-02-02_at_3.45.53_PM.png?1517615168)

## Configure Clock Outputs

Once a PLL is configured you can then configure any of the three clock outputs of the Si5351.&nbsp; Each clock output is fed in a PLL as input and will divide it down to a final frequency value.&nbsp; Any PLL can be plugged in to any clock output, but remember you only have two PLLs to configure and use.&nbsp;

Each of the clocks is exposed on the SI5351 object:

- `clock_0` The clock 0 output.
- `clock_1` The clock 1 output.
- `clock_2` The clock 2 output.

Just like configuring the PLLs you can configure the clock divider with a `configure_integer` and `configure_fractional` function.&nbsp; Again the same trade-off of precision vs. range applies for integer vs. fractional dividers applies.&nbsp; For example to set clock 0 to use PLL A as a source (running at 500 MHz as configured above) and a divider of 4 you could call:

```auto
si5351.clock_0.configure_integer(si5351.pll_a, 4)
```

Notice you tell the `configure_integer` function both the PLL to use and the integer divider value.&nbsp; You can point at either of the `pll_a` or `pll_b` objects on the Si5351 to use a specific PLL as the source.

The final frequency set by the clock will then be configured as the PLL source frequency (500 MHz here) divided by the divider value (4), or 125 MHz.&nbsp; You can check by reading the `frequency` property of the clock:

```auto
print('Clock 0: {0:0.3f} MHz'.format(si5351.clock_0.frequency/1000000))
```

![](https://cdn-learn.adafruit.com/assets/assets/000/050/656/medium800/adafruit_products_Screen_Shot_2018-02-02_at_4.02.39_PM.png?1517616176)

Like the PLL configuration you can also set a fractional divider with the `configure_fractional` function on the clock.&nbsp; Let's set clock 1 to have PLL B as the source and a divider of 4.5:

```auto
si5351.clock_1.configure_fractional(si5351.pll_b, 4, 1, 2)
```

If you do the math you should expect a source PLL of 512.5 MHz divided by 4.5 would yield a clock output of 113.8889 MHz.&nbsp; Check the `frequency` property to be sure:

```auto
print('Clock 1: {0:0.3f} MHz'.format(si5351.clock_1.frequency/1000000))
```

![](https://cdn-learn.adafruit.com/assets/assets/000/050/655/medium800/adafruit_products_Screen_Shot_2018-02-02_at_4.01.36_PM.png?1517616120)

## Enabling Outputs

There's one last thing to do before the clock outputs will actually work, you need to enable them.&nbsp; You can enable all the clock outputs by setting the `outputs_enabled` property to `True`:

```auto
si5351.outputs_enabled = True
```

Now the clock 0, 1, 2 outputs should output a square wave at the configured frequency based on their PLL and multipliers & dividers. You might need to use an oscilloscope that's very fast to measure some of these outputs as the Si5351 can generate quite high clock speeds, well above 100 MHz!

If you want to disable the outputs set `outputs_enabled` to `False`.

That's all there is to using the Si5351 clock generator with CircuitPython! Here's a complete example that will configure all 3 clocks in various ways. Save this as **code.py** on your board and read the comments to see how it configures each clock.

## Full Example Code
https://github.com/adafruit/Adafruit_CircuitPython_SI5351/blob/main/examples/si5351_simpletest.py

# Adafruit Si5351 Clock Generator Breakout

## Python Docs

# Adafruit Si5351 Clock Generator Breakout

## Downloads

## Software

[SiLabs has a desktop application called ClockBuilder](http://www.adafruit.com/downloads/ClockBuilderDesktopSwInstallSi5351.zip "Link: http://www.adafruit.com/downloads/ClockBuilderDesktopSwInstallSi5351.zip") that can do some calculation of the PLL divider/multiplier for you.

## Files

- [Si5351 Datasheet](https://cdn-learn.adafruit.com/assets/assets/000/116/463/original/Si5351-B_datasheet.pdf?1667590965)
- [Original Si5351 Breakout Fritzing object in Adafruit Fritzing library](https://github.com/adafruit/Fritzing-Library)
- [Original Si5351 Breakout EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-Si5351A-Clock-Generator-Breakout-PCB)
- [STEMMA QT Si5351A Fritzing object](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20Si5351A%20Clock%20Generator%20with%20STEMMA%20QT.fzpz)
- [STEMMA QT Si5351 EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-Si5351A-Clock-Generator-with-STEMMA-QT-PCB)

## STEMMA QT Si5351 Schematic and Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/116/465/medium800/adafruit_products_schem.png?1667591381)

![](https://cdn-learn.adafruit.com/assets/assets/000/116/466/medium800/adafruit_products_fab.png?1667591389)

## Original Si5351 Breakout Schematic and Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/018/765/medium800/adafruit_products_schem.png?1407873628)

![](https://cdn-learn.adafruit.com/assets/assets/000/018/766/medium800/adafruit_products_fabprint.png?1407873643)


## Related Guides

- [Adafruit HUZZAH32 - ESP32 Feather](https://learn.adafruit.com/adafruit-huzzah32-esp32-feather.md)
- [16-Step Drum Sequencer](https://learn.adafruit.com/16-step-drum-sequencer.md)
- [Raspberry Pi Pico and LED Arcade Button MIDI Controller](https://learn.adafruit.com/raspberry-pi-pico-led-arcade-button-midi-controller-fighter.md)
- [No-Solder Visualizer Capacitive Touch Controller](https://learn.adafruit.com/no-solder-visualizer-capacitive-touch-controller.md)
- [MIDI Melody Maker](https://learn.adafruit.com/midi-melody-maker.md)
- [Adafruit ItsyBitsy ESP32](https://learn.adafruit.com/adafruit-itsybitsy-esp32.md)
- [LLM Agent Embodiment Kit](https://learn.adafruit.com/llm-agent-embodiment-kit.md)
- [Fruit Jam Video Music](https://learn.adafruit.com/fruit-jam-video-music.md)
- [Adafruit MLX90640 IR Thermal Camera](https://learn.adafruit.com/adafruit-mlx90640-ir-thermal-camera.md)
- [CircuitPython Elgato WiFi Light Controller](https://learn.adafruit.com/circuitpython-elgato-wifi-light-controller.md)
- [CircuitPython Libraries on any Computer with FT232H](https://learn.adafruit.com/circuitpython-on-any-computer-with-ft232h.md)
- [Prop-Maker Feather Talking Adabot Clock](https://learn.adafruit.com/prop-maker-feather-talking-adabot-clock.md)
- [Monster Matrix with WLED](https://learn.adafruit.com/monster-matrix-with-wled.md)
- [NeoPixel Mini VU Meter](https://learn.adafruit.com/neopixel-mini-vu-meter.md)
- [Darth Faders](https://learn.adafruit.com/darth-faders.md)
