How do you connect LDR sensors with a PIC ??

Thread Starter

zeeba

Joined Sep 26, 2010
22
Hi

How do you connect LDR sensors with a PIC ??

Im writting a code to read from both LDRs and show the reading on LCD and I want to see if it's working
but I dont know how to connect the LDRs with the PIC??​
 

tom66

Joined May 9, 2009
2,595
If your chip has them, you will need to use the comparators or an ADC input. Then put a resistor in series with an LDR to form a divider; connect the resistor to the PIC's Vdd and the LDR to ground. The centre tap between these points is proportional to light levels.
 
Top