10 years, 5 months ago.

PWM Pin Out (p21) no longer works

My question has to do with the PWM PinOut of the LPC1768.

The board is new, but it does not work. I have used that pin as a simple on, off to control the base of a NPN 2N3904 transistor, after using the mbed for this application the pin (p21) no longer works. I know that applying over 3.3 volts into this pin can damage it, and also applying over 100mA could also damage it. Im not a 100% sure of the tolerance of the current on the pins.

I am wondering if there is anyway that i can use a debuger, or something to see if I damaged the processor on the board and what could have went wrong with it.

Thanks You

Grant D

1 Answer

10 years, 5 months ago.

Hi Grant,

1. Is your 3904 transistor alive? If yes, still hope for no problem.

2. I assume that you had a resistor between p21 and the base of 2n3904. If that so, I see no chance to burn the output.

3. Did you try your code on other outputs - p22 for example?

Regards,

I did not have a resistor in series with the base. what i do think might have happened that one of the positive wires that was coming off of my 5V regulator had touched another wire. The same code does work with other pins, just not on pin 21.

posted by Grant Dean 03 Feb 2014

Connecting a transistor base to a portpin without a series resistor has very likely fried the pin driver. The mbed tries to pull the pin to Vcc (3V3) whereas the base forward voltage will not let it go above 0.7V. That leads to a very high output current killing the driver. Obviously a wire that carries 5V while it touches a port output pin at low level will also burn out the driver.

posted by Wim Huiskamp 03 Feb 2014