I have noticed that my 8051 can barely light an LED. I tried connecting the LEDs ground directly without a current limiting resistor, yet it was very dim.
I am using the 8051 to drive other devices like LCD which works fine.
Is the 8051 current output really so low?
I did 'overheat' the 8051 once by accudentally connecting it in reverse polarity... But the device still works perfectly.
Its just lighting an LED. So....
1) Is the 8051 current output always so low?
2) What is the best way to light up an LED connected to the 8051 to full brightness?
I don't know about 8051, but use AVR, mostly the Tiny series. Ordinary LEDs are 20-30 mA, and I've had no trouble running them directly from the MCU. I often omit the series resistor when I know the LED will be flashing, and never constantly on.
Check your data sheet. Most MCUs seem to be 20-25 mA per output, and around 200 mA total for the chip.
You really need to download a data sheet for your specific 8051 MPU, it will specifiy the output high and low current ratings for all of the various output pins.
8051's are seriously dated, unless you're required to learn them on a professional level you should learn to program AVR's are the newer PIC models. They're significantly more robust.
8051's are seriously dated, unless you're required to learn them on a professional level you should learn to program AVR's are the newer PIC models. They're significantly more robust.
Well an AVR isn't a 'PIC model' at all, a PIC is a completely different device, which AVR attempted to steal market share from, even to the extent of using a three letter name!.
Either a PIC or an AVR would be a far better (and much more modern) solution, but presumably the OP is in India/Pakistan where they still seem to use the antique 8051's?.
I have noticed that my 8051 can barely light an LED. I tried connecting the LEDs ground directly without a current limiting resistor, yet it was very dim.
I am using the 8051 to drive other devices like LCD which works fine.
Is the 8051 current output really so low?
I did 'overheat' the 8051 once by accudentally connecting it in reverse polarity... But the device still works perfectly.
Its just lighting an LED. So....
1) Is the 8051 current output always so low?
2) What is the best way to light up an LED connected to the 8051 to full brightness?
Yes it is enough until 15mA.You are thinking about the source current but I'm telling about the sinking current.This old chip series good for sinking other than sourcing.
LED is a diode, not a bulb.
(5V - 2.0V)/220R = 13.6mA, not including saturation voltage of port pin.
Gayan Soyza said:
Yes it is enough until 15mA.You are thinking about the source current but I'm telling about the sinking current.This old chip series good for sinking other than sourcing.
The attachment is a simple driver circuit to drive the LED at 20ma with about 20ua input from chip. R1 control the max. current that the LED can draw; you can go up to about 500 ohms but the brightness LED will go down. In creasing R2 will lower the total current being draw from the chip but leaving more current for other outputs plus the brightness of the LED may go down.