PWM is a method for reducing the average power delivered by an electrical signal. The average voltage that feds the load is controlled by fastly switching on & off the power between supply and load. PWM is abusively named "''Analog Output''" but don't be fooled by this expression, PWM is not a True analog output (like DAC is).
+
PWM is a method for reducing the average power delivered by an electrical signal. The average voltage that feds the load is controlled by fastly switching on & off the power between supply and load.
+
+
{{ambox|text=PWM is abusively named "''Analog Output''" but don't be fooled by this expression, PWM is not a True analog output (like DAC is).}}
[[Fichier:ENG-CANSAT-FEATHER-PICO-pwm-01.png]]
[[Fichier:ENG-CANSAT-FEATHER-PICO-pwm-01.png]]
+
The average voltage of PWM signal depend on the duty cycle: Vavg = 3.3V * Th / P
−
The onboard LED is tied to the GPIO 25.
+
The onboard LED is tied to the GPIO 25. And that GPIO 25 can also be controled with PWM.
−
We can control its luminosity by setting the duty cycle of a PWM signal.
+
Thank to PWM we can control the effective luminosity of the LED by setting-up the duty cycle of the PWM signal.