I'm using a logical pin output (3.3V) to drive a NPN darlington transitor with the max current possible to minimize the fall and rise times. My microcontroler has a 20mA max output current per logical pin and the max transistor base current is 120mA.
My question is: without a resistor, what would happen? The micro would burn it up giving a (3.3-0.7)/0 current or it would simply stick with 20mA?
I have exaclty same doubt about driving a N-channel MOSFET. What would happen at the gate? With the gate capacitance discharged, it would be a short to the ground leading to big current? Is a resistor needed in this case?
Best Answer
It might, but I have often seen that figure in the "absolute maxima" section. You do know that that section is NOT what you use to design a working system? (You use that section it to design a surviving system, which is something very few of use have to do.)
You will be operating the uC outside its rated specs, so anything can happen. (It is your job to keep the current within a stated maximum. Unless the documentation very specifically says so, the uC doesn't have any current-limiting hardware.) A very realistic scenario is that it will work 100% OK on your workbench, but will fail intermittently and mysteriously in in small percentage of devices in the field, and maybe only at full moon.
Strictly speaking, you must use a current-limiting resistor. In practice, when using a small FET, don't bother. For a large (high current, high gate capacity) FET the resistor is needed, but not just for limiting the drive current: the switching of the load current will couple capacitively to the gate, and can give an 'kickback current' that does nasty things to your uC. In such a case, better use a dedicated gate driver chip.
And as Icy noted, do check that your FET operates OK with 3.3V on the gate. Yet another reason to use a gate driver chip.