Hot answers tagged

31

Because the pull-up/down may not be active in some operating modes Pull-ups by their nature can cause a continuous current draw if the input is at 0V. This is undesirable in a low-power shutdown, so they may be disabled when the device is powered down. Other devices (especially microcontrollers) may be configurable for whether an input pulls up or down, ...


26

The main reason is that it allows for multiple endpoints to coexist on the same line and transmit. The outputs can only pull one way, so the effect is like a wired OR gate. If the outputs were push-pull, then the device that is asserting will fight against the ones that aren't. It would short the IO line and result in damage. Whereas, in an OD configuration, ...


25

For improved noise immunity. The internal pullups (or pulldowns) tend to be fairly weak in most devices, 20 Kohms->100 Kohms, and with wide variability. Depending on your environment, these may not be strong enough to prevent coupled noise from being seen as a valid logic level. This is especially true if that input goes off board or out of the box.


25

Many people leave resistors on unused pins in case they need to use those pins in the future; a pull-up (or down) resistor is a half-decent place to solder a wire and the presence of a resistor doesn't usually prevent the IO line still being used retrospectively. You should also read the fine print carefully: - Some applications may require it!!


18

Sometimes a device is designed to interface with a variety of different equipment that may use a range of logic-1 input voltage levels. If the outputting device always outputted a logic-1 of 5 volts then it might damage equipment connected to it that requires a logic-1 level of 3.3 volts. There's no risk of damage should the output be purely open-collector (...


17

Because I don't want to be caught with my pants down and need to spin a new board over something as silly as pull-up resistors if it turns out the internal pull-up isn't strong enough. Maybe on subsequent board revisions where I've verified it works, but definitely not the first one. Like decoupling caps.


14

External pull-up is put there if it is necessary for some reason, or simply because if it is not known beforehand if it is necesary or not. It is cheaper to have a place for the resistor, than to find out later you need a resistor and have no place for it, so you have to order new round of prototypes, like change PCB, order them, have components mounted, etc....


10

As modern chips use CMOS technology, so an input consists primarily of FET gates so virtually no current will flow in or out of a input. Therefore as current is virtually 0, there will be virtually no drop over any resistance. In practice there can be some leakage currents in the order of 1 to 10 microamperes, so if you use pull-ups with maximum of say 100k ...


10

(A pre-note: open-drain is the MOS version of bipolar open-collector. Functionally they are the same: they can only sink current to make a 'low' signal.) The very first logic families, RTL and DTL, were essentially open-collector. Fun fact: the Apollo Guidance Computer was built entirely from just one type of open-collector RTL IC: a dual 3-input NOR gate. ...


9

high resistance make the circuit slower and more succeptable to electromagnetic interfereance. If you circuits are slow and stateless it probably doesn't matter some stateful parts (like flip-flops) need a certain edge speed and could misbehave if the the edges are too slow.


8

That is correct, in the sense that it can be thought like that for the sake of simplicity, but in reality there is no resistance at all, as it's a CMOS input which has an extremely high input impedance. It can be thought as resistor so large in value that it's not even there, and theory no current flows in or out that pin. However, nothing is perfect, and ...


7

With the values shown, probably not. But ... simulate this circuit – Schematic created using CircuitLab Figure 1. The two options. In (a) R1 and R2 form a voltage divider. When BUF1 pulls low the voltage on the input to BUF2 will be \$ \frac {R2}{R1+R2}V+ \$. (b) avoids the problem.


7

This is related to a feature of the IIC protocol called clock stretching. If a peripheral device is unable to process data from the bus master in time (or prepare its output to be transmitted back to the master), it will continue hold the SCL line low (remember that it is open-drain, so there is no bus contention), until it is ready for transmission to ...


6

