Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/27/03 06:18
Read: times


 
#49486 - RE: led\\\\\\\'s a port pin can drive
Responding to: ???'s previous message
Hallo Anil,

efficiency of LED is very different. There are types needing much current and produce only less bright light. And then there are very high efficient ones, which are very bright while needing only a minimum of current. Have a look at L-53ID from Kingbright. It's a red LED, 5mm, and diffuse optic, means, light can be seen from any directions. Wave length is 625nm. And now have a look at L-53HD from same series. Wave length is 700nm, also some red light, but efficiency is only one tenth of L-53ID!! So, when you use one of both, you can be very happy or unhappy!

Now, driving of LED with the help of mcu: Connect cathode of LED to port pin, anode of LED to one terminal of current limiting resistor (R) and the other terminal of R to Vcc (+5V). When port pin goes low, LED gets current via resistor and is turning-on. For calculating R assume following: Voltage drop accross turned-on LED is about 2V, but it depends of course on type, manufacturer and color. But for L-53ID type voltage drop accross LED is about 2V, when 10mA LED current is flowing.
Ok, Vcc - 2V = 3V, that's the voltage drop accross R, under the assumption, that Vol of mcu (output voltage for low level) is about 0V, which is only true for rather small currents in the range of some miliamperes.
Now we need to now, what the maximum allowed current into port pin of mcu is. With AT89C51 this is 10mA per port pin. But only, when only one port pin is used for driving a LED. If all 8 port pins of one port are used for driving a LED, means 8 LEDs are connected, then totally current is only 15mA. (This is true for port 1,2 and 3. Port 0 accepts some higher currents, have a look for yourself). So, when through each of the 8 LEDs the same current is flowing, only 15mA / 8 = 1.875mA may flow per LED. Using the following formula, we can calculate minimum values of current limiting resistor R:

Rminimum = 3V / Imaximum

So, when we drive only one LED, Rminimum is 3V / 10mA = 300R. In combination with L-53ID type this is very bright, perhaps too bright.
When we want to drive 8 LEDs connected to one 8bit-port, one LED for each port pin, then Rminimum is 3V / 1.875mA = 1k6. While with a low efficieny LED 1.875mA gives no bright light at all, high efficiency LED L-53ID gives a rather bright light, much enough for most tasks.

Up to now, we only discussed maximum rating of port pin of mcu. But what about maximum rating of LED? Well, most types, like L-53ID accept at least 10mA. Maximum current is about 20mA...30mA. It depends, of course. So, maximum rating of LED is higher than that of mcu, which means that your LED is never in danger.

Any further question?

Bye,
Kai

List of 26 messages in thread
TopicAuthorDate
led's a port pin can drive            01/01/70 00:00      
   RE: led\\\\\\\'s a port pin can drive            01/01/70 00:00      
      Datasheet of L-53IX            01/01/70 00:00      
   RE: led\'s a port pin can drive            01/01/70 00:00      
      He is a newbie!            01/01/70 00:00      
         RE: He is a newbie!            01/01/70 00:00      
   RE: led's a port pin can drive            01/01/70 00:00      
      RE: led's a port pin can drive            01/01/70 00:00      
         RE: led's a port pin can drive            01/01/70 00:00      
            RE: led's a port pin can drive            01/01/70 00:00      
         RE: led's a port pin can drive            01/01/70 00:00      
      RE: led\'s a port pin can drive            01/01/70 00:00      
         RE: led\'s a port pin can drive            01/01/70 00:00      
   RE: led's a port pin can drive            01/01/70 00:00      
      RE: led's a port pin can drive            01/01/70 00:00      
         RE: led's a port pin can drive            01/01/70 00:00      
            RE: led's a port pin can drive            01/01/70 00:00      
               RE: led's a port pin can drive            01/01/70 00:00      
               RE: led\'s a port pin can drive            01/01/70 00:00      
                  RE: led\'s a port pin can drive            01/01/70 00:00      
                  RE: led\\\'s a port pin can drive            01/01/70 00:00      
                     RE: led\\\'s a port pin can drive            01/01/70 00:00      
                        RE: led\\\\\\\'s a port pin can drive            01/01/70 00:00      
                           RE: led\\\\\\\'s a port pin can drive            01/01/70 00:00      
                  RE: led\'s a port pin can drive - Steve            01/01/70 00:00      
         RE: led's a port pin can drive            01/01/70 00:00      

Back to Subject List