Quote Originally Posted by g-hoot View Post
Hey there you go. Keeping it simple. Makes sense since you don't need to sense a gradual change in the light. Good job!
Gary
The 16F628a does not have a ADC. The difference between using the IO pin vs the comparator-module is the non-defined space between about 2,5 and 4 volts.

That means that within this area the PIC could percieve a high as a low and vv. This problem does not occur when using the comparator, so in the long run the comparator is better. I guess this is what skimast said aswell.

So let us come back to the comparator. The LDR is connected to RA2. Which fuses are needed to make RA2 connect to the (non-)inverting input, the other input to vref and to disable the other comparator? I am adressing all of you.