Notes About Working with Various Arduino & Netduino Microcontroller Boards

Thursday, August 1, 2013

Changing the I2C Address of the PCF8574(P) I/O Expander

Last January, I posted about using the PCF8574P I/O expander to connect a membrane keypad to an Arduino via I2C.  I used the default I2C address (0x20) in that example.  By changing the connections of pins 1 - 3 (A0 - A2) on the chip to 5V (+) or GND (-), the address can be changed withing the range of 0x20 - 0x27.

The pin to the left of the "dot" on the PCF8574P is pin 1 (with the dot in the 12 o'clock position).

Pin 1(A0)  2(A1)  3(A2)  Addr.

      -      -      -    0x20     
      +      -      -    0x21
      -      +      -    0x22
      +      +      -    0x23
      -      -      +    0x24
      +      -      +    0x25
      -      +      +    0x26
      +      +      +    0x27


No comments:

Post a Comment