# Tag Info

39

1) What happens when the I2C pullups are omitted? There will be no communication on the I2C bus. At all. The MCU will not be able to generate the I2C start condition. The MCU will not be able to transmit the I2C address. Wondering why it worked for 3 months? Read on. 2) The lack of pullups is likely to damage any of those two ICs in my board? Probably ...

35

The article seems quite confusing: the text and figures don't match. I'll try to present here the same three schematics as there, with hopefully a more matching explanation. Assume U1 is your microcontroller, and P1 is an I/O pin configured as input. (It could be any logic gate, really.) Other connections to U1 are not that relevant so are not pictured, but ...

32

The answer depends on what you want the "default" configuration to be. For example, say you have a down-stream N-channel MOSFET, and you want it default off. Then you would use a pull-down resistor to ensure this behavior if the input becomes high impedance. simulate this circuit – Schematic created using CircuitLab On the other hand, suppose you ...

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, ...

30

There are a few possible reasons, such as Needing the resistor to be present during power-up, as the microcontroller will not yet have started executing. Needing a more precise resistance than the internal resistor. Internal pull-up/-down resistors have very wide tolerances. Needing a resistance larger or smaller than that provided internally. For example, ...

30

Electrically it makes sense because ground is the one common connection to all devices on a IIC bus. That's a lot less of a restriction than forcing power to be the common connection to all IIC devices, as would be required if the lines were driven high and floated low via pulldowns. Note that IIC devices don't all need to be powered from the same net or ...

29

tl;dr because there are real-world issues that prevent us from setting I/O standards and other specifications willy-nilly. If EE were so simple a lot of us wouldn't have jobs or thesis projects. To start, there are tons of practical reasons why we don't just increase I/O voltage. It's not as simple as some guy crossing out 3.3v on a piece of paper and ...

28

At 1 MHz and 50 mm (2 inches) you don't need terminations. You have ordinary on-board digital signals, and not even very fast ones. You don't need pullups or pulldowns on SPI lines. When used, SPI lines are always explicitly driven both directions. However, it can be good to put a pulldown (or pullup) on the MISO line. That is because this line is only ...

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!!

24

In the good old days, TTL drivers were much better at pulling a signal down than pulling it up. Therefore, protocols like I2C, but also interrupt lines, reset, and others, were all implemented using a pull-up with distributed pull-down.

23

I absolutely agree with @DirkBruere - you should read the datasheet. I read the datasheet and it says nothing Let's see if that is true. First, the very first picture in it has EN pin connected to Vin. This tells you that for "always ON" applications you don't need the resistor at all. Second, in the Absolute Maximum Ratings you can see that ...

22

The library you use, and the libraries it depends on (Wire), enable the internal pull-ups of the ATMega. These are weak pull-ups, and in normal use, supplement any external pull-ups (two resistors in parallel). Due to the relatively high resistance of 20k to 70k, they do not cause much if any issues with external ones in use. What happens when the I2C ...

19

If the signal doesn't already have a specification, use whichever one makes the most sense to you. It is your choice to make an input active-high or active-low. If it's buttons, make sure to use a debounce circuit (or do it in software). simulate this circuit – Schematic created using CircuitLab

18

The question is why isn't a pull-up resistor drawn as shown by the circuit on the right? Because it won't work - the supply is directly connected to the input pin and no matter what you do with the switch, if it has a resistor where you show it to be, it won't change the fact that the input pin is wired directly to the supply.

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

Yes... You can... It's a proven feature. If you see pin structure in STM32 Reference manual, you can see that it has required components -- If this satisfies your requirements, then, you can do away with external components. Edit Remember that at Power up, Pins will be tristated. If it does not hamper your application, it is good! That's why it's good ...

17

In general, it is perfectly fine to use the internal pull-up or pull-down resistors. Disadvantage is that you can forget to enable it from software, that can cause a little headache. The external pull-ups will always be there. So do not forget to enable the internal ones and save a lot of PCB area by reducing component number. The STM32's internal pull-up ...

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.

16

Look closer... There is only a single pair of pull-up resistors for each bus. Your diagram shows four separate I2C buses. The multiplexer and the repeater isolates the segments. Thus, since you only have one bus, you only need two resistors: One for SCL and one for SDA.

15

If your circuit design is such that you can choose - in other words you aren't required by the rest of the circuit to use a pull up or pull down - then you should consider safety and security in the case of failure. If your microcontroller fails, or just that output fails, the pull up or pull down will be in effect. How will this change the operation of ...

15

While I think this would work, I'd not see the immediate advantage of having disconnectedable pullups; I'm sure you have a good reason! Be a bit careful: A diode in reverse bias is a capacitor. At let's say 3.3V of your bus, with the jumper open, that means that for example if SDA is low and SCL gets high, then one of the diodes is in forward, one in ...

14

To expand on Jon's answer a little: Yes, it is all to do with which MOSFETs you want to use. N-channel MOSFETs are much better for switching logic than P-channel because: They generally have a much lower on resistance ($R_{DSON}$) They switch on and off faster So for an open-drain configuration (which is what I2C is) it's much cheaper and easier to ...

14

Unless the pullup and pulldown resistors are active during reset (I suspect they aren't, but I'm not familiar with STM32 devices), there is an undefined pin state at reset. This is one major reason to use external pullup or pulldown resistors.

14

It's easier to use ground as a common reference among subsystems that might have varying supply voltages. If you use PNP transistors to pull up to a supply voltage, all subsystems would have to be connected to the same supply.

14

This is a case of interface between logic families (from LS-TTL -to- CMOS). Although both are powered from +5v supply, logic levels differ: Logic low output for the 74LS93 is compatible with logic low input for CMOS 4002. No problem here. Logic high output of 74LS93 is marginal compared to logic high input for CMOS 4002. This is a matter of noise immunity: ...

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....

13

A pull-up or pull-down resistor "holds" the input at a specific level when there is no input to the pin, instead of allowing the input to float. When you consider Figure 1 in your drawing, having the switch open provides no electrical connection to the pin, thus allowing stray interference, internal leakages etc to influence the voltage of the input pin. ...

13

Honest truth: What you're trying to do is easier implemented just by using a microcontroller with enough pins. It's probably even cheaper than an Attiny85. Who knows. But: If you really must, you can do various things to get more output out of a single line: Buy an IO expander that uses the 1-Wire (pseudo)standard, and implement a 1-Wire transmitter on the ...

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