![]() Although it is possible to supply a varying power from a microcontroller (using a Digital to Analogue Converter (DAC)) this usually requires an additional chip. ![]() Microcontrollers are digital, meaning they only have two ‘power’ states, on and off. To control the brightness of an LED you can vary the power which is sent to the LED, for example using a potentiometer (variable resistor), the more power the LED receives the brighter it is, the less power it receives the dimmer it is. You can watch the full video on LBRY: Introduction This tutorial is primarily designed as a video tutorial. ![]() Some microcontrollers include PWM modules which perform all of the hard work for you however this article focuses on the more universal (and scalable) technique of using interrupts. ![]() This article will focus on some of the more specific details of the PIC18F range of microcontrollers however the techniques and principles are the same for all other microcontroller products. In this tutorial we will cover the basic principles behind PWM and how it can be used for LED brightness control including fading out LEDs rather than just turning them on and off. It has many applications, although one of the most popular amongst hobbyists is controlling the brightness of LEDs. Pulse Width Modulation or PWM is a term you hear a lot if you are interested in controlling power output using a microcontroller.
0 Comments
Leave a Reply. |