Version 4 SHEET 1 1048 680 WIRE 48 -64 -224 -64 WIRE 464 -64 48 -64 WIRE 800 -64 464 -64 WIRE 992 -64 800 -64 WIRE -224 -16 -224 -64 WIRE 576 -16 80 -16 WIRE 672 -16 576 -16 WIRE 800 -16 800 -64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include "galois_field.hh" | |
#if 0 | |
typedef CODE::GaloisField<8, 0b100011101, uint8_t> GF; | |
#else | |
typedef CODE::GaloisField<16, 0b10001000000001011, uint16_t> GF; | |
#endif | |
typedef typename GF::ValueType ValueType; | |
typedef typename GF::IndexType IndexType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
2 MHz clock goes to the PDM MEMS microphone and channel 0 of the logic analyzer. | |
The logic analyzer needs at least a 6 MHz sample rate or three times the clock rate. | |
Data signal from the microphone goes to channel 4 of the logic analyzer. | |
Tested using a MP34DT01-M with select connected to ground. | |
compile: | |
gcc -Ofast -Wall -o pdm pdm.c | |
stream to speakers: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CXXFLAGS = -std=c++11 -W -Wall -Ofast -fno-exceptions -fno-rtti -march=native -I../dsp | |
CXX = clang++ -stdlib=libc++ | |
#CXX = g++ | |
testbench: testbench.cc | |
$(CXX) $(CXXFLAGS) $< -o $@ | |
.PHONY: clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CXXFLAGS = -std=c++11 -W -Wall -Ofast -fno-exceptions -fno-rtti -march=native | |
CXX = clang++ -stdlib=libc++ | |
#CXX = g++ | |
.PHONY: all | |
all: testbench | |
test: testbench |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CXXFLAGS = -std=c++11 -W -Wall -Ofast -fno-exceptions -fno-rtti -march=native | |
CXX = clang++ -stdlib=libc++ | |
#CXX = g++ | |
.PHONY: all | |
all: testbench | |
test: testbench |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# FT232RL: | |
# baud=500000 idle=0 | |
baud=1000000 idle=0 | |
# baud=2000000 idle=0 | |
# baud=3000000 idle=0 | |
# CP210X: | |
# baud=500000 idle=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Multiplier-less fixed-point FM demodulation | |
Copyright 2020 Ahmet Inan <inan@aicodix.de> | |
*/ | |
#include <stdio.h> | |
int int_real(int x) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
sed ' | |
s/ /\//g; | |
s/A/ .-/g; | |
s/B/ -.../g; | |
s/C/ -.-./g; | |
s/D/ -../g; | |
s/E/ ./g; | |
s/F/ ..-./g; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.*.swp | |
testbench |
NewerOlder