Skip to content

Instantly share code, notes, and snippets.

View kenemon's full-sized avatar

Ken Bueltmann kenemon

View GitHub Profile
@PhirePhly
PhirePhly / timerA.c
Created February 20, 2011 20:18
Experiment with both CC registers for Timer A on the MSP430G2231
#include <msp430g2211.h>
#define LED_0 BIT0
#define LED_1 BIT6
#define LED_OUT P1OUT
#define LED_DIR P1DIR
#include <msp430x20x3.h>
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P1DIR |= BIT6; // Set P1.6 to output direction
P1SEL |= BIT6; // P1.6 to TA0.1
CCR0 = 1000-1; // PWM Period