Exp 9
Exp 9
ALGORITHM:
1. Stop watch dog timer.
2. The port pin P1.6 connected to the green LED is configured as PWM output of Timer A
Configure port 1.0 as output.
3. The Timer A is configured with the required period (TA0CCR0) and the PWM duty cycle
(TA0CCR1) is set to first value in the predefined array.
4. The Timer is configured in Set/Reset output mode 7.
5. The Timer A control register is set to use SMCLK as clock source for up counting.
6. The global interrupt is enabled, and the processor is switched to low power mode 0
(LPM0)..
7. On interrupt by the Timer, the PWM duty cycle (TA0CCR1) is set to the next value from
the predefined array..
FLOWCHART
PROGRAM REQUIRED
#include <msp430.h>
int main(void)
PROCEDURE
RESULT
PRECAUTIONS