atmel driving LEDs directly from microcontroller pins


Posted on Feb 5, 2014

LED will turn on when PIO goes low - acting like GND - and current will be taken from power supply not from PIO like first method. So do I must take care of maximum current of PIO although it just act like GND not like a power supply -like method 1 -. when I make PIO low dose it really connect to GND or something else Did youtry what an LED looks like at 8mA A modern LED may have a


atmel driving LEDs directly from microcontroller pins
Click here to download the full size of the above Circuit.

20mA maximum rating, but they are extremely bright when you just want to use them as a signaling indicator. jippie Jun 2 `13 at 11:58 (1) 8mA is plenty for most LEDs unless you need to see it in full sunlight (2) the second circuit shown has no current limiting resistor - 9V will blow the LED, the transistor, or both, and flatten the battery rather fast too! (3) the third circuit is not fundamentally different from the first. Brian Drummond Jun 2 `13 at 12:09 So do I must take care of maximum current of PIO although it just act like GND not like a power supply -like method 1 Yes, you do. The 1st and 3rd methods are equivalent in modern day microcontrollers. m. Alin Jun 2 `13 at 12:15 @yahyatawil because most microcontrollers can source AND sink the same amount of current on each GPIO. They are functionally the same thing. Only difference is your code, where turning on the led is setting the pin high (when it is the source) or low (when it acts like the ground). Passerby Jun 2 `13 at 19:13 The first and third methods you show are fine, assuming the resistor is sized so that the 8 mA maximum port pin current is not exceeded. The difference between these two methods is whether the low or high side drive transistor in the processor is in series with the LED. Sometimes the low side transistors are a little more beefy, which is why you see method three more than method 1. However, either method is fine as long as you take care...




Leave Comment

characters left:

Related Circuits

  • New Circuits

    .

     


    Popular Circuits

    Car Light Dimmer 12 Volt
    amplifier delay output relay
    Ice warning alarm 12V
    Rs232c-led-circuit
    Wideband Preamp Circuit
    UPS Circuit For Cordless Phones PCB
    AT89C51-12PI AT89C51 80C31 Microcontroller With 4K Bytes Flash Use AT89S51
    An SCR Based Burglar Alarm - Adding Extra Zones
    Simple Hybrid Audio Amplifier



    Top