18 changed files with 48 additions and 16 deletions
@ -1,3 +1,3 @@
@@ -1,3 +1,3 @@
|
||||
# button-led |
||||
# 01-button-led |
||||
|
||||
Just initialise, switch to 8MHz clock, and light up one of the two LEDs that are on MSP430G2 launchpad. While the button is pressed, switch the light to the other LED. |
||||
|
@ -1,13 +1,19 @@
@@ -1,13 +1,19 @@
|
||||
#!/bin/bash |
||||
set -euo pipefail |
||||
ARG1=${1:-} |
||||
|
||||
TARGET=button-led |
||||
TARGET=main |
||||
|
||||
function clean { rm -f $TARGET.hex $TARGET.p ; } |
||||
function clean { rm -f $TARGET.hex $TARGET.p $TARGET.lst ; } |
||||
|
||||
clean |
||||
|
||||
if test "$1" = "clean" ; then |
||||
if test "$ARG1" = "clean" ; then |
||||
exit 0 |
||||
fi |
||||
|
||||
asl $TARGET.asm && p2hex $TARGET.p -r 0x0000-0xffff |
||||
asl -r 2 -L $TARGET.asm && p2hex $TARGET.p -r 0x0000-0xffff |
||||
|
||||
if test $? -eq 0 -a "$ARG1" == "flash" ; then |
||||
mspdebug rf2500 "prog $TARGET.hex" |
||||
fi |
||||
|
@ -1,13 +1,19 @@
@@ -1,13 +1,19 @@
|
||||
#!/bin/bash |
||||
set -euo pipefail |
||||
ARG1=${1:-} |
||||
|
||||
TARGET=lpm3wait |
||||
TARGET=main |
||||
|
||||
function clean { rm -f $TARGET.hex $TARGET.p $TARGET.lst ; } |
||||
|
||||
clean |
||||
|
||||
if test "$1" = "clean" ; then |
||||
if test "$ARG1" = "clean" ; then |
||||
exit 0 |
||||
fi |
||||
|
||||
asl -L $TARGET.asm && p2hex $TARGET.p -r 0x0000-0xffff |
||||
asl -r 2 -L $TARGET.asm && p2hex $TARGET.p -r 0x0000-0xffff |
||||
|
||||
if test $? -eq 0 -a "$ARG1" == "flash" ; then |
||||
mspdebug rf2500 "prog $TARGET.hex" |
||||
fi |
||||
|
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
||||
# uart_lp |
||||
# 03-uart |
||||
|
||||
Implements basic "get byte" and "put byte" over UART (on P1.1 P1.2 pins; hardware). |
||||
|
||||
|
@ -1,3 +1,3 @@
@@ -1,3 +1,3 @@
|
||||
# uartstring |
||||
# 04-uartstring |
||||
|
||||
The only addition over `03-uart` is printing static strings over uart. |
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
# 05-morestring |
||||
|
||||
Still just messing with UART. |
||||
|
||||
`write.asm` has some more routines for printing strings and some numbers. |
@ -0,0 +1,6 @@
@@ -0,0 +1,6 @@
|
||||
# 06-i2c-bitbang |
||||
|
||||
New: `i2c.asm` - a bitbanged (software) I2C driver. |
||||
(Since USCI_A is used for UART, and USCI_B will be used for SPI.) |
||||
|
||||
A little testing code, assuming an EEPROM. |
Loading…
Reference in new issue