Si5351A/B/C Raw Data Transfer Software
Version
0.2, April 2019
by Électro-Bidouilleur (electro@bidouilleur.ca)
This software allows to manually configure Silicon Laboratories Si5351A/B/C Synthesizer chips when supervised by an Arduino Uno or Nano board. Once the Arduino has received a configuration from this software, it will re-load the Si5351 chip with that same configuration at every power up or reset. The Arduino (properly configured by this software) is required as the Si5351 chip does not retain its configuration when power is removed; it must be re-configured at power up.
The software is written in Python 2.7 programming language. Thus it is fully compatible with the Linux and Windows (7, 8, 10) operating systems. Although it has not been tested, the software should also run properly on the Mac OS.
An accompanying Arduino software (sketch) must be used in conjuction with this software, otherwise the latter will not function.
The Arduino sketch uses Jason Mildrum's Etherkit Si5351Arduino library (https://github.com/etherkit/Si5351Arduino). That library must be installed in the Arduino IDE via the Library Manager (Menu: Sketch -> Include Library -> Manage Libraries...).
Access must be granted to the virtual serial port associated with the Arduino's serial-USB adapter, otherwise an error message will be displayed.
The Python 2.7.x environment must be installed in Windows prior to executing this Python script. Download the proper MSI Installer from https://www.python.org/download/releases/2.7/ and run it. It is recommended that you leave the installed software location as suggested: "C:\Python27".
The
PySerial (Python Serial) library is required to run this software.
The best way to add it is to follow the instructions detailed on the
Adafruit website:
https://learn.adafruit.com/arduino-lesson-17-email-sending-movement-detector/installing-python-and-pyserial
. That PySerial installation folder is also included with this
sortware; this will save time and eliminate the need to download and
un-archive the tar.gz file. In a nutshell, change the path
environment variable to add the
"C:\Python27" path,
open a command prompt window, change directory to the supplied
PySerial folder, and execute the "python
setup.py install"
command.
The proper Arduino USB-Serial virtual port driver must be installed prior to using this software. This is normally the case with Windows versions prior to Windows 10. Note that this driver is typically installed during the Arduino IDE installation.
Once the above requirements are met, executing this script is just a matter of double-clicking on the .py file. If the script window does not show up, launch the script from a command prompt window: change directory to the script directory and issue the "python ______.py" command (replace “______” with the exact script name). An error message should reveal the nature of the problem.
Most Linux distributions include the Python 2.7.x environment. So there is no need to install Python.
The PySerial (Python Serial) library is required to run this software. The easiest way to install the PySerial library is to install it from the Linux package manager (apt, zypp, yum, etc.). For Debian-based distributions (Debian, Ubuntu, mint, elementary, Zorin), execute the following commands at a terminal window:
sudo apt-get update
sudo apt-get install python-serial
An alternate way is to install it from the downloaded installation folder. That PySerial installation folder is also included with this software; this will save time and eliminate the need to download and un-archive the tar.gz file. In a nutshell, open a terminal window, change directory to the supplied PySerial folder, and execute the "sudo python setup.py install" command.
The Tkinter window library must also be installed. Install it from the Linux package manager (apt, zypp, yum, etc.). For Debian-based distributions (Debian, Ubuntu, mint, elementary, Zorin), execute the following commands at a terminal window:
sudo apt-get update
sudo apt-get install python-tk
The Arduino USB-Serial virtual port driver is typically included with most Linux distributions. The Arduino Nano virtual port should automatically be detected.
Once the above requirements are met, executing this script is just a matter of launching the script from a console window: change directory to the script directory and issue the "python ______.py" command (replace “______” with the exact script name). If the script window does not show up, an error message should reveal the nature of the problem.
Serial Port Configuration
Windows: The syntax used in the Serial Port field is "COMx", for example "COM6". The user shall find out which COM port is associated with the USB-serial adapter on the Arduino board by consulting the Windows Device Manager or the Arduino IDE (Menu: Tools -> Port).
Linux: The syntax used in the Serial Port field is "/dev/ttyUSBx", for example "/dev/ttyUSB0". The user shall find out which serial port is associated with the USB-serial adapter on the Arduino board by consulting the "/dev" device directory, or the Arduino IDE (Menu: Tools -> Port).
The following syntax must be used to capture the Si5351 configuration data in the program window:
Each line contains one Si5351 register write information, composed of the internal address (from 0 to 187) to write to, a coma (','), the data to write at that address and a semi-column (';').
There must be at maximum one register write per line.
Data must be captured in decimal base (byte size ranging from '0' to '255'). This applies to both the register address and the written data. No other base - hexadecimal or binary - is supported.
The semi-column delimits the register write information. Anything following the semi-column (for example a comment) is disregarded by the program.
To leave a blank line, or to write a comment without any register write information on that line, a semi-column (';') must be placed in column 1 of that line. No line must be left empty.
Basic numerical syntax is checked by the program before data transfer. However specific address and data validity is not checked; the user must ensure that the information captured is valid.
The configuration data shown in the program is retrieved from the file "Raw_Data.txt" at program launch. It is saved in the same file at program exit. This is a simple ASCII file. If desired, one can edit that file in another ASCII text editor prior to launching the program.
This software provides complete configuration capability of the Si5351 family of chips. The user must understand the limits imposed by the Si5351 model (A, B or C) used, such as the number of channels available or the presence of an external reference input. A good comprehension of the Silicon Labs' Si5351A/B/C Datasheet document is recommended.
This program can be used to configure a Si5351 with any available features, including features that are not implemented in the more automated "Si5351 Synthesizer Configuration" program. This flexibility comes at a cost: the various Si5351 registers need to be programmed individually, which is more tedious. A good comprehension of the Silicon Labs' AN-619 "Manually Generating an Si5351 Register Map" document is required.
The software saves the various window field values and the window position in a text file named "saved_settings_raw.cfg" in the same directory as this Python script. This is performed at program exit. Reloading of the field values is done at program launch by reading the file. The absence of that file in the directory will force the program to revert to default values at program launch.
This software is “Free software” (as defined by the Free Software Foundation), which means it respects users' freedom and community. The users have the freedom to run, copy, distribute, study, change and improve this software.
This text is extracted from the About_Raw.html file provided with this software.