Content originally posted in LPCWare by Wouter on Mon Apr 21 09:51:00 MST 2014
Hi Inspire,
Both case A and case B are no problem.
As long pin's current stays below IO[sub]H[/sub]/IO[sub]L[/sub] (=4mA) and the pin's voltage below 5V (while the LPC is powered, otherwise 3.3V), it's OK.
Also in case B the voltage on the pin is not expected to rise a lot above 3V3, probably just a few mV maximum (since the LPC is driving the pin with low-impedance, and the 5V is connected through a 10K resistor).
To avoid the 0.17mA in case B, you can also configure the pin as Open-Drain. Of course the output voltage on that pin when driven high would be 5V in that case.
Regards,
Wouter