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.

Help me solve a problem with powering a LED

Status
Not open for further replies.

yasir23

Member level 1
Joined
Mar 2, 2011
Messages
33
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Activity points
1,548
when the output port of p2.0 is open. its output is 5v. but when i connect led. so it doesnt light very well either i connect resistor 220 ohm or not . and 2.0 v occor at output. why its not giving light very well. and when my led connect directly to power supply with resistor. so its light very well.
plz reply.
engr.yasir2011@gmail.com
 

Re: led not shine proper

Perhaps, pin was configured to input with internal pull-up resistor, not output.
Refer to datasheet.
 

Re: led not shine proper

hi

is the led is getting current from the Vcc or from the port pin?

ml
 

Re: led not shine proper

First of all when you describe a problem you should also define the mcu you are using.

The typical behavior of any mcu output is that the output voltage drops when you source current (or rises when you sink current), the more current you use the more the output voltage changes.
See the typical output drop of high level for AVR, PIC and MCP430

avr.jpgpic.jpgmsp430fg4618_current.jpeg

Alex
 
Re: led not shine proper

where it you connect wit port 2.0 wit respect ?
i think it may dry or the connection it might be connected properly (may be soldering problem )
other wise the p2.0 or the output may be a noisy pules .please put the code as well as the diagram if you can .
It may help full to clear the problem for the eda experts
 

Re: led not shine proper

Hi,
First check input/output - it should be output.
Brightness depend from current: you can find it in LED data sheet. You should calculate accordant resistor for it(LED forward voltage you can find in data sheet also). Of course you should check if MCU pin is capable to drive this current (data sheet of MCU)
Good luck!
 

Re: led not shine proper

use capacitor with your power source and use 7805 regulator to give 5v to mcu.
 

Re: led not shine proper

Dear yasir,
This is a small problem but your thread does not have enough information
1 Number of micro controller
2 just draw and publish the way you connected the LED or full cct
3 your code
Thanks
 

Re: led not shine proper

dear ,Yasir ,
Just reverse the LED connection it will clear am sure .
It means please reverse the led's connection from your connection .
 
  • Like
Reactions: yasir23

    V

    Points: 2
    Helpful Answer Positive Rating

    yasir23

    Points: 2
    Helpful Answer Positive Rating
org 0h
mov p3,#00 ; also make output. even its output by default.
mov a,#01
over: rr a
mov p3,a
mov r3,#150
h3: mov r2,#150
h2: mov r1,#255
h1: djnz r1,h1
djnz r2,h2
djnz r3,h3
sjmp over
end

i m using 8052. i connect p3 then resistor 220 ohm in series with led and then led -ve terminal to gnd.so it glow very low.and other p3 termainal is which i make it open. so it give 5v and those is connected so it give 1.8v.
 

Re: led not shine proper

thanks. my problem get solve.by reverse the led connection . thanks.
 

my problem get solve.by reverse the led connection
As expectable. You would have used this solution from the start, if reading the 8051 datasheet thoroughly.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top