Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
If your -Ve reference is VSS (it usually is) and the bottom of the LED is connected to VSS, connect the analog pin to the junction of the LED and resistor.
The measurement taken by the PIC is of one voltage relative to the other so you have to measure across the LED using ground and the ADC input as the two connections.
A word of warning - make sure it is safe to connect the two grounds first. Although they are both called ground, a true connection to Earth may not be present in the power supply feeding the PIC or the LED so they could be at different voltages.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.