Skip to content

Instantly share code, notes, and snippets.

View la3pna's full-sized avatar

Thomas S. Knutsen la3pna

  • HBV / HIVE
  • Drammen, NORWAY
View GitHub Profile
@la3pna
la3pna / i2c_Si_VFO
Last active September 4, 2022 07:36
Si5351 VFO with I2C display
/*
VFO program for Si5351
Using I2C LCD from:
http://www.amazon.com/Huhushop-TM-Serial-Display-Arduino/dp/B00JM88A94/
Si5351 library from NT7S.
Uses the updated version of the library (master).
Display library is avaible from:
https://code.google.com/p/u8glib/
#include "si5351.h"
#include "Wire.h"
Si5351 si5351;
unsigned long long n = 600;
bool set_phase90(unsigned long long frequency)
{
unsigned long long pll_freq = frequency * n;
@la3pna
la3pna / sweeper
Last active October 31, 2021 17:06
Si5351 Simple Sweep Generator
/*
Si5351 Simple Sweep Generator
connect Si5351 to I2C
Sweep out is on pin 5, ranging from 0-5V (3.3V).
Use a filter on sweep out voltage. 100K + 1uF should be a good start.
A op-amp can be used to improve the filtering of the DC voltage.
Copyright (c) 2016 Thomas S. Knutsen <la3pna@gmail.com>
@la3pna
la3pna / Si5351_VFO
Last active November 17, 2019 06:17
Si5351 generic VFO
/*
Si5351 VFO
By LA3PNA 27 March 2015
Modified 14 February 2017
Modified 28 November 2018
This code is licenced with GNU GPL v2. Please read: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
This version uses the new version (v2) of the Si5351 library from NT7S.
@la3pna
la3pna / Si5351_i2c_mod
Last active January 16, 2019 08:31
Si5351 VFO I2C
/*
VFO program for Si5351
Using I2C LCD from:
http://www.amazon.com/Huhushop-TM-Serial-Display-Arduino/dp/B00JM88A94/
Si5351 library from NT7S.
Uses the updated version of the library (master).
Updated with the format_freq routine from Tom AK2B
This code is licenced with GNU GPL v2. Please read: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
%-- 02.11.2017 00.02 --%
f = -300:1:300
c = (f-32)/1.8
c_t = f/2
c_r = (f/10)*3
err_t = c_t-c
err_r = c_r-c
err_c = c-c
plot(c,err_t)
hold on
@la3pna
la3pna / books.txt
Last active November 8, 2015 17:49
Technical bookshelf content
From top, left to rigth.
shelf A:
MIT RAD-LAB 23 Microwave receivers
MIT RAD-LAB 21 Electronic instruments
MIT RAD-LAB 16 Microwave mixers
MIT RAD-LAB 10 Waveguide handbook
Tekniske Regnetabeller 1949 (Smeby)
Tekniske Regnetabeller 1961 (Smeby og kobberstad)
[00:06] <LA3PNA2> NT7S, when you find a break, would you mind sketchin out how you determined the PLL parameters for the Si? I kinda would like to use that if I do a beacon
[00:09] <NT7S> my algorithm?
[00:12] <LA3PNA2> more like, if we could figure out a program that determines the PLL freq and such when you input your wanted frequency
[00:13] <NT7S> ah
[00:14] <LA3PNA2> basicaly I'd like to be able to use that in the beacon
[00:14] <LA3PNA2> but, you should get on the JT9 first
[00:14] <NT7S> the general strategy is find a PLL frequency that is the highest integer divisor for the output frequency
[00:15] <NT7S> then tweak the PLL frequency the PPB to correct for the ref osc error
[00:15] <NT7S> so the divider for the PLL synth will not be an integer divider, but in many cases the multisynth will be
[00:16] <LA3PNA2> ah, so you aim for the multisynt to be a integer
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_SSD1306_128X64 u8g(4, 5, 6, 7); // SW SPI Com: SCK = 4, MOSI = 5, CS = 6, A0 = 7 (new white HalTec OLED)
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE|U8G_I2C_OPT_DEV_0); // I2C / TWI
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_DEV_0|U8G_I2C_OPT_NO_ACK|U8G_I2C_OPT_FAST); // Fast I2C / TWI
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK); // Display which does not send AC
//U8GLIB_SSD1306_ADAFRUIT_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_SSD1306_ADAFRUIT_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are SCK = 13 and MOSI = 11)
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_SSD1306_128X32 u8g(10, 9); // HW SPI Co
/*
VFO program for Si5351
Using I2C LCD from:
http://www.amazon.com/Huhushop-TM-Serial-Display-Arduino/dp/B00JM88A94/
Si5351 library from NT7S.
Uses the updated version of the library (master).
Updated with the format_freq routine from Tom AK2B
Display library is avaible from:
https://code.google.com/p/u8glib/