Download zip Select Archive Format
Name Last Update history
File empty ..
File txt Adafruit_I2C.py Loading commit data...
File txt LICENSE Loading commit data...
File txt README.md Loading commit data...
File txt Si5351.py Loading commit data...
File txt ad.py Loading commit data...
File txt ccdec.bin Loading commit data...
File txt ccdecy.bin Loading commit data...
File txt ccris.bin Loading commit data...
File txt ccrisy.bin Loading commit data...
File txt client.py Loading commit data...
File txt csr.csv Loading commit data...
File txt final_EP.py Loading commit data...
File txt freq.txt Loading commit data...
File txt freq_AD.txt Loading commit data...
File txt init_freq.py Loading commit data...
File txt litex_server Loading commit data...
File txt pwm_cli.py Loading commit data...
File txt test_10MHz.py Loading commit data...

README.md

RasPi-Si5351.py

A python2 library for setting the frequency of a Si5351 off the Raspberry Pi's I2C bus.

Introduction

This library is derived from Adafruit's si5351 library code at https://github.com/adafruit/Adafruit_Si5351_Library

The library requires python2 at the moment. Since the Adafruit_I2C.py library depends on python-smbus and this code uses that library, make sure you have the python2 package python-smbus installed:

$ sudo apt-get install python-smbus

Example python2 code:

from Si5351 import Si5351

si = Si5351()

print "Set Output #0 to 13.703704 MHz"  

# vco = 25 MHz * (24 + 2 / 3) = 616.67 MHz
si.setupPLL(si.PLL_A, 24, 2, 3)

# out = 616.67 MHz / 45 = 13.703704 MHz 
si.setupMultisynth(0, si.PLL_A, 45)

# uncomment to divide 13.703704 by 64
# si.setupRdiv(0, si.R_DIV_64)

si.enableOutputs(True)