I need to interface an LDR with a microcontroller.
While searching for some circuit ideas on the internet, I came across two different ideas:
One was using a voltage divider circuit with another resistor and input that into the ADC port of a microcontroller.
Another was to couple the LDR to ground via small capacitor and connect the other end directly to a microcontroller. (I am not sure how this works?)
For example:
Image source: Measuring Light on a PIC 16F62x from Robot Builder
The PIC 16F62X series is a pin-compatible upgrade to the old F84 offering lots of extra internal goodies such as timers, a USART and a couple of comparators. There are no analogue to digital converters (ADC) as such but it is a simple job to use a comparator, a timer and a few lines of software to make one.
Which one is more accurate?