MSP430 timer PWM 8Mhz
Mon Sep 26 2022 15:42:15 GMT+0000 (Coordinated Universal Time)
Saved by
@saekyuu
/*** Clocks and GPIO set-up would be here and are in the downloadable
example, but have not been shown to reduce the code size ***/
/*** GPIO Set-Up ***/
P1DIR |= BIT2;
P1SEL |= BIT2;
P2DIR |= BIT1;
P2SEL |= BIT1;
/*** Timer0_A Set-Up ***/
TA0CCR0 |= 200 - 1;
TA0CCTL1 |= OUTMOD_7;
TA0CCR1 |= 100;
TA0CTL |= TASSEL_2 + MC_1;
/*** Timer1_A Set-Up ***/
TA1CCR0 |= 1000 - 1;
TA1CCTL1 |= OUTMOD_7;
TA1CCR1 |= 500;
TA1CTL |= TASSEL_2 + MC_1;
content_copyCOPY
https://coder-tronics.com/msp430-timer-pwm-tutorial/
Comments