Please help me with the code QQ
i am now suffering from the draining of my brain @@
How can i generate exactly a PWM signal with exactly "1 HZ"
here' s the already finished code:
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
DCOCTL = 0; // Select lowest DCOx and MODx
BCSCTL1 = CALBC1_8MHZ; // Set range
DCOCTL = CALDCO_8MHZ; // Set DCO step + modulation
/*** GPIO Set-Up ***/
P1DIR |= BIT2; // P1.2 set as output
P1SEL |= BIT2; // P1.2 selected Timer0_A Out1
/*** Timer0_A Set-Up ***/
TA0CCR0 |= 1000-1; // PWM Period
TA0CCTL1 |= OUTMOD_7; // TA1CCR1 output mode = set/Reset
TA0CCR1 |= 250-1;
TA0CTL |= TASSEL_2 + MC_1; // SMCLK, Up Mode (Counts to TA1CCR0)
but i don't how to generate the signal in "1HZ"
i am now using MSP430 G2553