Hi,
I am trying to create 5 PWM pulses of 5 seconds with 40% duty cycle followed by an 8 minute delay and then another 5 PWM pulses and so on. I know that I can put a counter with a value of 5 and decrement until counter=0 and set the clock to 0x0000 to create the finite pulse train. for example:
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P1DIR |= 0x04; // P1.2 output
P1SEL |= 0x04; // P1.2 TA1 options
CCR0 = 1000; // PWM Period
CCTL0 = CCIE; // CCR0 interrupt enable
CCTL1 = OUTMOD_3; // CCR1 set/reset
CCR1 = 500; // CCR1 PWM duty cycle
TACTL = TASSEL_2 + MC_1; // SMCLK, up mode
_BIS_SR(GIE); // Enter w/interrupt
while(1);
}
// Timer A Counting overflow interrupt service routine
#pragma vector=TIMERA0_VECTOR
__interrupt void TimerA_ISR(void)
{
count--;
if (count ==0) TACTL = 0x0000;
}
but I was wondering what I could do to create the 8 minute delay.
Thanks!