ATmega168A pulse width modulation (PWM)

ProtoStack shows how to dim a LED using pulse width modulation and an ATmega168A: Dimming an incandescent bulb is easy. Simply adjust the current down using a potentiometer and you are done. Dimming an LED is another story entirely. When you reduce current through an LED there are unintended consequences like color shifts and dropouts. […]