Skip to content

Instantly share code, notes, and snippets.

@RickKimball
RickKimball / ASCIITable.cpp
Created May 27, 2011 16:19
Early version of ASCIITable.cpp
/*
ASCII table
Prints out byte values in all possible formats:
* as raw binary values
* as ASCII-encoded decimal, hex, octal, and binary values
For more on ASCII, see http://www.asciitable.com and http://en.wikipedia.org/wiki/ASCII
The circuit: No external hardware needed.
@RickKimball
RickKimball / Makefile
Created June 5, 2011 20:56
Test driver for SPI 23K256 serial ram device
#
# Makefile - testspi23k256
#
# this code is written for uniarch, however it will probably compile with CCS
#
# License: Do with this code what you want. However, don't blame
# me if you connect it to a heart pump and it stops. This source
# is provided as is with no warranties. It probably has bugs!!
# You have been warned!
#
@RickKimball
RickKimball / 5x7test.cpp
Created June 12, 2011 23:10
Simple 5x7 Led Matrix and numeric glyph test
/*
5x7test.cpp --- led matrix example
P1.0 - P1.4 .. low to high pins for columns
P2.0 - P2.6 .. low to high pins for rows
This example code is in the public domain.
*/
#define F_CPU 16000000
#include <msp430.h>
#include <stdint.h>
void spewSPI(const uint8_t n) {
static const uint8_t *spiStrTBL[] = {
"parm1",
"parm2",
"...",
"parm99"
};
@RickKimball
RickKimball / FR_EXP.c
Created July 1, 2011 04:08
MSP-EXP430FR5739 - Demo program modified for msp430-gcc uniarch
/*******************************************************************************
*
* FR_EXP.c
* User Experience Code for the MSP-EXP430FR5739
* C Functions File
*
* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
@RickKimball
RickKimball / AAAReadme.txt
Created September 16, 2011 00:25
gcc port of serial.asm
This is a gcc port of the code developed by Kevin Timmerman detailed here:
http://www.43oh.com/forum/viewtopic.php?f=10&t=1004
@RickKimball
RickKimball / usiserialtest.c
Created September 30, 2011 15:12
AAAReadme.txt
I came across this article a while back but hadn't had a chance to play with it.
http://www.msp430launchpad.com/2010/08/using-usi-as-uart.html
Armed with a Sparkfun FTDI FT232R breakout board, linux, msp430-gcc and an msp430g2452
I put the code below on it and was able to use putty connected @ 2000000 bps to send
data to my linux box. The bit duration is a blazing 500ns wow!
Hmm .. interesting
@RickKimball
RickKimball / makefile
Created October 19, 2011 04:58
gcc port of mspg2xx3_ta_01.asm for the msp430g2553 chip
#
# Makefile - for TI sample msp430g2xx3_ta_01.asm ported to msp430-gcc
#
# Author: Rick Kimball
# email: rick@kimballsoftware.com
# Version: 1.00 Initial version 10/19/2011
MCU=msp430g2553
CC=msp430-gcc
CXX=msp430-g++
@RickKimball
RickKimball / delay.S
Created November 22, 2011 01:16
MSP430 - delay_cycles() function with one cycle granularity written for msp430-as
;--------------------------------------------------------------------------------
; gcc port of this code: http://www.43oh.com/forum/viewtopic.php?p=7273#p7265
;--------------------------------------------------------------------------------
#include <msp430.h>
#define PC r0 /* gcc doesn't know about PC,SP,SR,CG1,CG2 */
#define ARG1 R15 /*C function arguments are passed in R15-R12 */
.file "delay.S"
@RickKimball
RickKimball / main.cpp
Created January 3, 2012 20:59
msp430 serial tool kit software/usci/timera/spi implementations
/**
* main.cpp - swserial/timerserial/usciserial Serial Asynch test driver.
*
* To test: use putty and connect to /dev/ttyACM0 at 9600 Baud
*
*/
#include <msp430.h>
#include <stdio.h>
#include "serial.h"