• Banner

PCF8574 I2C I/O Expansion Module Robotics Bangladesh
  • PCF8574 I2C I/O Expansion Module Robotics Bangladesh

PCF8574 I2C I/O Expansion Module

RBD-2727

Module can be used to expand the digital I/O of an MCU using the I2C bus.

BDT 160.00
BDT 160.00 BDT 160.00 BDT 160.00 BDT 160.00
Tax included Tax excluded Tax included Tax excluded
BDT 160.00 Tax excluded
BDT 160.00 Tax included
BDT 0.00 Tax
BDT 160.00 Tax excluded
BDT 0.00 Tax
BDT 160.00 Tax included
Quantity
30 Items

  Security policy

(edit with the Customer Reassurance module)

  Delivery policy

(edit with the Customer Reassurance module)

  Return policy

(edit with the Customer Reassurance module)

Description

DESCRIPTION

The PCF8574 module can be used to expand the digital I/O of an MCU using the I2C bus.

PACKAGE INCLUDES:

  • PCF8574 I2C I/O Expansion Module

KEY FEATURES OF PCF8574 I2C I/O EXPANSION MODULE:

  • 8 bi-directional data lines
  • Loop-thru feature allows expansion of up to 8 modules / 64 data lines
  • I2C interface with jumper adjustable addresses
  • Interrupt output capability
  • 3.3V and 5V compatible.

A common requirement when working with MCUs is the need to add more digital I/O than the device supports natively.  The  PCF8574 is one of the more popular methods of adding lines as it uses the I2C bus that requires only 2 lines on the MCU.  It provides 8 additional digital I/O lines which are easily expandable up to 64.

I2C Interface

The module has an easy to use I2C interface that can be configured to use any one of eight different I2C addresses if you want to use multiple modules in the same system or if you run into an address conflict with another device.PCF8574 I2C IO Expansion Module - Jumpers

The base I2C address of the modules is 0x20.

There are three address jumps (A0-A2) the determines which I2C address to use.  As shipped, these jumpers are all set to the ‘-‘ side which is ground or LOW as shown in the picture.  The ‘+’ side is Vcc or HIGH.

This puts the module at the base address of 0x20.  The jumpers can be moved in a binary fashion to increase the address, so the address can range from 0x20 to 0x27 as shown in the table below.

If you daisy-chain the modules, you will need to set a different address for each of the modules.

Address (Hex) A2 A1 A0
0x20 LOW LOW LOW
0x21 LOW LOW HIGH
0x22 LOW HIGH LOW
0x23 LOW HIGH HIGH
0x24 HIGH LOW LOW
0x25 HIGH LOW HIGH
0x26 HIGH HIGH LOW
0x27 HIGH HIGH HIGH

You may run into devices with the PCF8574A part installed. If that happens, don’t panic.  These just use a different starting I2C address of 0x38.  This part is offered by the mfr so that if both A and non-A parts are used together in a system, the number of modules can be increased up to a maximum of 16 providing at total of 128 digital lines.  The ‘T‘ marking on the devices just denote that it is a surface mount device.

If there is ever a doubt about the I2C address of this or any device, just hook it up to the I2C bus and apply power and ground and then run the I2C scanner software.

I/O Functionality

The I/O is defined as quasi-bidirectional. A quasi-bidirectional I/O is either an input or output port without using a direction control register.  When set as inputs, the pins act as normal inputs do.  When set as outputs, the PCF8574 device drives the outputs LOW with up to 25mA sink capability but when driving the outputs HIGH, they are just pulled up high with a weak internal pull-up.  That enables an external device to overpower the pin and drive it LOW.

The device powers up with the 8 data lines all set as inputs.

When using the pins as inputs, the pins are set to HIGH by the MCU, which turns on a weak 100 uA internal pull-up to Vcc. They will read as HIGH if there is no input or if the pin is being driven HIGH by an external signal but can be driven LOW by an external signal that can easily override the weak pull-up.

If used as outputs, they can be driven LOW by the MCU by writing a LOW to that pin. A strong pull-down is turned on and stays on to keep the pin pulled LOW. If the pin is driven HIGH by the MCU, a strong pull-up is turned on for a short time to quickly pull the pin HIGH and then the weak 100uA pull-up is turned back on to keep the pin HIGH.

