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
@NT7S
NT7S / ZeroUARTFlowControl.ino
Created December 15, 2017 21:11
Empyrean/Arduino Zero USB-UART Flow Control
uint8_t led = LED_BUILTIN;
void setup() {
SerialUSB.begin(57600);
pinMode(led, OUTPUT);
}
void loop() {
if(SerialUSB.rts()) {
digitalWrite(led, HIGH);
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NT7S
NT7S / DACZero.ino
Created January 18, 2017 16:18
DAC Sine Wave on Empyrean/Arduino Zero
uint8_t sine_wave[256] = {
0x80, 0x83, 0x86, 0x89, 0x8C, 0x90, 0x93, 0x96,
0x99, 0x9C, 0x9F, 0xA2, 0xA5, 0xA8, 0xAB, 0xAE,
0xB1, 0xB3, 0xB6, 0xB9, 0xBC, 0xBF, 0xC1, 0xC4,
0xC7, 0xC9, 0xCC, 0xCE, 0xD1, 0xD3, 0xD5, 0xD8,
0xDA, 0xDC, 0xDE, 0xE0, 0xE2, 0xE4, 0xE6, 0xE8,
0xEA, 0xEB, 0xED, 0xEF, 0xF0, 0xF1, 0xF3, 0xF4,
0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFA, 0xFB, 0xFC,
0xFD, 0xFD, 0xFE, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFE, 0xFE, 0xFD,
@NT7S
NT7S / Si5351_JT65.ino
Created September 30, 2015 15:10
Simple JT65 beacon for Arduino driving the Si5351
//
// Simple JT9 beacon for Arduino, with the Etherkit Si5351A Breakout
// Board, by Jason Milldrum NT7S.
//
// Transmit an abritrary message of up to 13 valid characters
// (a Type 6 message).
//
// Original code based on Feld Hell beacon for Arduino by Mark
// Vandewettering K6HX, adapted for the Si5351A by Robert
// Liesenfeld AK6L <ak6l@ak6l.org>. Timer setup
@NT7S
NT7S / Si5351_JT9.ino
Last active July 14, 2019 12:49
Simple JT9 beacon for Arduino driving the Si5351
//
// Simple JT9 beacon for Arduino, with the Etherkit Si5351A Breakout
// Board, by Jason Milldrum NT7S.
//
// Transmit an abritrary message of up to 13 valid characters
// (a Type 6 message).
//
// Original code based on Feld Hell beacon for Arduino by Mark
// Vandewettering K6HX, adapted for the Si5351A by Robert
// Liesenfeld AK6L <ak6l@ak6l.org>. Timer setup
@NT7S
NT7S / jt9_encode.c
Created September 28, 2015 00:57
JT9 Encoder in C
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <ctype.h>
uint8_t jt_code(char c)
{
/* Validate the input then return the proper integer code */
// Return 255 as an error code if the char is not allowed
@NT7S
NT7S / compile.txt
Last active September 29, 2015 17:52
JT65 Encoder in C
gcc jt65_encode.c encode_rs_int.c init_rs_int.c -o jt65_encode
@NT7S
NT7S / wspr_encode.c
Created September 25, 2015 02:29
My unoptimized implementation of the WSPR encoding process
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <ctype.h>
uint8_t wspr_code(char c)
{
/* Validate the input then return the proper integer code */
// Return 255 as an error code if the char is not allowed
[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
@NT7S
NT7S / homebrew-arduino-zero-setup.md
Created June 29, 2015 18:45
Homebrew Arduino Zero Tool Setup

Homebrew Arduino Zero Tool Setup

A guide for installing the tools necessary to build up a homebrew barebones Arduino Zero (based on the Atmel SAMD21G18A microcontroller) on a Linux PC. While this guide is written for a Debian-based distribution such as Linux Mint, it should be adaptable to other distributions fairly easily.

This guide also assumes that we will be using the ATMEL-ICE debugger to write the Arduino bootloader to the SAMD21G18A flash memory via the Cortex Debug Connector.

Install Arduino IDE

You'll need a recent version of the Arduino IDE which has support for the Arduino Zero in the Boards Manager. As of this writing, the latest stable version is 1.6.5, so be sure to use at least this version. Also as of this writing, the version of the Arduino IDE in the Linux Mint repositories is quite old, so don't use that one.