Running I2C at the standard 100 kHz is forgiving. You can get away with a lot — sloppy pull-up values, long traces, even a bit of stray capacitance. Crank it up to 400 kHz (Fast Mode), and suddenly the margins get tight. Rise times matter. Pull-up values matter. Bus capacitance matters.
I've debugged too many I2C Fast Mode failures that traced back to incorrectly sized pull-ups or bus layouts that worked fine at 100 kHz but fell apart at 400 kHz. Let's walk through what changes and how to get it right.
What Changes at 400 kHz?
The I2C specification (NXP/Philips UM10204, rev 7) defines several speed modes:
| Mode | Max Speed | Max Bus Capacitance | Rise Time (max) |
|---|---|---|---|
| Standard Mode | 100 kHz | 400 pF | 1000 ns |
| Fast Mode | 400 kHz | 400 pF | 300 ns |
| Fast Mode Plus | 1 MHz | 550 pF | 120 ns |
| High-Speed Mode | 3.4 MHz | 400 pF | 40 ns |
Going from Standard to Fast Mode, the maximum allowed rise time drops from 1000 ns to 300 ns. That's the core challenge — you need the bus to charge up fast enough to meet that 300 ns target, while also pulling enough current to meet the minimum Vih threshold.
The Pull-Up Resistor Calculation
The I2C bus uses open-drain drivers. The pull-up resistors are responsible for pulling the bus high when no device is pulling it low. The RC time constant formed by the pull-up resistor and total bus capacitance determines the rise time.
The formula:
Rmax = tr / (0.8473 × Cb)
Where:
- Rmax = maximum pull-up resistance (Ω)
- tr = required rise time (s) — 300 ns for Fast Mode
- Cb = total bus capacitance (F)
And for the minimum resistance (current limit):
Rmin = (VDD - VOL_max) / IOL
Where:
- VDD = supply voltage (V)
- VOL_max = maximum low-level output voltage (V) — typically 0.4V at 3 mA for Fast Mode
- IOL = maximum sink current per I2C device (A) — typically 3 mA for Fast Mode
Worked Example
Let's design pull-ups for a 3.3V I2C Fast Mode bus with 150 pF total capacitance.
Maximum resistance (rise time constraint):
Rmax = 300ns / (0.8473 × 150pF)
Rmax = 300 × 10⁻⁹ / (0.8473 × 150 × 10⁻¹²)
Rmax = 300 × 10⁻⁹ / 127.1 × 10⁻¹²
Rmax = 2,360 Ω = 2.36 kΩ
Minimum resistance (current limit):
Rmin = (3.3V - 0.4V) / 3mA
Rmin = 2.9V / 0.003A
Rmin = 967 Ω
Valid range: 967 Ω to 2,360 Ω
A standard 1.5 kΩ resistor falls right in the middle of this range. That's a safe, conservative choice. At 1.5 kΩ, the rise time would be:
tr = 0.8473 × R × C = 0.8473 × 1500 × 150 × 10⁻¹² = 191 ns
191 ns is well within the 300 ns limit. You have margin.
What If Bus Capacitance Is Higher?
Same bus, but now with 350 pF (more devices, longer traces):
Rmax = 300ns / (0.8473 × 350pF) = 1,012 Ω
Rmin = 967 Ω
Now the valid range is 967 Ω to 1,012 Ω. That's almost no margin. A 1.0 kΩ resistor technically works but you're right at the edge. This is where people get into trouble.
Estimating Bus Capacitance
You can't size pull-ups without knowing your bus capacitance. Here's how to estimate it:
| Source | Typical Capacitance |
|---|---|
| I2C device pin (each) | 5–10 pF |
| PCB trace (1 oz, 4 mil width) | ~1.5 pF/cm |
| PCB trace (1 oz, 8 mil width) | ~2.5 pF/cm |
| Connector pin pair | 2–5 pF |
| Cable (per meter, twisted pair) | ~50 pF/m |
Example estimate for a typical board:
- 4 I2C devices × 7 pF each = 28 pF
- 15 cm of trace × 2 pF/cm = 30 pF
- 1 connector = 3 pF
- Stray/parasitic = 10 pF
- Total: ~71 pF
That's very manageable. But add a 1-meter cable to an off-board sensor, and suddenly you're at 71 + 50 = 121 pF. Getting warmer. Two meters of cable? 171 pF. Now you need to be more careful.
Measure it if you can. Put an LCR meter on your actual PCB (with devices installed, bus idle) and measure SDA to GND and SCL to GND. Real measurements beat estimates every time.
Common 400 kHz Pitfalls
1. Using 4.7 kΩ Pull-Ups from a 100 kHz Design
This is the #1 mistake. A 4.7 kΩ pull-up with 200 pF bus capacitance gives a rise time of:
tr = 0.8473 × 4700 × 200 × 10⁻¹² = 796 ns
That's nearly 3x the 300 ns limit. The bus might still work — many devices are more tolerant than the spec requires — but you're operating out of spec and reliability will suffer. Some devices will NAK randomly, especially across temperature.
Fix: Drop to 1.0–2.2 kΩ for 400 kHz operation.
2. Too Many Devices on the Bus
Each device adds pin capacitance. The I2C spec limits Fast Mode bus capacitance to 400 pF. With modern devices typically having 7–10 pF of pin capacitance each, you can fit maybe 30-40 devices before hitting the limit — in theory.
In practice, with trace capacitance, connectors, and the occasional cable, you'll run into trouble with 15-20 devices. If you need more, use an I2C bus switch (like TCA9548A) to split the bus into segments.
3. Ignore Resistive Pull-Ups → Use Active Pull-Ups Instead
For buses with high capacitance or long cables, resistive pull-ups might not cut it. Active pull-up circuits (sometimes called rise-time accelerators) can help. Some devices have built-in active pull-ups — the NXP PCA9617 (I2C bus buffer/repeater) is one example.
Alternatively, the LTC4311 I2C accelerators actively drive the bus high during transitions, dramatically improving rise times without changing the pull-up values.
4. Mixed Voltage Devices Without Level Shifters
If some devices are on 3.3V and others on 1.8V, you need level shifters. A simple N-channel MOSFET bidirectional level shifter (like the BSS138 circuit) works, but it adds capacitance (~5-10 pF per direction). Account for this in your total bus capacitance.
5. Routing I2C Through Noisy Areas
I2C is not differential. It's susceptible to noise coupling. At 400 kHz, the edges are faster and more susceptible. Don't route I2C traces near high-frequency switching nodes (switching regulator outputs, motor drive traces, clock outputs).
Keep SDA and SCL close together (same differential impedance consideration) and route them over a solid ground plane.
Pull-Up Resistor Selection Table
Here's a practical reference for common configurations:
| Bus Capacitance | 3.3V VDD R Range | Recommended | 1.8V VDD R Range | Recommended |
|---|---|---|---|---|
| 50 pF | 967 Ω – 7.07 kΩ | 4.3 kΩ | 467 Ω – 7.07 kΩ | 4.3 kΩ |
| 100 pF | 967 Ω – 3.54 kΩ | 2.2 kΩ | 467 Ω – 3.54 kΩ | 2.2 kΩ |
| 150 pF | 967 Ω – 2.36 kΩ | 1.5 kΩ | 467 Ω – 2.36 kΩ | 1.5 kΩ |
| 200 pF | 967 Ω – 1.77 kΩ | 1.3 kΩ | 467 Ω – 1.77 kΩ | 1.3 kΩ |
| 300 pF | 967 Ω – 1.18 kΩ | 1.0 kΩ | 467 Ω – 1.18 kΩ | 1.0 kΩ |
| 400 pF | 967 Ω – 883 Ω | 890 Ω | 467 Ω – 883 Ω | 820 Ω |
Note: At 400 pF, you're right at the spec limit. Consider a bus buffer or segmenting the bus.
Power Consumption Consideration
Lower pull-up values mean more current when the bus is pulled low. At 400 kHz with 50% duty cycle (worst case for a busy bus), a 1.0 kΩ pull-up on a 3.3V bus draws:
I = VDD / Rp = 3.3 / 1000 = 3.3 mA (when pulled low)
P = VDD² / Rp = 10.89 mW per resistor
With two pull-ups (SDA and SCL), that's about 22 mW worst case. Negligible for most designs, but be aware if you're on a power budget.
Oscilloscope Verification
Once your board is built, verify the bus with a scope:
- Trigger on SCL at VDD/2
- Measure rise time on SDA (10% to 90% of VDD). Should be under 300 ns.
- Check VOL — the low level should not exceed 0.4V (for standard I2C devices)
- Look for ringing — undershoot or overshoot can cause false clock pulses
- Check setup/hold times — SDA must be stable during SCL high (except during start/stop conditions)
If the rise time is too slow, decrease pull-up resistance. If you see excessive ringing, increase resistance or add a small series resistor (22-33 Ω) at the source.
Standards and References
- NXP UM10204 (Rev. 7) — The I2C-bus specification and user manual. This is the definitive reference.
- TI Application Note SLVA689 — "I²C Bus Pullup Resistor Calculation" — clean derivation of the formulas
- AN-686 (Analog Devices) — "iCoupler Isolation in I2C Applications" — relevant if you need galvanic isolation on the bus
- NXP AN255 — "I2C / SMBus Repeaters, Hubs and Expanders" — for multi-segment bus design
Calculate your exact pull-up values in seconds with the I2C Pull-Up Resistor Calculator — enter your bus capacitance, supply voltage, and target speed, and it gives you the valid resistance range with recommended standard values.