I have Pbp. I use 16F877. I want to use analog ports A and E. get output from B channels. (for example channel 0). I know how to connect the channels and other circuit elements. All I want to learn is how can I get the 0 and 1 from analog channels. As far as I understand A/D conversion gives too much bits, I only want to take 0 and 1. For example when the LDR voltage is above 3 I want to light the led when it is below turn off the led. i think the program is so simple, please send me one, i need this for my term project