Skip to content

Instantly share code, notes, and snippets.

View mnemocron's full-sized avatar
:octocat:
bonk!

Simon Burkhardt mnemocron

:octocat:
bonk!
View GitHub Profile
@mnemocron
mnemocron / rpi-rgb-matrix-video.md
Created December 26, 2023 09:46
Commands to play youtube videos on 64x64 RGB LED matrix panel displays using Raspberry Pi Zero and Adafruit RGB matrix hat
@mnemocron
mnemocron / newsw.vhd
Created November 1, 2023 07:45
VHDL crosspoint switch with 4 inpout ports acting similarly like the tranif1(a,b,en) command in Verilog
library ieee;
use ieee.std_logic_1164.all;
entity newsw is
port(
d_n : inout std_logic;
d_s : inout std_logic;
d_e : inout std_logic;
d_w : inout std_logic;
@mnemocron
mnemocron / post_synth_notify.tcl
Created August 3, 2023 11:37
Xilinx to Telegram notification "Synthesis Complete" / "Implementation Complete"
#!/usr/bin/tclsh
cd /home/USER/Documents/vivado/scripts
exec ./telegram_synth_msg.sh
clear('all');
close('all');
clc();
fsdac = 12e9; % sampling rate of DAC system
fnco = 2e9; % carrier frequency
fout = 450e3; % I/Q baseband channel modulated frequency
tsim = 100000e-9; % simulation time
M = 16;
# -*- coding: utf-8 -*-
"""
Generates C Code Variable initializer for Sine Wave
#define N_LUT 100
int16_t Wave_LUT[N_LUT] = {0,116,231,345,458,569,678,784,887,987,1083,1174,1261,1343,1419,1490,1555,1614,1667,1713,1752,1784,1810,1828,1839,1842,1839,1828,1810,1784,1752,1713,1667,1614,1555,1490,1419,1343,1261,1174,1083,987,887,784,678,569,458,345,231,116,0,-116,-231,-345,-458,-569,-678,-784,-887,-987,-1083,-1174,-1261,-1343,-1419,-1490,-1555,-1614,-1667,-1713,-1752,-1784,-1810,-1828,-1839,-1842,-1839,-1828,-1810,-1784,-1752,-1713,-1667,-1614,-1555,-1490,-1419,-1343,-1261,-1174,-1083,-987,-887,-784,-678,-569,-458,-345,-231,-231};
"""
import numpy as np
@mnemocron
mnemocron / f303_dac_sine_main.c
Created April 3, 2021 09:48
0.1Hz AM Modulated onto 30 Hz sine-Wave from internal 12 Bit DAC on STM32f303k8 Nucleo-32
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
* All rights reserved.</center></h2>
@mnemocron
mnemocron / install-arm-gcc.sh
Created March 16, 2021 08:14
Installation Script for arm-none-eabi-gcc 7-2018-q2
#!/bin/bash
NAME=7-2018-q2
GCC_URL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2?revision=bc2c96c0-14b5-4bb4-9f18-bceb4050fee7?product=GNU%20Arm%20Embedded%20Toolchain,64-bit,,Linux,7-2018-q2-update
pushd .
cd ~
mkdir arm-gcc-toolchain
wget -O $HOME/arm-gcc-toolchain/gcc.tar.bz2 $GCC_URL
cd arm-gcc-toolchain
%******************************************************************************
% \details :
% \autor : Simon Burkhardt
% \file : adsb_track_smoothing_filter.m
% \date : 2021-01-04
% \version : 1.0
%******************************************************************************
clear all; close all; clc; format long;
% https://www.usna.edu/Users/oceano/pguth/md_help/html/approx_equivalents.htm
@mnemocron
mnemocron / restoring_division.c
Last active December 12, 2019 12:54
it does work now
#include <stdio.h>
#define BYTE_TO_BINARY_PATTERN "%c%c%c%c%c%c%c%c"
#define BYTE_TO_BINARY(byte) \
(byte & 0x80 ? '1' : '0'), \
(byte & 0x40 ? '1' : '0'), \
(byte & 0x20 ? '1' : '0'), \
(byte & 0x10 ? '1' : '0'), \
(byte & 0x08 ? '1' : '0'), \