This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Creating a PWM signal using MSP430G2553

Other Parts Discussed in Thread: MSP430G2553

Hi,

I need some advice on creating a PWM signal using MSP430G2553.
Our customer's application needs a PWM signal signal with carrier frequency 2Khz and
pulse frequency 4Hz as shown below.

I tried to develop a program as below (without intterupt routines), but I would like to know
if this is possible with a timer interrupt routine.
I tried with timer interrupt features but was unsuccesful..
Please let me know if there is any reference on creating above PWM signal with
timer interrupts.

Best Regards
Prad

  • Prad1 said:
    I tried to develop a program as below (without intterupt routines)

    Most probably you did not manage to get 4Hz modulation, right? - This is very hard task if you use delay().

    Msp430 can easily handle 2KHz interrupts, so you need to set 2KHz 50% PWM duty cycle timer, set CCR1 as PWM output and set timer overflow ISR. In timer overflow ISR you count interrupts so you switch CCR1 output on/off at desired 4Hz rate.

**Attention** This is a public forum