# Question regarding MCU, Voltages and Level Shifting

I have a board with a 3.3v MCU (C8051F850 from Silicon Labs in a QSOP-24 package) but whose pins are 5v tolerant. The board is running at 5v and all the relevant GPIO pins from Ports 0 & 1 have 10k external pull-up resistors (in a SIP package) on them. So my question is;

What voltage should i see on the board track on the other side of the pull-ups if i output a logical "1" i.e. 3.3v on a output pin configured as;

a) push-pull ?

b) open-drain ?

Note that i understand that since the board voltage is higher than the MCU's, the pins should be used "active low" but i would like know what happens in the reverse scenarios mentioned above.

• This is XY problem. Show exact circuit diagram. – Anonymous Dec 17 '18 at 9:02
• I disagree; this is NOT a "XY problem" and there is no circuit diagram to show. To restate it simply; There is a 10k resistor which has a 5v source on one side and connected to a 3.3v MCU pin on the other side. What happens when the MCU outputs 3.3v under push-pull and open-drain pin configurations? – RamanathanR Dec 17 '18 at 9:10
• (1) Why does the output voltage matter, and (2) why don't you measure it, especially if the voltage level actually does matter? – Dmitry Grigoryev Dec 17 '18 at 10:15

This is a standard open drain output. The diodes protect against ESD by redirecting ESD to ground or the power supply.

In your case the microcontroller runs on 3V3 but the output pin is 5V tolerant, so the top ESD diode will not be a simple diode which would conduct when Vcc=3.3V and Vout=5V. Rather it will be some form of FET-based protection which will only conduct when the output voltage exceeds some margin above 5V.

When the FET is ON (output logic 0), it will short the output to GND, so output voltage will be close to 0V. Nitpicking, if we have a 10k pullup to 5V and FET RdsON is 20 ohms, then we have a voltage divider and output voltage would be about 10mV. Close enough.

When the FET is OFF (output logic 1), voltage will be determined by the rest of the circuit. In your case, with a pullup to +5V, it will be +5V. Without a pullup, it would be "whatever depending on random amounts of leakage current" which is not desirable.

On a non-5V tolerant pin, the top ESD diode would conduct and short the pullup current to the +3V3 supply, so the output voltage would be 3.3V + one diode drop. The same scenario would occur on your 5V tolerant pin if you wired the pullup to a higher voltage than +5V.