The only options for a digital input are high or low (1 or 0). If you provide a voltage (on a TTL pin) above 0.15*VDD but below 2 V, then the PIC has to decide whether to read the input as high or low - but the PIC will always pick one or the other, high or low (and this may fluctuate back and forth). If you stay below 0.15VDD or above 2V, then you know what the PIC will do ... if you are between these, then you do not know what the PIC will pick (1 or 0) or whether it will stick with the selected value.
For your original logic shown in post #10, you would expect one of the LEDs to always be on (Skimask noted this for you). If you add the pause like he suggested, you would always expect to get the blinking you are getting because the pin is always read as high or low. With the pause added, the light goes on for a second, then off for a second and repeats as expected.
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Bookmarks