IMG_4290

8 GPIO I2C Extender – Adds 8 GPIO pins to your device through an inexpensive I2C Breakout Board 

 

 

features:

  • I2C controlled
  • 8 GPIO pins
  • All pins can interrupt the computer
  • Two bank power supply allows two banks of 4 GPIO pins to have 5V or 3.3V
  • Can program GPIO pins to make up to 3 pin logic gates (PLD)
  • Software drivers for Arduino and Raspberry Pi Included!

Comments are now closed.   Please go to the Product Support Forum at the top of the page.

[include-page id=”buy-include-file”]

This board is an inexpensive I2C GPIO Extender Board. It allows you to add 8 pins of GPIO, with interrupts allowed on all pins, to any Arduino or Raspberry Pi design. It works with 5V and 3.3V and in fact you can have 4 pins at 5.0V while having 4 pins at 3.3V at the same time. It is based upon the Semtech SX1502 and it has some really cool features. Here is the block diagram for the board:

 

bd0d61f71bb11e9414848c51131e34cf_original

 

 

What are some of the applications for this 8 GPIO Extender board? Anytime you need additional GPIO pins. This happens all the time with the Raspberry Pi and with some of the newer, smaller Arduino boards. Do you want more interrupts on your Arduino or Raspberry c7c6576ccf1f7f6c76d5a8fb0974224d_originalPi? You can use this board to generate interrupts that can then be read by the Arduino or Raspberry Pi.

The other advantage is that you can set each bank of four GPIOs to a different power supply, anywhere from 1.2V to 5.5V. Very flexible in mixed voltage systems.

Of course, the board is both 3.3V and 5.0V tolerant meaning your I2C bus can be at either of those voltages.

Another more subtle advantage of this board is that you can create logic gates (PLD – Programmable Logic Device). Do you need a couple of logic gates in your design? You can build XOR, Inverters, AND, NAND, OR, NOR, etc., etc. using this chip. Your choice!

Specification

Software

Arduino Software Drivers are available here at https://github.com/switchdoclabs/SDL_Arduino_SX1502
Raspberry Pi Software Drivers are available here at https://github.com/switchdoclabs/SDL_Pi_SX1502

4 Comments

  1. hi!

    I’m kinda new to Arduino.. invested into the GPIO and received them thanx :).

    How do i use it?
    My intention was to use it to have more IO-pins for pushbuttons on a flight simulator project. My C++ programming skills are vrey basic.

    BUT.. i dont understand how to recive inputs from say, port IO5.

    This is what i’ve done;
    1. Connected the GPIO board to my arduino UNO R3.
    2. Used the scan I2C. The switchdoc GPIO-board is found = working.
    3. Downloaded the Arduino library, installed it to the Arduino IDE.
    4. Ran the demo program. It works.
    5. Tried to get ‘blinking LED’ on GPIO-port 5. Got stuck.. looked at the example code but didnt understand one bit.

    So then i thought.. cool!! Gonna use it for pushbuttons.. and got stuck. See above.

    all help appreciated.

  2. Hi!

    I’ve taken the example which you made.

    What i’d like to test;
    * Blink an external LED.
    * Receive input from a push-button, or on/off switch

    What i did;
    * took your example code (see below), then modified it to port 0x02.
    * wired a breadboard with currentlimiting resistor + LED, ofcourse containing 5V and GND.
    * Ran a dupont jumper cable from GPIO-port 02 to the breadbord to GPIO-port.
    * Ran the code below.
    RESULT=nothing happens..

    Dont know if i have something wrong there..?

    met vriendelike groet,
    Michiel

    =============
    <>

    void loop() {

    // blink IO 0 to see LED

    sx1502.setDirectionGPIOChannel(SX1502_REG_IO0, SX1502_OUTPUT);
    sx1502.setDirectionGPIOChannel(SX1502_REG_IO1, SX1502_OUTPUT);
    sx1502.setDirectionGPIOChannel(SX1502_REG_IO2, SX1502_OUTPUT);
    sx1502.setDirectionGPIOChannel(SX1502_REG_IO3, SX1502_OUTPUT);
    //sx1502.setPullupGPIOChannel(SX1502_REG_IO0, SX1502_ON);
    //sx1502.setPulldownGPIOChannel(SX1502_REG_IO0, SX1502_ON);
    byte value;

    while (1)
    {

    // loop about on IO 0 to see the LED blink

    Serial.println("----------------");
    sx1502.writeGPIO(0x01);
    delay(1000);
    Serial.println("++++++++++++++");
    value = sx1502.readGPIO();
    Serial.print("GPIO Value =");
    Serial.println(value, HEX);

    sx1502.writeGPIO(0x00);
    delay(200);
    Serial.println("----------------");
    Serial.println("----------------");

    sx1502.writeGPIO(0x02);
    delay(1000);
    Serial.println("++++++++++++++");
    value = sx1502.readGPIO();
    Serial.print("tweede GPIO Value =");
    Serial.println(value, HEX);

    sx1502.writeGPIO(0x04);
    delay(200);

    delay(1200);

    }

    • Michiel,

      Please post all of the code, including your headers. We need to see the entire program. We’d like to compile it and test it if we don’t see something obvious.

      Best regards,

      SDL

1 Trackback / Pingback

  1. Arduino Drivers for 8 GPIO I2C Expander Board (SX1502) Released - SwitchDoc Labs

Comments are closed.