PIC16F877 and voltage measurment on LED

Status
Not open for further replies.

tomas

Member level 1
Joined
Dec 16, 2012
Messages
41
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,553
How can I measure voltage which is on LED with microcontroller? How should I connect analog pin?
 

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.

Brian.
 
Reactions: tomas

    tomas

    Points: 2
    Helpful Answer Positive Rating
Last edited:
Reactions: tomas

    tomas

    Points: 2
    Helpful Answer Positive Rating
LED and resistor is from other circuit, which is seperate from microcontroller. Should I make this GND common?
 

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.

Brian.
 
Reactions: tomas

    tomas

    Points: 2
    Helpful Answer Positive Rating
thank you all for your time and answers Im done with my project
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…