The purpose of this group is to foster exchange of information on the Texas Instruments MSP430 family of microcontrollers and related tools. Everyone welcome, all levels of familiarity/expertise.
Timer A for PWM - Muhammad Adi Insani - Aug 5 9:11:48 2009
I am using MSP430F4270,
and i would like to have PWM signal on TA0 pin. it can produce PWM signal,
but the problem is if I change CCR0 or CCR1 value. the duty cycle or the period won't
change.
can someone give me suggestion please..
below is the code
#include
void main(void)
{
WDTCTL = WDTPW +WDTHOLD; // Stop WDT
P1DIR |= 0x01; // P1.0 output
P1SEL |= 0x01; // P1.0 TA0 option
CCR0 = 512-1; // PWM Period
CCTL0 = OUTMOD_7; // CCR1 reset/set
CCR1 = 384; // CCR1 PWM duty cycle
TACTL = TASSEL_1 + MC_1; // ACLK, up mode
}
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )