For now, and for this first part, we're going to see how to
control the brightness of a LED. If simply connected to a pin,
it will light at its max brightness, because the pin is "just"
high (5V). Now, if we connect this LED on a PWM pin, maybe we'll
be able to control the brightness: as previously said, PWM can
be used to produce variable voltages. If we provide half the
value (2.5V), maybe the LED will be half its brightness (though
I guess the relation between voltage and brightness is not
linear...). Half the value of 5V. How to do this ? Simply
configure the duty cycle to be 50% high, 50% low. But we also
said PWM is just about switching a pin on/off. That is, either
the pin will be 0V, or 5V. So how will we be able to produce
2.5V ? Technically speaking, we won't be able to produce a real
2.5V, but if PWM frequency is high enough, then, on the average,
and from the LED's context, it's as though the pin outputs 2.5V.
Enough theory, let's get our hands dirty. Connecting a LED to a
PWM pin on a 16f88 is qu