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
@mnemocron
mnemocron / multiplexed-display.ino
Created February 1, 2018 08:47
Common Anode 7-Segment Display version of Ben Eater's eeprom-programmer
/**
* This sketch is specifically for programming the EEPROM used in the 8-bit
* decimal display decoder described in https://youtu.be/dLh1n2dErzE
*
* Adapted the truth table for common anode 7-segment display
*/
#define SHIFT_DATA 2
#define SHIFT_CLK 3
#define SHIFT_LATCH 4
#define EEPROM_D0 5

CLI cheat sheet

My personal cheatsheet for using the Linux command line.


Windows

Linux Subsystem

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;
@mnemocron
mnemocron / STM32HAL_printf_uart.c
Created May 17, 2018 13:48
Redirect printf() to UART on STM32 microcontroller
/* USER CODE BEGIN Includes */
#include <stdio.h>
/* USER CODE BEGIN 0 */
# -*- 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>