Continue to Site

Welcome to EDAboard.com

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.

how to connect an led using a pull up resistor

Status
Not open for further replies.

K2DGR8

Junior Member level 3
Junior Member level 3
Joined
Sep 23, 2011
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,503
Dear friends,

I want to connect an led to microcontroller using a pull up resistor..

But, when I give '0' to output port, leds will keep glowing because of the pull up...

Pls help me with the problem
 

Since you haven't shown your circuit diagram, I assume we're talking about a pin that is open-drain (or open-collector) and you want to use that to light a LED. In that case, have the LED connected between output pin and VDD/VCC. Send 0 to the pin to turn the LED on and send 1 to the pin to turn the LED off. You don't need the pull-up resistor. Of course you'll need to have a current-limiting resistor in series with the LED. However, you can not turn the LED on with a 1 if the LED is connected between the output pin and VDD/VCC. To turn the LED on with a 1, the LED must be connected between the output pin and ground.

This should make things clearer:

4858974200_1353737433.png


Hope this helps.
Tahmid.
 
  • Like
Reactions: K2DGR8

    K2DGR8

    Points: 2
    Helpful Answer Positive Rating
Dear friends,
I am trying to glow an LED from port 1 of 89C52 microcontroller.
I have arranged the components as shown in the ckt diagram in the last reply by Tahmid.

But, I am unable to glow the LED.
I also measured the voltage across the pin to which LED was connected (P1_5).
It comes out to be +Vcc.

But, the voltage across LED and resistor(470E) is 0V.

Can anyone help me with the solution?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top