Hello i want to know that can we drive 10mA led directly from port pin without need of transistor.If yes how much leds i can drive and what is the reliability of driving no. of leds.In MC9S08LG32 datasheet they have given each port pin current capacity of 25mA max.While interfacing some device with some current reating which current limit we have to consider whether port or total controller.
Ashish
it's better to use a transistor to avoid over voltage and permanent damage to your microcontroller.
_______
larry
Hello,
The 25mA limit that you refer is an "absolute maximum limit" above which permanent damage to the device may occur. This must never be exceeded under any cirmumstances.
Delving further into the datasheet shows that an individual output pin, when set to "high drive" state, can source or sink a current level of 10mA for 5 volt operation, and 3mA for 3 volt operation. For the 5 volt case, the output resistance at the pin will be 80 ohms maximum, but will typically have a much lower value. At 3 volts, the maximum output resistance is 270 ohms. It is essential to use a series current limiting resistor when driving a LED.
A further limitation is that the total source or sink current for all output pins may not exceed 100mA for 5 volt operation, and 60mA for 3 volt operation.
The reliability of the device will be affected by the operating die temperature, especially with elevated ambient temperatures. You may need to take into accout the duty cycle of LED operation (continuous or flashing), and how many LEDs may be simultaneously active. For a worst case situation, with 10mA LED current and 0.8 voltage drop at the output pin, each active LED would contribute 8mW to the total power dissipation of the device.
Regards,
Mac
Thank you ,according to your justification that total output capacity of microcontoller's output pins for 5V is 100mA so can i connect leds having current consumption less than 100mA With appropiate base register directly to GPIO without need of transistor ,having current less than 100mA.Plz reply soon
Hello Ashish,
Yes, it should be possible to connect, say 10 individual LEDs to MCU pins, provided the current through each LED does not exceed 10 mA. For all the pins used for LEDs, high drive strength mode needs to be selected.
Regards,
Mac
Hello Ashish,
ok but the overall maximum current consumption is 100mA if i connect 10 leds with 10mA current consumption total current consumption of MCU is 100mA keeping in mind the maximum current limit of individual port pin is max 25mA. In this case can i use another modules of MCU or external ckts.
I am not sure that I understand the intent of the question? Please clarify.
Regards,
Mac