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
g_LastCtrlKeyDownTime := 0 | |
g_AbortSendEsc := false | |
g_ControlRepeatDetected := false | |
*CapsLock:: | |
if (g_ControlRepeatDetected) | |
{ | |
return | |
} |
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
//****************************************************************************** | |
// MSP430F20xx Demo - Timer_A, PWM TA1-2, Up Mode, DCO SMCLK | |
// | |
// Description: This program generates one PWM output on P1.6 using | |
// Timer_A configured for up mode. The value in CCR0, 1000-1, defines the PWM | |
// period and the value in CCR1 the PWM duty cycles. | |
// Timer_A throws an interupt every time CCR1 is reached. | |
// CCR1 is incremented until it reaches CCR0, at which point it is decremented until it reaches one. | |
// This process is repeated producing a fluctuating duty cycle creating a PWM signal which can pulse an led. | |
// ACLK = na, SMCLK = MCLK = TACLK = default DCO |
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 |