Skip to content

Instantly share code, notes, and snippets.

#include "msp430.h"
/*
BLDC motor driver ver1
P2.0 P2.1 P2.2 go through cycle
010
011
001
101
@aarmot
aarmot / pwm.c
Last active November 15, 2023 17:05
MSP430 PWM duty cycle drift demo
#include "msp430.h"
/*
Simple PWM generator using Timer A
Output P1.0, PWM period about 2 ms
Duty cycle changes gradually from 5% to 95%
Compiled with msp430-gcc
aarmot 2013-01-16
@aarmot
aarmot / Makefile
Last active December 11, 2015 01:39
Makefile for MSP430 assembler development in Linux. Inspiration taken from http://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=Example:Makefile
#
# Makefile for msp430 assembler
# Build single GNU asm source
#
# 'make' builds everything
# 'make dump' generates assembler dump of target
# 'make burn' flashes target into launchpad
# 'make clean' deletes everything except source files and Makefile
#
# You need to set TARGET and MCU for your project