EEPROM memory/Two wires/04. VCC sets the bus
Two wires · 04 of 10

VCC sets the bus

The two pull-up resistors run from VCC to SDA and SCL, so whenever nobody is pulling a line low it sits at VCC. That is the voltage your board's pins see. So VCC goes to your board's logic supply: 3V3 on an ESP32, an ESP32-S3 or a Pico, 5V on an Uno.

Where the pull-ups end

VCC sets the bus
Your board
VCC to
Bus rests at
5.0 V
Your pins run at
3.3 V
Verdict
move VCC
5 V on VCC, and the pull-ups hold SDA and SCL at 5 V whenever nothing pulls them low, which is most of the time. That is 5 V on two pins of a 3.3 V board, above what they are rated for. It may seem to work for a while. Move VCC to 3V3.

Try the four cases. The drawing is the same each time: your board on the left, two 10 kΩ resistors from VCC down to SDA and SCL, and the chip on the right.

I2C never drives a line HIGH. A device pulls it LOW, and when it lets go, the resistor brings it back up, to VCC. So most of the time SDA and SCL sit at exactly the voltage you put on VCC, and they sit there on your board's pins.

The one rule

VCC goes to the pin your board's logic runs at.

Your boardVCC toThe bus rests at
Arduino Uno5V5 V
ESP323V33.3 V
ESP32-S33V33.3 V
Raspberry Pi Pico3V3(OUT)3.3 V

5V on VCC beside a 3.3 V board holds two of its pins at 5 V. They are not rated for that, and "it seemed to work" is how it gets left that way. The chip itself runs from 2.2 to 5.5 V, so 3V3 costs nothing.

3V3 on VCC beside an Uno is the milder mistake. An Uno counts a pin as HIGH from 3.0 V, so a 3.3 V bus works with 0.3 V to spare, which long wires can eat. Use the Uno's 5V.

Why not a regulator on the board?

Some blocks have one, and there VCC can be 5V on every board. This one does not. A board with no regulator runs at whatever its host gives it, so wired to the host's own supply the bus always matches. The price is this one rule.

When it does not work

I had VCC on 5V with my ESP32 and it worked.

It can seem to, which is why it is easy to leave. The ESP32's SDA and SCL pins were held at 5 V through 10 kΩ, above what they are rated for. Move VCC to 3V3; the chip runs from 2.2 V, so nothing is lost.

My Pico has VBUS and 3V3(OUT). Which one?

3V3(OUT), pin 36. VBUS is the USB cable's 5 V, and would hold the Pico's GP4 and GP5 at 5 V through the pull-ups.

Does it matter which 5V pin on an Uno?

No. Any 5V pin on the Uno will do, and so would the Uno's 3.3V pin at a pinch, but 5V keeps the bus at the Uno's own level and leaves a margin.

Can I use a logic level converter instead?

You can, but you do not need one. The chip runs from 2.2 to 5.5 V, so powering it at your board's own voltage does the converter's job for free.

Where this goes next

What the copper strip on the back is for, and when to cut it.

The pull-up jumper

Edit this page — content/books/eeprom-memory/vcc-sets-the-bus.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

EEPROM Memory

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum