8051 developing kit issue

Thread Starter

bobparihar

Joined Jul 31, 2014
93
i am using a 8051 developing kit and i am working LED dancing patterns.

iam using 8 LEDs each one is connected to a port's single pin. i got achieved what pattern i want.. but the problem is when pattern starts the LED connected to port 1.0 glows brighter always and the other 7 LED's glows at dim light

if i give high signal(1) to all 8 pins of the port then also other led are glows dim
where should be the problem is??
 

ErnieM

Joined Apr 24, 2011
8,377
Do you have a schematic?

Could you outline the program and what "pattern" means?

I'm no sure if you have 7 poor LEDs and one good one or 7 good ones and one extra bright.
 

shteii01

Joined Feb 19, 2010
4,644
Generally speaking, the brightness is controlled by current. So the bright led gets lots of current. The dim led gets some current, but not enough to be bright.

What you could do is adjust the amount of current that each led gets. This is done by using resistors. You put a resistor in series with led.
Example:
Connect uC pin to led +leg, connect led -leg to resistor, connect other leg of resistor to ground. You can change the resistances until you find combination that gives you consistent brightness across all 8 led.

Another thing you can do is change the uC setup. uC is not designed to source a lot of current. Lets say you have led that take 20 mA. You have eight of them. 8*20 mA=160 mA. Is your uC designed to source 160 mA at any given time? To work around this limitation you can sink current into uC. What you do is you use external power supply to provide led with current. So when the uC pin goes low (digital zero), the uC pin becomes ground and there is voltage drop that turns led On and current flow from external power supply to ground, this current flows through the led and determines the led brightness. Again, use resistor in series with led to control the amount of current.
Example:
External power supply/battery +pin connected to led +leg, led -leg connected to resistor, resistor other leg connected to uC pin. Probably need to connect external power supply -pin to ground that is common with uC ground.
 
Top