Skip to content

Instantly share code, notes, and snippets.

View speters's full-sized avatar

Sönke J. Peters speters

View GitHub Profile
@speters
speters / Digital_Feed_2e.ino
Last active December 28, 2015 20:59
Elektronische Leitspindel für eine Drehmaschine mit dem Arduino Mega2560.Version 1a von http://www.chipmaker.ru/files/file/9787/ Urspungsthema in http://www.chipmaker.ru/topic/97701/
#include <avr/pgmspace.h>
// ***** LCD *****
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
char LCD_Row_1[17];
char LCD_Row_2[17];
@speters
speters / ihexcrc.py
Last active September 4, 2024 14:01
ihex crc recalculatorCalculates the checksums of lines in an ihex/intel hex file. Useful for patching a hex file.
#!/usr/bin/env python
#
# Intel HEX file CRC recalculator
# ihexcrc.py FILEWITHDAMAGEDCRC.HEX > NEWFILE.HEX
#
# See http://goodfet.sourceforge.net/dist/intelhex.py
# for a more elaborate version
#
from binascii import hexlify, unhexlify
import sys
@speters
speters / hd44780sim.serialwombat.c
Last active December 23, 2015 05:09
jbroadwell tried to simulate an hd44780 lcd in http://www.microchip.com/forums/m227487.aspx This is the indented code posted therein.
/*
* hd44780 simulator
* from
* http://www.microchip.com/forums/m227487-print.aspx
* 2/2007 by jbroadwell
*/
#define FIRST_NIBBLE 0
#define SECOND_NIBBLE 1
#define DDRAM_SIZE 128
typedef struct hd44780_n
@speters
speters / pramod.ranade.c
Last active December 31, 2021 02:44 — forked from tmpvar/pramod.ranade.c
See "Linear motion control without the math" by Pramod Ranade in http://www.nxtbook.com/nxtbooks/cmp/esd0409/index.php?startid=23 (Embedded System Design Vol 22, #4, April 2009) and http://picprog.strongedge.net/step_prof/step-profile.html
/*
step.c
Program to verify new algorithm for linear acceleration.
Author: Pramod Ranade <pramod.ranade@spjsystems.com>
*/
#include <stdio.h>
#if defined(_WIN32) || defined(_WIN64)
#include <io.h>
#endif