Totem pole pull up resistor - Page 1
Forum section: electronics / beginners

author: Jr.Maxwell
author_rank: Contributor
timestamp: January 15, 2020, 09:06:06 am
content: Hello,I'm new to microcontrollers and trying to master how to deal with it's pins. I would like to know if there are any applications where I use pull up resistors in totem poles? And why is there even tri state- when will I ever want a pin in HI-Z state? I've googled it intensivaly, finding the use for pul up resistors in open drain outputs though.Thank you for your time

author: magic
author_rank: Super Contributor
timestamp: January 15, 2020, 09:30:04 am
content: Hi-Z is for pins which can be either input or output or inactive, depending on circumstances. Think, multiple devices sharing one communication bus such that only one is allowed to drive it at a time and some/any/all of the other devices may choose to receive.Normally you don't need pull resistors on a push/pull output, but if the output can go Hi-Z and you want the line to have a defined state, a resistor makes sense.

author: Jr.Maxwell
author_rank: Contributor
timestamp: January 15, 2020, 09:44:47 am
content: But why would I need to put the rest of the lines in HI-Z, why not just in LOW state?

author: mvs
author_rank: Frequent Contributor
timestamp: January 15, 2020, 09:46:21 am
content: MCU GPIOs are usually configured as Hi-Z inputs during power on and reset. It is done because it is safe for MCU, but it may not be safe for your circuit. You should use external pull up or pull down resistors to define the state in this case.

author: george.b
author_rank: Frequent Contributor
timestamp: January 15, 2020, 10:45:42 am
content: Quote from: Jr.Maxwell on January 15, 2020, 09:44:47 amThat depends on what you're doing. Imagine your microcontroller is on a bus where other devices are communicating. What happens if a device tries to transmit "1", but the microcontroller is pulling a "0"?If, instead, the microcontroller is set to tristate (hi-Z), then it won't interfere with whatever is happening on the bus.Tristate can also be used for charlieplexing:https://en.wikipedia.org/wiki/Charlieplexing

author: paulca
author_rank: Super Contributor
timestamp: January 15, 2020, 02:17:59 pm
content: A 0 on a pin can often mean it's directly connected to ground.If you read it, you get a LOW. Fine.If however you have another device sending a 1, or have anything with a non-zero voltage connected to that pin it could sink a very large amount of current through the MCU and burn it out.I believe Hi-Z means the pin is in a high impedance state, so even if you connect a 30Amp PSU to it will only draw microamps and the MCU survive.

author: David Hess
author_rank: Super Contributor
timestamp: January 19, 2020, 07:38:20 pm
content: A pull-up resistor is sometimes used with a bipolar (TTL) output to pull the output up beyond what a TTL output will. For instance this can be done to allow 5 volt TTL which only gets up to about 3.5 volts without help to drive 5 volt CMOS.Because historically NPN and NMOS devices were prefered, TTL and NMOS outputs were usually active low so a pull-up resistor on an inactive output results in a safe state. The alternative requires PNP or PMOS transistors which are lower performance.For tristate I/O pins, a pull-up or pull-down might be used to force the signal into a known state when not being driven. Some drivers have a "bus hold" function which applies the appropriate pull-up based on the output voltage so the output state will be weakly held.