Setup your unused pins as outputs. You can choose if the output level is selected as high or low. But if you happen to enable the internal pullup resistor you want to set the output level to a high so that the output driver is not pulling current through the pullup resistor. Likewise if you happen to enable an internal pulldown resistor (if your MCU supports ...


6

The voltage you see on your bus line corresponds to a resistance of the low side switch of something above 200 ohm. A quick glance in the schematic of the ZedBoard shows, that some input pins have a 200 ohm series resistor, probably for ESD protection. I assume you used such a pin for your I2C communication, but since you did not tell us how exactly you ...


6

No, you should not expect an internal pull-up or pull-down "resistor" to behave like an external resistor. The internal device may actually be a very weak MOSFET or an implanted silicon resistor. The effective resistance is likely to vary with applied voltage. I would also expect a large temperature coefficient, and of course a very large variation ...


5

Can you give also typical values of pull-ups resistors and values of MCU resistance? 'Typical' MCU input resistance is >100MΩ, except for those that have built in pull ups or pull downs. But you shouldn't rely on a 'typical' value - read the datasheet to find the specs for your MCU (and remember that temperature can have a large effect). For external ...


4

A microcontroller input does not have a weak pull down as you have drawn it (R2). It has a high impedance in the form of a MOSFET gate which should be many megaOhms. There are other parasitic paths to the power and ground rails which would reduce that impedance but I don't know typical values, or even if there are typical values. Seems doubtful. So there is ...


4

The worst thing is to enable the digital input buffer, and leave the pin floating. Same applies if it is a tri-stated output. So you have the following options, which are just different, so they are not in any order of preference. Leave the IO pin disabled, or set it to analog mode. This will keep input buffer off, so pull up or pull down is not needed. Pin ...


4

No, the capacitors are on the power supply pins, and the capacitors will have no effect on the I2C bus pins. That's exactly how it is supposed to be done.


4

PCF8574 I/O already has pull-ups in it, in the form of a 'weak 100 µA current source'. If you try to pull the input down with 10 kΩ then the 100 μA internal pullup current flowing through your pull-down resistor will raise the open-circuit input voltage by 1 volt, reducing your noise margin. With a 10k pull-up you are improving the noise margin because your ...


4

The key is that an output can have more states than "high" and "low". There is also "weak high", "weak low", and "high resistance" (HI-Z). The transistor on the output can take on the states "low" (transistor on) and "high resistance" (transistor off). If you connect multiple outputs like ...


4

Apart from performance note the following: the converter has usually 10K pull-up resistors from both sides as in the following figure taken from https://www.hobbytronics.co.uk/mosfet-voltage-level-converter: you do not need a converter for each device since I2C is a bus (you may need to use more than one per signal depending on your power assessment):


3

Swap the resistor and switch Nothing is perfect. Your switch has resistance. Wanting "0V" is like saying you want something to be exactly one meter long.


3

Does the side of the serial resistor make any difference? Not normally with the values shown but, if in doubt and you are designing a PCB, leave room for both and fit one.


3

The big picture here is to not have unconnected pins that are configured as an input. This holds true not only for MCUs but for most devices with a digital input. Why? Digital inputs have a very high impedance which means they have a very high input resistance which can also be thought of as an antenna that picks up noise. So basically if you leave a digital ...


3

You are absolutely correct, a cable has parallel conductors with isolation in between, and that is a capacitor. For example CAT5 cable has about 52 pF of capacitance per meter, and the longer the wire is, the more there is capacitance between a data and ground wires, and it takes longer for the capacitance to charge and discharge, given a certain current ...


3

Why not make a tilt switch that you drop down. As the water rises the switch floats and as it is pivoted on one side it tilts and a ball in a tube rolls down to make the contact (or break the contact as preferred). That way all the contacts are sealed in a tube so no corrosion due to water will happen.


3

As shown in table 4.1, the default state gets output when the input side is unpowered. "Floating" means that the voltage has a random value, and moves around randomly. If an input pin has a pull-up or pull-down resistor, then its voltage would not be able to float. This device does not have a pull-up resistor; an open input can float, and it reads ...


3

No, it’s just people using different low-true conventions based on what they’re used to. I’ll show examples below. Overbars in schematics are problematic these days as they aren’t normal ASCII characters that one can deal with using a text editor. With the popularity of text-based hardware description languages like Verilog and VHDL, this becomes a major ...


Only top voted, non community-wiki answers of a minimum length are eligible