Calculadora de Tamanho de Pilha

Estime o tamanho de pilha necessário para aplicações embarcadas e sistemas operacionais.

V
V

Typically 0.4 V for standard I2C

mA

3 mA for standard, 20 mA for fast-mode+

pF
ns

1000 ns standard, 300 ns fast, 120 ns fast+

Minimum Resistance

967 Ω

Maximum Resistance1,770 Ω
Recommended Value1,368 Ω

Minimum Resistance vs Required Rise Time

Formula

## I2C Pull-Up Resistor Sizing I2C uses open-drain outputs with pull-up resistors. Too small a resistor exceeds sink current; too large slows the rise time. ### Formulas **R_min = (VCC - V_OL) / I_OL** (current limit) **R_max = t_rise / (0.8473 x C_bus)** (rise time limit) The 0.8473 factor comes from the RC time constant to reach 0.7 x VCC. Choose a standard value between R_min and R_max. Closer to R_min for faster speeds, closer to R_max for lower power.

Exemplo Resolvido

3.3 V supply, standard I2C (3 mA sink, 300 ns rise time), 200 pF bus.

  1. 01R_min: (3.3 - 0.4) / 0.003 = 967 ohms
  2. 02R_max: 300e-9 / (0.8473 x 200e-12) = 1770 ohms
  3. 03Recommended: (967 + 1770) / 2 = 1369 ohms
  4. 04Use nearest standard value: 1.2k or 1.5k ohms

Perguntas Frequentes

Can I use the same pull-ups for SDA and SCL?

Yes, both lines typically use the same pull-up value since they have similar capacitance and timing requirements.

What if the bus has too much capacitance?

Reduce capacitance by shortening traces, reduce the number of devices, or use an I2C bus buffer/repeater.

Do I need pull-ups on every I2C device?

No. Only one set of pull-ups per bus. Multiple pull-ups in parallel reduce the effective resistance, potentially too low.

Aprender

Ohm's Law Guide

Calculadoras Relacionadas