How To Use Timer

How To Use Timer - How To Use Timer_A for PWM of Tones....

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
How To Use Timer_A for PWM of Tones. .. Pulse-width modulation, or PWM, provides an adequate substitute for a Digital-to-Analog (DAC) in many applications. By varying the width of pulses sent to a device (such as a speaker or LED), a purely digital signal can fabricate an acceptable analog wave form. The periodic timer Timer_A of the MSP430 can be configured in four different modes: stop, up, continuous, or up/down mode. At the end of a period (whether by reaching a maximum count or a compared value), Timer_A can be used to generate an interrupt on the Timer_A interrupt vector. The period of Timer_A, when configured to use SMCLK ( TASSEL_2 ) and set to "up" mode ( MC_1 ), allows periodic outputs to be produced completely automatic by hardware, without any software intervention. Thus, the MSP430 can be left undisturbed in low-power mode (LPM0) while hardware continues to produce outputs (ie, interrupts or other port outputs). In up mode, Timer_A register
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 02/08/2012.

Page1 / 2

How To Use Timer - How To Use Timer_A for PWM of Tones....

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online