Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

Help me solve a problem with powering a LED

Status
Not open for further replies.

yasir23

Member level 1
Joined
Mar 2, 2011
Messages
35
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,565
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
 

dcoder

Newbie level 3
Joined
Apr 19, 2011
Messages
4
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,297
Re: led not shine proper

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

microlab

Full Member level 5
Joined
Mar 4, 2006
Messages
309
Helped
44
Reputation
88
Reaction score
35
Trophy points
1,308
Activity points
3,253
Re: led not shine proper

hi

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

ml
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,020
Reputation
4,156
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
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
 

thannara123

Advanced Member level 4
Joined
Jan 7, 2010
Messages
1,452
Helped
119
Reputation
238
Reaction score
110
Trophy points
1,353
Location
God's Own country India, India
Activity points
9,388
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
 

stanislavb

Advanced Member level 4
Joined
Jun 8, 2008
Messages
116
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
2,021
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!
 

qwertyuiop415263

Full Member level 4
Joined
Mar 26, 2010
Messages
232
Helped
50
Reputation
102
Reaction score
39
Trophy points
1,308
Location
Pakistan
Activity points
2,414
Re: led not shine proper

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

dayanpad

Advanced Member level 4
Joined
Mar 23, 2009
Messages
114
Helped
17
Reputation
34
Reaction score
17
Trophy points
1,298
Location
Colombo
Activity points
1,921
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
 

thannara123

Advanced Member level 4
Joined
Jan 7, 2010
Messages
1,452
Helped
119
Reputation
238
Reaction score
110
Trophy points
1,353
Location
God's Own country India, India
Activity points
9,388
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

yasir23

Member level 1
Joined
Mar 2, 2011
Messages
35
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,565
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.
 

yasir23

Member level 1
Joined
Mar 2, 2011
Messages
35
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,565
Re: led not shine proper

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

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,447
Helped
14,036
Reputation
28,325
Reaction score
12,686
Trophy points
1,393
Location
Bochum, Germany
Activity points
275,961
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.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top