If the pins are set to be outputs and are driven LOW, it is important that an external signal does not also try to drive it HIGH or excessive current may flow and damage the part.

Whenever the internal register is read, the value returned depends on the actual voltage or status of the pin.

The I/O ports are entirely independent of each other, but they are controlled by the same read or write data byte.

Interrupt Output

The interrupt open drain output pin is active LOW.  It is normally pulled HIGH using a pull-up resistor and is driven low by the PCF8574 when any of the inputs change state. This signals the MCU to poll the part to see what is going on. If connecting this pin, enable the internal pull-up resistor on the MCU or add an external pull-up of 10K or so.

If using interrupts with multiple modules, since they are open drain they can be tied together if a single interrupt back to the MCU is desired.

Module Connections

The connections to the module are straight forward.

  1. Supply 3.3 or 5V power and ground.
  2. Connect I2C SCL and SDA lines to same on the MCU.
  3. If used, connect the INT line to an interrupt input on the MCU and use a pull-up resistor.

1 x 4 Header (Male & Female)

  • VCC = Vcc (2.5V – 6V) typically connects to uC 3.3V or 5V
  • GND =  Ground connects to uC ground
  • SDA =  I2C SDA connects to uC I2C SDA
  • SCL =   I2C SCL connects to uC I2C SCL

1 x 9 Header

  • P0 = I/O Pin 0
  • P1 = I/O Pin 1
  • P2 = I/O Pin 2
  • P3 = I/O Pin 3
  • P4 = I/O Pin 4
  • P5 = I/O Pin 5
  • P6 = I/O Pin 6
  • P7 = I/O Pin 7
  • INT = Interrupt Output – connects to MCU interrupt pin.  Active LOW

OUR EVALUATION RESULTS:

These modules are useful for expanding digital I/O.

One thing to keep in mind is that since the device has strong drive (25mA) when sinking current, but low drive (300uA) when sourcing current, it is best to drive LEDs and similar devices that require higher current by tying their anode to Vcc and pulling their cathode LOW with the PCF8574.  A current limiting resistor is generally required.

The example program below sets up all 8 lines as inputs and writes a HIGH to them to enable the weak internal pullups of the PCF8574, so these pins will read HIGH unless something drives them low.

Pushbuttons with one side grounded can be connected to these inputs.  The MCU which then scans the PCF8574 inputs and prints out any button found to be pressed.

  • SDA / SCL lines should be connected to same on MCU.
  • Ground and 3.3V or 5V power should be applied to match the MCU power
  • Hook up one or more pushbuttons to one or more of the inputs or can just ground pins with a jumper wire for testing.

The example here uses the xreef/pcf8574 library that can be downloaded from GitHub:  https://github.com/xreef/PCF8574_library

PCF8574 Module Test Program

/*
   This example for the PCF8574 takes pushbutton inputs on pins 0-7 and
   sends the number of the button pressed to the Serial Monitor window.
   Pins are normally HIGH and pulled LOW when button is pressed.

   Uses the xreef/PCF8574.h library
*/
#include "Arduino.h"
#include "PCF8574.h"

PCF8574 pcf8574(0x20);  // Set (I2C address)

//===============================================================================
//  Initialization
//===============================================================================
void setup()
{
 Serial.begin(9600);

 for(int i=0;i<8;i++) {
    pcf8574.pinMode(i, INPUT);    // Set all pins as inputs
    pcf8574.digitalWrite(i,HIGH); // Enable weak pull-ups to pull pins HIGH
  }
  pcf8574.begin();
  delay(500);  // Give the pcf8574 a little time to initialize
}
//===============================================================================
//  Main
//===============================================================================
void loop()
{ // just loop scanning the keys
   if (pcf8574.digitalRead(P0)==LOW) {Serial.println("KEY 0");}
   if (pcf8574.digitalRead(P1)==LOW) {Serial.println("KEY 1");}
   if (pcf8574.digitalRead(P2)==LOW) {Serial.println("KEY 2");}
   if (pcf8574.digitalRead(P3)==LOW) {Serial.println("KEY 3");}
   if (pcf8574.digitalRead(P4)==LOW) {Serial.println("KEY 4");}
   if (pcf8574.digitalRead(P5)==LOW) {Serial.println("KEY 5");}
   if (pcf8574.digitalRead(P6)==LOW) {Serial.println("KEY 6");}
   if (pcf8574.digitalRead(P7)==LOW) {Serial.println("KEY 7");}
   delay(250);
}
Product Details
RBD-2727
30 Items

