Jump to content


  • Content Count

  • Joined

  • Last visited

About DomTech809

  • Rank
    Noob Class

Contact Methods

  • Website URL

Profile Information

  • Location
  1. JAJA, had to search what RTFM is, learned something new. So do I have to use different timers to set different duty cycles for PWM??
  2. Yeah because you are familiar with it, not when you are a noob like me with MSP :!!!: . But now that I somewhat understand how it works and have it setup so that I can use P2.1 and P2.2 as PWM output at 50Hz to control two servos, the only thing I need to do now is figure out how to set separate duty cycles for each PWM output. Both ports are on TA1.1, so right now when I change TA1CCR1 to set the duty cycle both outputs will have the same output PW, can they be set individually or do I have to use different port? For example I would like P2.1 to output a PW of 2ms and P2.2 to output a PW of 1ms.
  3. Thanks guys, I understand now. Got it working with help of a scope and your comments. That's kind of weird how TI does it, but I guess it is what is.
  4. Where is the datasheet does it say it can't be used as PWM?? I can't find that reference. I know it can be done I just can't figure out how to do it. I think my problem is with TA1CCTL1 = OUTMOD_7; as someone else pointed out in the ti forum.
  5. Hello, I'm trying to enable PWM of P2.0 of my MSP430 LaunchPad and have not been able to do so yet. The Chip I'm using is the msp430g2553. The code works fine with P1.6, but I have not been successful on getting the same PWM settings to output on P2.0. Any help will be appreciate. #include <msp430g2553.h> void main(void){ WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer BCSCTL1 = CALBC1_8MHZ; //Set DCO Range, ACLK DIV/1, XTS Low-frequency mode. DCOCTL = CALDCO_8MHZ; //Set DCO Step and Modulation BCSCTL3 |= LFXT1S_0 + XCAP_3; //LFXT1 = 32768-Hz crystal on LFXT1, ~12.5 pF BCSCTL2 |= SELM_0 + DIVM_0 + DIVS_3; //MCLK = DCO, SMCLK = MCLK/8 P1DIR |= BIT6; P2DIR |= BIT0; P1SEL |= BIT6; P2SEL |= BIT0; TA0CCR0 = 5000; TA1CCR0 = 5000; TA0CCR1 = 500; TA1CCR1 = 500; TA0CCTL1 = OUTMOD_7; TA1CCTL1 = OUTMOD_7; TA1CTL = TASSEL_2 + MC_1 + ID_2; TA0CTL = TASSEL_2 + MC_1 + ID_2; _BIS_SR(LPM0_bits); // Enter Low power mode 0 }
  • Create New...