4
\$\begingroup\$

I'm using a TMS320F2812 and want to drive LEDs of some of the pins. I couldn't figure out what the safe levels of current were which could go in or come out of the IO pins from the datasheet. What is the safe range or how could I find out? What are normal values for these levels? Thanks.

\$\endgroup\$
  • 6
    \$\begingroup\$ This data is pretty much always in every datasheet. If you can't find it, look harder. In general for microcontrollers, you should expect to be able to drive or sink anywhere between 4 and 20mA. Many also have a separate limit per port, so don't try to pull the max off of every pin at once because you may over load the port. \$\endgroup\$ – Kellenjb Jul 3 '10 at 12:38
  • 3
    \$\begingroup\$ Theres also usually a limit for the entire IC that you should make sure not to exceed. \$\endgroup\$ – Mark Jul 3 '10 at 17:49
  • 1
    \$\begingroup\$ To sum up what kellen and Mark said. Read the datasheet. Honestly, there is no good replacement for actually reading the datasheet. As you read them you will get faster and learn what you can skip. But on many important decision points at work. I read the entire thing. It is funny when someone decided to leave major note that changes functionality 2/3 of the way through the document as a footer. \$\endgroup\$ – Kortuk Jul 5 '10 at 19:48
  • \$\begingroup\$ +1 to what Kortuk said. And just to add a pinch more - don't even neglect the application notes. There are frequently nuggets of useful info to be found there, too. \$\endgroup\$ – JustJeff Jul 6 '10 at 10:47
10
\$\begingroup\$

If you google TMS320F2812, the 2nd link is to a PDF file tms320f2812.pdf; if you look in this document at table 6.2, "Recommended Operating Conditions", you can find the numbers you need.

If you plan to connect the LED from the pin to ground (through a resistor, of course), so that a '1' output lights the LED, the number you want is Ioh, high-level output source current. Whereas if you plan to connect the LED instead to your +V supply, so '0' lights the LED, check Iol, low-level output sink current.

Looking at the numbers, you can see values from 4mA to 8mA, but you should also take note that these are in the 'MAX' column, which means these are values you should not exceed. Now, 4mA is not very much current, typical current to light an LED can be 10 or 20mA, to establish useful brightness. Were it me, I would employ some kind of driver between the '2812 and the LEDs, and try to keep the current in/out of the '2812 I/O pins well under 2mA.

\$\endgroup\$
7
\$\begingroup\$

See page 90 of the data sheet. It's 4 mA for some pins, 8 mA for others. You could drive high-brightness LEDs from them, but you might be better off using drivers.

\$\endgroup\$
  • 1
    \$\begingroup\$ The specs you want are 'Low-level output sink current' and 'High-level output source current'. \$\endgroup\$ – Michael Kohne Jul 3 '10 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.