Specific References

EAN13
2727
Comments (0)
Grade
No customer reviews for the moment.
16 other products in the same category:

Reference: RBD-2922

2.42 inch OLED Screen LCD Display Module 128x64 IIC I2C 4Pin White

(0)
Operating Voltage: 3.3V Resolution: 128 × 64 pixels Communication Interface: I2C Communication Display size: 55.01 × 27.49mm Driver: SSD1309Note: The component, colour &amp; shape of the module may vary depending on our stock rotation.
BDT 1,690.00
BDT 1,690.00 tax incl.
BDT 1,690.00 tax excl.
BDT 1,690.00 tax excl.
BDT 1,690.00 tax incl.
BDT 1,690.00 tax incl.
BDT 0.00 Tax
BDT 1,690.00 tax excl.
BDT 1,690.00 tax excl.
BDT 0.00 Tax
BDT 1,690.00 tax incl.
More
In stock
In stock: 10

Reference: RBD-1871

EGS002 SPWM Pure Sine Wave Inverter Module

(0)
5V single power supply. Wave frequency adjustable 0-400Hz adjustable frequency pure sine wave. Unipolar and bipolar modulation mode. External 12MHz crystal oscillator. PWM carrier frequency 23.4KHz. Voltage, current, temperature feedback real-time processing. Overvoltage, Undervoltage, overcurrent, overheating protection function. Pin set soft-start mode...
BDT 840.00
BDT 840.00 tax incl.
BDT 840.00 tax excl.
BDT 840.00 tax excl.
BDT 840.00 tax incl.
BDT 840.00 tax incl.
BDT 0.00 Tax
BDT 840.00 tax excl.
BDT 840.00 tax excl.
BDT 0.00 Tax
BDT 840.00 tax incl.
More
In-Stock
In stock: 5

Reference: RBD-2145

L298P Motor Driver Shield for Arduino

(0)
L298P based Arduino motor driver shield Onboard Buzzer (D4). Onboard Bluetooth interface, you can directly plug, no wiring required. Six Analog interface. Forward, Backward steering indicators
BDT 990.00
BDT 990.00 tax incl.
BDT 990.00 tax excl.
BDT 990.00 tax excl.
BDT 990.00 tax incl.
BDT 990.00 tax incl.
BDT 0.00 Tax
BDT 990.00 tax excl.
BDT 990.00 tax excl.
BDT 0.00 Tax
BDT 990.00 tax incl.
More
In-Stock
In stock: 18

Reference: RBD-1738

Active Speaker Buzzer Module for Arduino 5V

(0)
Operating Voltage : 1.5 ~ 15V DC Working Current: Less than 25mA Tone Generation Range : 1.5 ~ 2.5kHz Dimensions (LxWxH):  26 x 15 x 11 mm
BDT 59.00
BDT 59.00 tax incl.
BDT 59.00 tax excl.
BDT 59.00 tax excl.
BDT 59.00 tax incl.
BDT 59.00 tax incl.
BDT 0.00 Tax
BDT 59.00 tax excl.
BDT 59.00 tax excl.
BDT 0.00 Tax
BDT 59.00 tax incl.
More
In-Stock
In stock: 192

Reference: RBD-0108

USB Host Shield For Arduino UNO, MEGA, Compatible with Google Android ADK

(0)
Works with standard (dual 5/3.3V) and 3.3V-only (for example, Pro Arduino) boards. Complies with USB Specification Revision 2.0 (Full-Speed 12Mbps Peripheral, Full-/Low-Speed 12Mbps/1.5Mbps Host) Supports HID devices, such as keyboards, mice, joysticks, etc. Compatible with Mass storage devices, such as USB sticks, memory card readers, external hard...
BDT 1,199.00
BDT 1,199.00 tax incl.
BDT 1,199.00 tax excl.
BDT 1,199.00 tax excl.
BDT 1,199.00 tax incl.
BDT 1,199.00 tax incl.
BDT 0.00 Tax
BDT 1,199.00 tax excl.
BDT 1,199.00 tax excl.
BDT 0.00 Tax
BDT 1,199.00 tax incl.
More
In-Stock
In stock: 12

