Adafruit Si5351 Clock Generator Breakout Created by lady ada Last updated on 2018-08-22 03:43:11 PM UTC
Guide Contents Guide Contents Overview Pinouts 2 3 5 Power Pins I2C Pins 5 5 Assembly 7 Prepare the header strip: Add the breakout board: And Solder! 7 8 8 Arduino Code Wiring for Arduino Download Adafruit_Si5351 Load Demo Sketch Library Reference Begin! Set up the PLL Set up the PLL with 'integer mode' Set up the PLL with 'fractional mode' Set up the clock divider Additional R Divider Software CircuitPython Code CircuitPython Microcontroller Wiring Python Computer Wiring CircuitPython Installation
Overview 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. © Adafruit Industries https://learn.adafruit.
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.
Pinouts 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.
© Adafruit Industries https://learn.adafruit.
Assembly 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 Industries https://learn.adafruit.
Add the breakout board: Place the breakout board over the pins so that the short pins poke through the breakout pads © Adafruit Industries https://learn.adafruit.
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 (https://adafru.it/aTk)). © Adafruit Industries https://learn.adafruit.
You're done! Check your solder joints visually and continue onto the next steps © Adafruit Industries https://learn.adafruit.
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://adafru.it/dPs) (https://adafru.it/pBC) Connect Vin to the power supply, 3-5V is fine. Use the same voltage that the microcontroller logic is based off of.
Then open up the Serial console at 9600 baud to check the output. You should see the following: Now you can use your oscilloscope to probe the #0, #1 and #2 outputs Depending on your oscillioscope make and model, it may not be possible for you to verify the 112.5MHz output frequency! © Adafruit Industries https://learn.adafruit.
© Adafruit Industries https://learn.adafruit.
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: 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.
Set up the PLL with 'integer mode' The cleanest way to run the PLL is to do a straight up integer multiplication: clockgen.
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 (https://adafru.it/dPj) that can do some calculation of the PLL divider/multiplier for you.
Set up the crystal to be 25 MHz (the default is 27 MHz) Click on Create Frequency Plan to see the PLL and divider setups! © Adafruit Industries https://learn.adafruit.
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 Industries https://learn.adafruit.
CircuitPython Code It's easy to use the Si5351 clock generator with Python or CircuitPython, and the Adafruit CircuitPython SI5351 (https://adafru.it/C5C) 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://adafru.it/BSN).
adafruit_si5351.mpy adafruit_bus_device Before continuing make sure your board's lib folder or root filesystem has the adafruit_si5351.mpy, and adafruit_bus_device files and folders copied over. Next connect to the board's serial REPL (https://adafru.it/Awz) so you are at the CircuitPython >>> prompt. Python Installation of SI5351 Library You'll need to install the Adafruit_Blinka library that provides the CircuitPython support in Python.
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: print('PLL A: {0} MHz'.format(si5351.pll_a.frequency/1000000)) The other way to configure a PLL is with a fractional multiplier. This allows you to set both the integer multiple and a fractional multiple (specified by a numerator and denominator).
Notice you tell the configure_integer function both the PLL to use and the integer divider value. 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. You can check by reading the frequency property of the clock: print('Clock 0: {0:0.3f} MHz'.format(si5351.clock_0.
# - PLL A at 900mhz # - PLL B at 616.66667mhz # - Clock 0 at 112.5mhz, using PLL A as a source divided by 8 # - Clock 1 at 13.553115mhz, using PLL B as a source divided by 45.5 # - Clock 2 at 10.76khz, using PLL B as a source divided by 900 and further # divided with an R divider of 64. import board import busio import adafruit_si5351 # Initialize I2C bus. i2c = busio.I2C(board.SCL, board.SDA) # Initialize SI5351. si5351 = adafruit_si5351.
# - R_DIV_4: divider of 4 # - R_DIV_8: divider of 8 # - R_DIV_16: divider of 16 # - R_DIV_32: divider of 32 # - R_DIV_64: divider of 64 # - R_DIV_128: divider of 128 si5351.clock_2.r_divider = adafruit_si5351.R_DIV_64 print('Clock 2: {0}khz'.format(si5351.clock_2.frequency/1000)) # After configuring PLLs and clocks, enable the outputs. si5351.outputs_enabled = True # You can disable them by setting false. © Adafruit Industries https://learn.adafruit.
Python Docs Python Docs (https://adafru.it/C5F) © Adafruit Industries https://learn.adafruit.
Downloads Software SiLabs has a desktop application called ClockBuilder (https://adafru.it/dPj) that can do some calculation of the PLL divider/multiplier for you. Datasheet Si5351 Datasheet (https://adafru.it/dPk) Fritzing object in Adafruit Fritzing library (https://adafru.it/aP3) EagleCAD PCB files on GitHub (https://adafru.