Question about driving LEDs with a LaunchPad MSP430

Can I safely drive external LEDs directly from the I/O pins withe the MSP430 or should I use a transistor as the example from TI shows?

Nicknml:
Can I safely drive external LEDs directly from the I/O pins withe the MSP430 or should I use a transistor as the example from TI shows?

And you think posting this question on an Arduino forum is useful because?

Lefty

retrolefty:

Nicknml:
Can I safely drive external LEDs directly from the I/O pins withe the MSP430 or should I use a transistor as the example from TI shows?

And you think posting this question on an Arduino forum is useful because?

Lefty

Doing a search, I've saw that people have posted in the past on this forum related to the TI launchpad, and have gotten help/opinions so why not?

The Launchpad forum

http://forum.43oh.com/

I know it is not an Arduino question but allow me to answer:

I tried to ask the question in the aforementioned forum, but got only very vague answers.
On the official "shields" I have seen they connect LED's through 100-150 ohms resistors.
You could look in the datasheet for the MSP430, but ....

Thanks, I'll have to look more into it. I did see a Youtube video drive a small matrix of LEDs that appeared to be directly connected to the I/O pins.

Unless you KNOW FOR SURE that there is some kind of CURRENT LIMITING PRESENT... it is a poor idea to connect an LED to ANY controller port. In 30 years I've destroyed a bunch too.

Bob

http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

Use a resistor. The onboard led has a resistor too.

Oh, I misread the question. I thoughy it was about the max current you could afely draw from a pin.
On the launcpad forum I was told it was 10mA and even 20 mA.

BTW the onboard LED's draw 3,5 mA

Thanks for the responses, I should have made it clear that when I meant directly hooking up an LED, I would of course use a resistor.

However a lot of posters who "directly" connect an LED do not use a resistor. And then they complain that their Arduino has stopped working.

You should be able to draw 20 mA from one pin, and indeed a few of them, however there are maximums (maxima?) for the whole board, and certain groups of pins. eg. you should not draw more than 100 mA combined from D5 to D13. See the data sheet for the full details, plus I have a summary:

Just quoting from datasheet:

(1) The maximum total current, I (OHmax) and I (OLmax), for all outputs combined should not exceed ±48 mA to hold the maximum voltage drop specified.

I couldn't find any other specs that that, so I guess you can draw 48mA total from outputs 1.0 to 1.7, and another 48mA from 2.0 to 2.7

ematson5897:
Just quoting from datasheet:
I couldn't find any other specs that that, so I guess you can draw 48mA total from outputs 1.0 to 1.7, and another 48mA from 2.0 to 2.7

Try working it out. I find that 6 mA's is quite sufficient for an led so: Say Vo = [max] 3.3 and R =? Red led = 1.7Vfd. Then formula (Vo-Vfd)/I = (3.3-1.7)/0.006 = 267ohms. Use your nearest from your bits boxes. Then you cant be wrong. Careful though coloured led's differ, inst., amber and blue 3.3 to 3.6 Vfd so obviously they should not need a resistor at all.
Chrispsr

ChrisPSR:
Careful though coloured led's differ, inst., amber and blue 3.3 to 3.6 Vfd so obviously they should not need a resistor at all.
Chrispsr

I would dispute this statement. Yes, the Vf for some LEDs is different. But you really should limit the current. See Mike's excellent article (link posted in reply #6).

It's a popular thought that a microcontroller IO pin should be able to provide 10 to 20mA in order to "directly drive" an LED. With modern LEDs, I doubt that that is true: 6mA should be plenty. (at least for indicator use. YMMV if you wanted to do display multiplexing, maximum range IR RC, or LEDs with Vf larger than the processor supply voltage.)