Other Parts Discussed in Thread: MSP430G2553, MSP430G2452
Hello, to start off I am having trouble understanding the Timer modules availaible on the MSP430G2553 (Launchpad). In my user's guide, it mentions Timer B but apparently that's not on the chip.
Aside from that, I am trying to generate PWM from a timer. I am using the first timer for a real time clock, and I want to use another Timer for PWM. Here's what I have so far:
//configure Auxilary clock to run at 1 MHz BCSCTL1 |= DIVA_0; BCSCTL3 |= XCAP_3; // Timer A1 PWM TA1CCTL0 = OUTMOD_7; // TACCR1 reset/set TA1CTL = TASSEL_2 + MC_1; // SMCLK, upmode TA1CCR0 = 1000-1; // PWM Period TA1CCR1 = 100; // TACCR1 PWM Duty Cycle P2DIR |= BIT1; P2SEL |= BIT1;
I actually got that PWM snippet from somewhere online. However it's not working at all. What could be the issue?