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.

prolem in 8051 sinking current

Status
Not open for further replies.

Arunmag

Newbie level 6
Joined
Mar 4, 2011
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
india
Activity points
1,331
i am using at89s52. i programed so all ports are 0 so i connected led in it..
inside controller 0 means it is connected to ground directly.
but when i power the mcu i get only dim led light..
is there a cureent sink even in ground.
is there any way to customise our our micro controller ie/ no of ports, interupts etc
 

it is connected to ground directly

It is connected to ground via an open collector NPN transistor (the internal pull-up resistance is relatively high) with a limited internal Ib hence external Ic in order for its Vce be low (close to ground).
When I connect an LED to a port pin, I add a resistor in series to limit the LED current be not more than 10mA (less if there are many LEDs). For a higher current I use a buffer NPN, PNP, MOSFET or IC.
 

i have to use 2 port completly for led. using external transistr makes it complex..
i am running the led so fast via bit changing.. will that cause it..

how to get a custom mcu unit for our product etc
 

how fast are you changing the bit controling the LED? maybe it is too fast for the eye, try a slower change.
 

Sorry I thought the current is rather constant (DC). It is normal if the current is pulsed at a relaively high frequency (say above 100Hz), the LED brightness could be controlled by varying the duty cycle.
I am sorry I couldn't see where your problem is. Are your LEDs of power type and not the small standard ones?
 

i have to use 2 port completly for led. using external transistr makes it complex..
i am running the led so fast via bit changing.. will that cause it..

how to get a custom mcu unit for our product etc

whether one LED or many , 89s52 cannot drive LEDs directly from port. you have to use a buffer for driving LED(bjt or ic buffer).
 

the source and sinking current capability of 8051 ports makes that limitation.

I agree with you. The port cannot source an acceptable LED current (via the internal high pull-up resistance) if not at all (when no pull-up).
But I always use the port without any buffer to light LEDs (mainly for signalling) via limiting resistors (pin low). To save power, I let the LED current around 4mA (sometimes less) though up to 20mA is possible. But if there are more than one LED, the total current should not exceed a limit; like 80mA for AT89C2051.
I am talking about AT89C2051, AT89C51/52, AT89S51/52, AT89S8252/53 and SST89E58RDA which I have. I am not sure about other ICs ;)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top