Hello. Does someone knows if the current limit for non special ports (like led drivers or high current sink) are the ones specified below? These were copied from the MC68HC908JB16 datasheet.
Output high voltage (ILoad = –2.0 mA)
PTA0–PTA7, PTC0–PTC1, PTE0–PTE2
Output low voltage
(ILoad = 1.6 mA) All I/O pins(ILoad = 25 mA) PTD0–PTD1 in ILDD mode(I
Load = 10 mA) PTE3–PTE4 with USB is disabled
Is it correcto to say that a non special port can have a 1.6mA sink current at maximum and consequently it has to be connected to a pull-up resistor (for open-drain configuration) with a value higher than 3125 Ohms (VCC=5V)?
If the port specification don't specify a port is open drain as output, what other thing (electrically) can it be and how can I represent it whit equivalent components for simulation?
Thanks.
Solved! Go to Solution.
No, Output high voltage parameter, as parameter name says, specifies output voltage at specific pin current. Voh @ -2.0mA specified minimum is Vdd-0.8V. This means that logical '1' output at 2.0mA source current, in the worst case, is guaranteed to drop no more than 0.8V below Vdd. Typical drop at 2mA should be way smaller, but what is it specs don't say. Similar parameter is Vol. Output pin, outputing logical '0', at specific sink current, voltage should not rise above Vss more than specified max value.
Max pin current is specified in Absolute Maximum Ratings. It is +-25mA for all pins, excluding Vdd and Vss. Another parameter, that may limits you, is absolute max for Vdd/Vss. It is 100mA. That's less than 4 pins @ 25mA, less than 10 @ 10mA etc.
Thanks Kef for your answer, it was enlightening!. So, if I understood correctly, the following text found in the same datasheet:
"PTD5–PTC2 are software configurable to be 10mA sink pins for direct
LED connections. PTD1–PTD0 are software configurable to be 25mA
sink pins for direct infrared LED connections."
specifies that a LED can be conected directly to those pins with no current limiting resistor? That is to say, they act like current sources?
My line of thought is the following one:
If any pin can handle 25mA (in both directions, that's what "+ -" stands for, isn't it?) if I connect a LED driving circuit in series with the LED and any pin (with the right pin configuration = output in DDRx register and 0 in PTx register) then, what do they mean with "sink pins for direct LED connections"? It has to mean that there's no need to put a led driving circuit, isn´'t it?
And what about the lack of specs in the I/O ports section regarding open-drain? What else can them be? Or is it that all pins are open drain and only those without integrated pull-up are specified to be "open-drain"?
Thanks again.
OmarAl,
See POCR register description. PTD pins are special purpose pins, they can be configured either to be LED sinks or to be open drains. No source mode. In open drain mode, PTD pin current is not limited and can exceed absolute max of 25mA. In direct LED drive mode, current is limited by internal MCU circuits, 10mA - pins PTD2-PTD5, 25mA - PTD1,PTD0.
No, Output high voltage parameter, as parameter name says, specifies output voltage at specific pin current. Voh @ -2.0mA specified minimum is Vdd-0.8V. This means that logical '1' output at 2.0mA source current, in the worst case, is guaranteed to drop no more than 0.8V below Vdd. Typical drop at 2mA should be way smaller, but what is it specs don't say. Similar parameter is Vol. Output pin, outputing logical '0', at specific sink current, voltage should not rise above Vss more than specified max value.
Max pin current is specified in Absolute Maximum Ratings. It is +-25mA for all pins, excluding Vdd and Vss. Another parameter, that may limits you, is absolute max for Vdd/Vss. It is 100mA. That's less than 4 pins @ 25mA, less than 10 @ 10mA etc.