This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How much current can an MSP430 I/O port pin source or sink ?

Other Parts Discussed in Thread: MSP430G2553, MSP430F5438A-EP

 

Hello Forum,

just need to know how much current can a port pin safely sink or source.


Regards,

Nischay

  • Should be specified in the data-sheet of the chip you are using. Probably in a table or section called "Outputs (Ports something something) – Electrical Characteristics"

     

  • Thanks OCY !

    there are so many tables and graphs in the datasheet and after you pin pointed it, i could get the info i needed. i am using value line series and as per the table it says 6mA give or take per pin or 48mA per port.

     

     

    6mA is less when compared to 20mA of AVR or PIC and some 8051's, but i guess that's the price one pays for "Ultra low Power"


    Regards,

    Nischay

  • Nischay,

    The F51x1 chips will have some 5-V Tolerant Digital Push/Pull I/Os With Up to 20-mA Drive Strength.

    --OCY

  • Hi Nischay,

    Basically what the quote of the datasheet you are taking is not saying that the maximum output current is 6 mA. Instead it is saying the relation between the drop of output voltage when you are sourcing current through I/O port. Since the I/O port of MSP430 is basically a CMOS push-pull type, sourcing current will result on drop of "high" output voltage, and sinking current will result on rising of "low" output voltage.

    In this you are sourcing 6 mA from an output port (and in total 48 mA on all ports - e.g. sourcing 6 mA on other 7 ports), you shall expect that your "high" output voltage to drop 0.3V. I believe it is no problem at all for the MSP430 to source 20 mA on its output port. But the question is whether you can live with the drop of the output voltage, and in this case if you see the diagrams on the datasheet, you shall expect voltage drop for example about 1.1V for soucing 20 mA at 25°C with Vcc=2.2V.

    I hope this answers your question.

     

    Regards,

     

  •  

    I guess i'll have to either parallel 2 port pins to supply 20mA or use a transistor . Thanks OCY and Ihend for your insights !


    Regards,

    Nischay

     

  • The newer MSPs have high-current ports which are specified for 15mA on a voltage drop of <0.6V . So 20mA with perhaps 1V drop are possible, which would be way enough for a red LED. Also, since the forward voltage of an LED is nto a fixed value but also dependent on the current, both functions (port output voltage and LED forward voltage) will meet somewhere, so it will settle on a stable point, maybe not at optimum current/emission ratio, but good enough for almsot every application. If it is about LED driving at all.
    The total current per port limit also affects only the voltage drop and is not maximum value. It might, however, cause some 'pumping' when the total load changes much.

    Mr.Nischay Kumar V said:
    I guess i'll have to either parallel 2 port pins to supply 20mA

    Bad idea. No two output drivers are 100% identical, so you will likely distribute an uneven load between them. Worst case you gain nothing, only on best case you halve the load per pin. But then, there is anotehr problem. Yif the two pins are form different ports, then you cannot switch them at the same time, causing them to work against each other for shor tperiods. Or you use two adjacent pins together, then you don't lower the total current per port..

    Mr.Nischay Kumar V said:
    or use a transistor

    That's the better approach if you really need that much current. We use the ULN2003. It provides transistors which each driver up to 500mA to common ground. The inputs can be directly driven by a port pin (high = on). Each transistor also has an included reverse diode for operating inductive loads.

  • I have the same question. Thak you for all the answers but I need a little clarification:

    MSP430G2553 can have 2 or 3 ports, depending on the package, right? A port can have a maximum of 8 pins?

    According to the datasheet, I can source or sink 6mA per pin. Is the maximum of 48mA per port or for the complete MSP430?

    In the first case (per port) I could savety source 6mA*14 pins = 84mA from a MSP430G2553IN20 (2 ports) or 6mA*22 pins = 132mA froma a MSP430G2553IPW28R (3 ports).

    In the second case (complete MSP430) I could only source 48mA for both packages.

  • Lacto said:
    According to the datasheet, I can source or sink 6mA per pin. Is the maximum of 48mA per port or for the complete MSP430?

    You can source/sink more than that. 6mA per pin and 48mA per port is to stay with in the 0.3v/VCC-0.3V output voltage. On higher currents low voltage rises further and high volrtage drops.
    If you directly drive an LED (no resistor) with ~1.7V from an MSP port pin with VCC=3V, this results in an LED current of ~35mA. Shortcut current on VCC=3V is >40mA. YOu can see the curves in teh datasheet for 2.2V and 3V VCC.

    Don't forget to calculate the total power dissipation (6mA sink current on 0.3V output voltage means 1.8mW power dissipation. *22 pins is 40mW total. Depending on package type, this can cause a significant rise on the operating temperature. Especially since the heat buildup concentrates on the port pin divers.
    (in the LED example above, it is 45mW for this single pin alone)

  • what is the max current for MSP430F5438A-EP and how I can calculated ?
  • You can find that information in the data-sheet. SLAS967A –JANUARY 2014–REVISED JANUARY 2014, page 44.
  • You can't know exactly calculate the maximum current into VCC.
    You may go and sum-up the CPU/RAM/FLASH operating current at amximum speed, the operating currents for the ADC reference and the ADC, but there's more. There is no info in the datasheet abotu the (admittedly tiny) current required for I/O, Timers etc. at maximum operating frequency/input toggle frequency.
    And of course there is no info about the maximum current you can draw by setting all outputs to fulld rive strength, high, and shorting them to GND. The port pin info is only giving typical values for a single pin and maximum currents for all pins while maintaining a certain output voltage (which is much less than when shorting the pin, or e.g. directly attaching an LED).
    However, if you exactly define your application conditions, you can calculate the estimated current consumption good enough so that the remaining uncertainties are negligible.

**Attention** This is a public forum