Hi
using LDR minimum resistance 9k and max 22k can anyone suggest a value for a capacitor to be used to enable 16F877 to detect light????
(Im trying to set RA5 to +5V output and wait a short time for the capacitor to discharge (both plates at +5V). Then, change the pin to act as an input. As soon as this is done the capacitor will be free to charge up again through the resistor (Ie it brings the capacitor plate back down to 0 Volts). As soon as the pin is changed to an input, it suppose that i have to wait for a certain amount of time and if it hasn't charged by then assume that the resistance is high and therefore the light levels are low. )
I use Ldr connected in series with 10K parallel with capacitor of 100nF but nothing seems to happen !!!!
using LDR minimum resistance 9k and max 22k can anyone suggest a value for a capacitor to be used to enable 16F877 to detect light????
(Im trying to set RA5 to +5V output and wait a short time for the capacitor to discharge (both plates at +5V). Then, change the pin to act as an input. As soon as this is done the capacitor will be free to charge up again through the resistor (Ie it brings the capacitor plate back down to 0 Volts). As soon as the pin is changed to an input, it suppose that i have to wait for a certain amount of time and if it hasn't charged by then assume that the resistance is high and therefore the light levels are low. )
I use Ldr connected in series with 10K parallel with capacitor of 100nF but nothing seems to happen !!!!