Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 21948

PWM output on P1.7

$
0
0

Hi,

      I have a MSP430G2553. I am trying to program it to output the PWM on P1.7. I try to code it like this : 

P1DIR |= BIT7;                                                     // P1.7 set as output
P1SEL |= BIT7;

/*** Timer0_A Set-Up ***/
TA0CCR0 |= 5485;                                        // PWM Period 200Hz
TA0CCTL1 |= OUTMOD_7;                         // TA0CCR1 output mode = reset/set
TA0CCR1 |= 3900;                                        // TA0CCR1 PWM duty cycle
TA0CTL |= TASSEL_2 + MC_1;                  // SMCLK, Up Mode (Counts to TA0CCR0)

But it doesnt give me any outputs. 

I am new to this. 

Thank you


Viewing all articles
Browse latest Browse all 21948

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>