This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <msp430g2211.h> | |
#define LED_0 BIT0 | |
#define LED_1 BIT6 | |
#define LED_OUT P1OUT | |
#define LED_DIR P1DIR | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |