Skip to content

Instantly share code, notes, and snippets.

View kg4sgp's full-sized avatar

Jimmy Carter kg4sgp

  • Ohio among other places
View GitHub Profile
@kg4sgp
kg4sgp / gortzelfsk.c
Created July 3, 2013 05:55
a goertzel demodulator
// Goertzel Demodulator
//
// This program demodulates two tone FSK using the goertzel algorithm.
#include <stdio.h>
#include <math.h>
struct gConstants {
float f1norm;
float f2norm;
// Arduino RTTY Modulator
// Uses Fast PWM to produce ~8kHz 8bit audio
#include "baudot.h"
#include "pwmsine.h"
// Yeah, I really need to get rid of these globals.
// Thats next on the to-do list
unsigned int sampleRate = 31250;
@kg4sgp
kg4sgp / ask-demod.c
Created November 8, 2013 17:40
An amplitude shift keying (ASK) demodulator.
// An ASK Demodulator
// Simplicity first. Get it working, then improve!
// gcc ask-demod.c -o askdemod -lm -Wall
// Usage: ./ask-demod ask-msg.raw ask-msg.txt
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
@kg4sgp
kg4sgp / rcbpsk.c
Created June 6, 2014 21:59
A psk31 modulator in the works
/* This produces raised cosine bpsk*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
typedef struct {
long sample_rate;
long samples_per_symbol;
long max_amp;