3
\$\begingroup\$

I have a Address Select pins (A0, A1, A2) for I2C Serial EEPROM. These 3 lines enables 8 different addresses for IC. What I want is to connect these lines to DIP switch, so I can manually change addresses. Can I connect those lines from dipswitch directly to GND and VCC or I need pull-up/pull-down resistors?

\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

Either use pull-up resistors and use the DIP switches to pull down to ground, or use pull-down resistors and use the DIP switches to pull up to Vcc.

schematic

simulate this circuit – Schematic created using CircuitLab

If you do not pull (up|down) the address lines will be floating when the switch is open, which means arbitrary addresses will be in effect due to noise on the open, typically high-impedance address sense lines.

\$\endgroup\$
2
  • \$\begingroup\$ Well, that depends on the specific IC. Some are fine with floating address pins. \$\endgroup\$
    – Passerby
    Commented Jun 27, 2013 at 20:42
  • \$\begingroup\$ @Passerby Generic question, hence most generally applicable answer. \$\endgroup\$ Commented Jun 28, 2013 at 2:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.