Keyestudio Ks0428 Manual page 82

Table of Contents

Advertisement

www.keyestudio.com
PWM is a technology to obtain analog quantity through digital
method. Digital control forms a square wave, and the square wave
signal only has two states of turning on and off (that is, high or low
levels). By controlling the ratio of the duration of turning on and off,
a voltage varying from 0 to 5V can be simulated. The time turning
on(academically referred to as high level) is called pulse width, so
PWM is also called pulse width modulation.
Through the following five square waves, let's acknowledge more
about PWM.
In the above figure, the green line represents a period, and value of
analogWrite() corresponds to a percentage which is called Duty
Cycle as well. Duty cycle implies that high-level duration is divided
by low-level duration in a cycle. From top to bottom, the duty cycle
82

Advertisement

Table of Contents
loading

Table of Contents