- This topic has 2 replies, 3 voices, and was last updated 11 years, 3 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
|
Microcontroller › PIC › how to interface ldr with pic18f
can anyone help me with sufficient examples to interface a ldr with pic18f
Hi,
Select any ADC pin, do the required configurations. Connect the LDR and read the value from the ADC register.
LDR is a Light Dependent Resistor, so its value of Resistance change with the light that the LDR receive.
The more light the less resistance.
You must get a network of resistances for example in serial to convert the variation of resistance in a variation of voltage.
+VCC
|
|
Resistance (1K)
|
|
|
LDR
|
|
GROUND
As AJISH ALFRED have said before connect it at an Analog Input of the PIC and read the analogic value