Reference: RBD-1336

ESP8266 5V WIFI Relay Smart Home Remote Control Switch

(0)
Onboard Module: ESP8266 wifi module; in AP mode it can connect with 5 Clients at the same time Operating Way: cellphone carried on wifi module; cellphone and wifi module carried on the same router, and use the APP to control relay Transmission Distance : 400m (max) Relay : 5V,10A/250V AC 10A/30V DC Baud Rate: 9600. Diode effusion protection; Short...
BDT 290.00
BDT 290.00 tax incl.
BDT 290.00 tax excl.
BDT 290.00 tax excl.
BDT 290.00 tax incl.
BDT 290.00 tax incl.
BDT 0.00 Tax
BDT 290.00 tax excl.
BDT 290.00 tax excl.
BDT 0.00 Tax
BDT 290.00 tax incl.
More
In-Stock
In stock: 53

Reference: RBD-2769

Mini MP3 and WAV File Player

(0)
Model MP3-TF-16P / FN-M16P
BDT 180.00
BDT 180.00 tax incl.
BDT 180.00 tax excl.
BDT 180.00 tax excl.
BDT 180.00 tax incl.
BDT 180.00 tax incl.
BDT 0.00 Tax
BDT 180.00 tax excl.
BDT 180.00 tax excl.
BDT 0.00 Tax
BDT 180.00 tax incl.
More
In stock
In stock: 26

Reference: RBD-0832

Arduino MicroSD Card Module

(0)
Power supply: 4.5V – 5.5V, 3.3V voltage regulator circuit board Positioning holes: 4 M2 screws positioning hole diameter of 2.2mm Control Interface: GND, VCC, MISO, MOSI, SCK, CS Size: 45 x 28mm Net weight: 6g
BDT 75.00
BDT 75.00 tax incl.
BDT 75.00 tax excl.
BDT 75.00 tax excl.
BDT 75.00 tax incl.
BDT 75.00 tax incl.
BDT 0.00 Tax
BDT 75.00 tax excl.
BDT 75.00 tax excl.
BDT 0.00 Tax
BDT 75.00 tax incl.
More
In-Stock
In stock: 8

Reference: RBD-2798

I/O Expander - MCP23008

(0)
Add another eight pins to your microcontroller using a MCP23008 port expander. The MCP23008 uses two I2C pins which can be shared with other I2C devices, and in exchange gives you eight general purpose pins. You can set each of eight pins to be input, output, or input with a pullup. There's even the ability to get an interrupt via an external pin when any...
BDT 490.00
BDT 490.00 tax incl.
BDT 490.00 tax excl.
BDT 490.00 tax excl.
BDT 490.00 tax incl.
BDT 490.00 tax incl.
BDT 0.00 Tax
BDT 490.00 tax excl.
BDT 490.00 tax excl.
BDT 0.00 Tax
BDT 490.00 tax incl.
More
In stock
In stock: 20

Reference: RBD-1038

PIC Development Board with Cable PIC16F877

(0)
Reset button.  4M crystal onboard, Using socket, Crystal frequency can be replaced easily at any time  4 independent push buttons, connected to RB0 RB1 RB2 RB3  8 LED's connected to the RD port, J3 is jumpered to enable LED. Remove to disconnect.  Standard RS232 communication interface, microcontroller computer communication interface. 
BDT 2,200.00
BDT 2,200.00 tax incl.
BDT 2,200.00 tax excl.
BDT 2,200.00 tax excl.
BDT 2,200.00 tax incl.
BDT 2,200.00 tax incl.
BDT 0.00 Tax
BDT 2,200.00 tax excl.
BDT 2,200.00 tax excl.
BDT 0.00 Tax
BDT 2,200.00 tax incl.
More
In-Stock
In stock: 11

Reference: RBD-2505

RS232 Bluetooth Serial Adapter Communication Master-Slave Module

