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 gio port source?

Other Parts Discussed in Thread: RM42L432

I want to test the gio port output in my code so I want to drive an LED with the gio port. How much current can a gio port pin source?

Thanks,

Dan

  • Dan,

    It depends on the GIO pin, the datasheet should have a table that says whether the pin is a 2mA, 4mA, 8mA buffer.
    This means that you can source or sink the rated current while keeping the output above VOH or below VOL.
    For an LED you don't need to get all the way down to VOL or all the way up to VOH so you can usually get more than the rated current.

    If you pick a low power LED, one that will shine with a few mA of current, you should be fine driving it with one of the GIO and a series resistor.
  • Page 21 of the "RM42L432 16- and 32-Bit RISC Flash Microcontroller " datasheet found here:

           http://www.ti.com/lit/ds/symlink/rm42l432.pdf

    appears to be saying that 2 mA is the limit on all GIO port pins. I don't know what "zero-dominant" means.

    So if the supply voltage of the GIO pin is 3.3 V and the forward voltage of the LED is around 2 V then it looks like I will need approximately a 500 Ohm resistor in series with the LED to avoid frying the GIO port. Sound right?


    Dan

  • Dan,

    Yes that is the correct table. You could configure the SPI and MibSPI1 pins as GIO to get some 4mA buffers if you wanted to, or on the next page there are a few 8mA/2mA buffers on SPI2 for even higher drive strength. But I see what you mean regarding the GIOA port proper.

    Zero dominant just means that the pins are designed such that if two pins are shorted, one is driven high while the other is driven low, the result will be a logic low. This can be useful if you're analyzing possible faults.

    Regarding your math, let's assume for the moment that you find an LED which will be bright enough with 2mA of current.
    And that you are using a 2mA buffer.

    Further let's assume you drive the LED from the low side, so the circuit is +3.3V - Resistor - LED ->|- GIO and the LED is lit when the GIO is set to drive '0', and off when the GIO is 3-stated.

    Then based on the datasheet, you have VOL @ IOL=IOLMAX specified for a maximum of 0.2VCCIO. This would be 0.66V.

    Now take 3.3V - 0.66V - 2V (LED) and you have 0.64V. 2mA through 330ohms gives you 0.64V.

    It's likely that you will have more than 2mA though as the buffer will likely be stronger than the spec which is worst case. But I doubt even if it's 2x (4mA) this will be an issue for the LED you pick, still you should check this.

    Also check the rated current at which the VF on the LED is spec'd ... is it 2V at 2mA? If not maybe you need to adjust the calculations.
  • Anthony

    Good point about the Vf of the LED at 2 mA. I will check.

    Dan