Skip to content

Instantly share code, notes, and snippets.

@RickKimball
RickKimball / 910.c
Created June 29, 2012 19:48
msp430 based avr910 AVR ISP programmer
/*
*
* File : 910.c
* Author : Minifloat
* Project: Launchprog
* Version: 1.2 on 10 May 2012
*
*/
#include <msp430.h>
#ifndef FABOOH
#include <Streaming.h>
#include "ringbuffer_simple.h"
#define sizeofs(a) sizeof((a))/sizeof((a[0]))
#else
serial_usart_isr_t<115200, CPU::frequency, TX1_PIN, RX1_PIN> Serial1;
USART_IRQHandler(1, Serial1)
#endif
/*
ws2812x_dma_timer.ino - DMA/TIMER based ws281x/neopixel routines
Generate a ws281x compatible pulse train using PWM timer and DMA
provided duty cycle data. Connect pin PA1 to the DIN of a ws281x
led strip and watch the animation.
2018-07-07 - RRK simplified using RGB values, compute T0/T1 based on F_CPU
2018-07-05 - RRK reworked to avoid interrupt
*/
@RickKimball
RickKimball / blink.cpp
Last active April 21, 2018 00:25
fabooh - blink with DWT/ITM debug
@RickKimball
RickKimball / print_t.h
Last active February 12, 2018 16:03
zero_print - print_base<> zero filled print number using c++ template example
/*
* zero_print - print_base<> template example
*/
#include "print_t.h"
void setup() {
Serial.begin(115200);
delay(2000);
}
@RickKimball
RickKimball / startup_gcc.c diff
Created December 22, 2012 20:49
Energia - Timer based blink
$ diff linux/work/hardware/lm4f/cores/lm4f/startup_gcc.c ../hardware/lm4f/cores/lm4f/startup_gcc.c
71d70
< __attribute__((weak)) extern void Timer0IntHandler(void) {}
123c122
< Timer0IntHandler, // Timer 0 subtimer A
---
> IntDefaultHandler, // Timer 0 subtimer A
$
@RickKimball
RickKimball / Makefile
Last active January 28, 2018 22:07
stm32duino Makefile for adding custom boards.
# STM32F1/Makefile - provide a way to use a custom boards.txt
#
#
.phony: all checkout clean
all: boards.txt
checkout:
git checkout boards.txt
boards.txt:
@RickKimball
RickKimball / Makefile
Last active January 1, 2018 16:28
MSP430 - skeleton standalone assembler project for msp430-elf-gcc and mspdebug
#
# Makefile - blinkasm.elf
#
# Author: Rick Kimball
# email: rick@kimballsoftware.com
# Version: 1.04 Initial version 10/21/2011
#
APP = blinkasm
MCU ?= msp430g2553
@RickKimball
RickKimball / 50baud.c
Last active December 30, 2017 22:36
msp430 example showing timer used to periodically send 50 baud async data
/*
* 50baud.c - example of sending 50 baud async serial output on P1.1
* code uses timer sourced from VLO and sleeps between reports.
*
* P1.0 - optionally output ACLK for measurement of VLO
* P1.1 - 50 baud async serial output
* P1.6 - indicator led, on during serial transmission
*
* TIMER0 - continuous up mode sourced with ACLK (VLO)
* TIMER0_A0 - 50 baud ISR enabled and disable for 8-N-1 transmission
@RickKimball
RickKimball / nco.vhd
Last active October 19, 2017 23:39
NCO - Arbitrary Frequency Generator VHDL
-------------------------------------------------------------------------
-- nco.vhd - Numerically Controlled Oscillator
--
-- Author: Rick Kimball rick@kimballsoftware.com
-- Date: 10/19/2017
-- Version: 3
--
-- vim: set ts=3 sw=3 expandtab
--