(0)
RS232 Bluetooth Serial Adapter Communication Master-Slave Module
BDT 1,250.00
BDT 1,250.00 tax incl.
BDT 1,250.00 tax excl.
BDT 1,250.00 tax excl.
BDT 1,250.00 tax incl.
BDT 1,250.00 tax incl.
BDT 0.00 Tax
BDT 1,250.00 tax excl.
BDT 1,250.00 tax excl.
BDT 0.00 Tax
BDT 1,250.00 tax incl.
More
In stock
In stock: 10

Reference: RBD-2078

Vibration Switch Module

(0)
No direction, any angle can trigger the work. Sensitivity switches can be selected for the trigger sensitivity according to circuit requirements. This switch is suitable for the trigger of the small current circuit. Component Type: SW-18015P Maximum voltage: 12V Rated Heating Current: 20mA
BDT 45.00
BDT 45.00 tax incl.
BDT 45.00 tax excl.
BDT 45.00 tax excl.
BDT 45.00 tax incl.
BDT 45.00 tax incl.
BDT 0.00 Tax
BDT 45.00 tax excl.
BDT 45.00 tax excl.
BDT 0.00 Tax
BDT 45.00 tax incl.
More
In-Stock
In stock: 66

Reference: RBD-0028

Arduino Ethernet Shield W5100

(0)
Based on the W5100Based on the Wiznet W5100 allows an Arduino board to connect to the internet. Stackable Design, can directly be supported by for Arduino official Ethernet Library. Supports up to four simultaneous socket connections Can be used to store files for serving over the network. Can be accessed using the Mini SD TF library. IEEE802.3af...
BDT 1,170.00
BDT 1,170.00 tax incl.
BDT 1,170.00 tax excl.
BDT 1,170.00 tax excl.
BDT 1,170.00 tax incl.
BDT 1,170.00 tax incl.
BDT 0.00 Tax
BDT 1,170.00 tax excl.
BDT 1,170.00 tax excl.
BDT 0.00 Tax
BDT 1,170.00 tax incl.
More
In-Stock
In stock: 23

Reference: RBD-1219

3.5inch LCD Display Shield for Arduino

(0)
Supports development boards such as Arduino UNO and Mega2560 for plug-in use without wiring 480X320 resolution, clear display Support 16-bit RGB 65K color display, display rich colors 8-bit parallel bus, faster than serial SPI refresh On-board 5V/3.3V level shifting IC, compatible with 5V/3.3V operating voltage Easy to expand the experiment with SD card...
BDT 1,680.00
BDT 1,680.00 tax incl.
BDT 1,680.00 tax excl.
BDT 1,680.00 tax excl.
BDT 1,680.00 tax incl.
BDT 1,680.00 tax incl.
BDT 0.00 Tax
BDT 1,680.00 tax excl.
BDT 1,680.00 tax excl.
BDT 0.00 Tax
BDT 1,680.00 tax incl.
More
In-Stock
In stock: 8

Reference: RBD-0353

0.96" Inch I2C OLED Display Yellow

(0)
Driver IC: SSD1306 Support wide voltage: 3.3V-5V DC Communication: IIC Working temperature: -30-80 degrees. RoboticsBD
BDT 420.00
BDT 420.00 tax incl.
BDT 420.00 tax excl.
BDT 420.00 tax excl.
BDT 420.00 tax incl.
BDT 420.00 tax incl.
BDT 0.00 Tax
BDT 420.00 tax excl.
BDT 420.00 tax excl.
BDT 0.00 Tax
BDT 420.00 tax incl.
More
In-Stock
In stock: 22

Reference: RBD-0413

Data Logger Module Logging Shield Data Recorder Shield for Arduino

(0)
SD card interface works with FAT16 or FAT32 formatted cards. 3.3v level shifter circuitry prevents damage to your SD card. Real-time clock (RTC) keeps the time going even when the Arduino is unplugged. The battery backup lasts for years. Included libraries and example code for both SD and RTC mean you can get going quickly Prototyping area for soldering...
BDT 499.00
BDT 499.00 tax incl.
BDT 499.00 tax excl.
BDT 499.00 tax excl.
BDT 499.00 tax incl.
BDT 499.00 tax incl.
BDT 0.00 Tax
BDT 499.00 tax excl.
BDT 499.00 tax excl.
BDT 0.00 Tax
BDT 499.00 tax incl.
More
In-Stock
In stock: 30

Follow us on Facebook