Next: How to use a Up: Output Compare Interrupts Previous: Declaring the ISR's Interrupt

What is Pulse Width Modulation?

Pulse width modulation or PWM is a standard way by which a digital device can generate an analog voltage. This section discusses how you can use the MicroStamp11 to generate a PWM signal that can be interfaced to a simple capacitive circuit and thereby generate an analog voltage.

Let's define a signal as a function that maps time onto some real number. Consider, for instance, a two-terminal electronic device. The voltage over this device at time is denoted as . We can think of as mapping the time to the voltage .

We say a signal, is periodic if there exists a positive time such that for all . In other words, at any moment, , in time, the value of () will always be repeated at regular time intervals in the future. We refer to as the period of the signal. If is the smallest such positive number such that , then we refer to as the signal's fundamental period. If is the period of a periodic signal , we often refer to as being -periodic.

A pulse width modulated signal is a -periodic signal, , where there exists a time such that and such that

 (1)

for . We fer to the ration as the duty cycle of the signal. We usually represent the duty cycle as a percentage. Equation 1 defines the values that takes over a single period, . Since is -periodic, we know that the pattern characterized in equation 1 will repeat itself at regular intervals of duration . Figure 33 shows a pulse-width modulated signal whose duty cycle is .

Next: How to use a Up: Output Compare Interrupts Previous: Declaring the ISR's Interrupt
Bill Goodwine 2002-09-29