Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

8-bit Timer/Counter0 operation modes.Part2

Previously we have revealed only two Timer/Counter0 modes: Normal and CTC. So far there are a couple more useful working modes Fast PWM and Phase Correct PWM. These modes are even more complicated comparing to what we know. But let’s not get scared of this and go through these modes step by step. First of all, let’s remember the basics of what PWM is and then do some practical stuff. Short intro to PWM Pulse Width Modulation (PWM) is a widely used technique for digitally controlling analog circuits. When talking analog circuits – these include lamps, motors, power converters and more. For instance, simple DC motor speed can be adjusted by varying a supply voltage. But imagine what circuitry would be to do this through the microcontroller. To make things simpler, a PWM method was introduced. This allows controlling analog circuits digitally without significant cost and complexity. Simply speaking PWM is a way of encoding analog signal levels. We know that microcontrollers are excellent in creating square waves. So the only thing has to be taken care of – switching… Continue reading