Raspberry Pi I2C-IO Expand Module(English)

From 52Pi Wiki
Jump to navigation Jump to search

RPI_0.91'OLED Display Module

Description

This module is designed specifically for expand the GPIO of Raspberry Pi, this module can effectively solve the problem of less of RaspberryPi's IO use. It use PCF8574 chip to expand 8 Bidirectional IOs. The module connection to the Raspberry Pi through I2C interface. There are 8 I2C address in the module and user can choose one of them through setup the “ADDR” jumper. User also can choose 5V or 3.3V electric level. Module with isolation protection, can effectively prevent external high voltage damage to the Raspberry Pi. Multiple module can cascade.

I2c-expand.jpg

Product Features

  • 8 Bidirectional IO
  • 8 I2C-address
  • Isolation protection
  • Use wiringPi API , sample code
  • 100 kHz I2C-bus interface (Standard-mode I2C-bus)

Technical Details

Type Value
Name Raspberry Pi I2C-IO Expand Module
Working voltage 2.5V-6V
IO voltage tolerance 3.3V or 5.5
Number of IO Expand 8
Communicate Interface I2C
Speed of I2C Interface 100khz
Working temperature -20°C to +85°C

Typical Application

  • LED signs and displays
  • Key pads
  • Instrumentation and test measurement
  • Driver numeric display
  • Drive the lattice screen

Overview

P14.JPGP13.JPGP15.JPG

mounted on Raspberry Pi

P5.JPGP4.JPGP2.JPG

in the night

P12.JPGP10.JPGP11.JPG

product scale


8574.png

schematic


QQ截图20150717151018.png

Learn


8574 tech1.png

  • If the steps above are done,next type sudo vim.tiny /etc/modulesto modify modules file just like the following
i2c-bcm2708
i2c-dev


8574 tech2.png
8574 tech3.png

  • typesudo i2cdetect -y -a 1 to detect the module is work on raspberry Pi


8574 tech4.png

  • this module is detected on address 0x27,then we load the demo code and compile it.


8574 tech5.png
8574 tech6.png

  • type sudo ./a.out,with a voltmeter,you will see the pin level change


8574 tech7.png

demo code

示例代码说明

#include <wiringPi.h>
#include <pcf8574.h>
#include <stdio.h>
int main()
{
 int i;
 pcf8574Setup(100,0x27);                                 
 for(i=0;i<8;i++) pinMode(100+i,OUTPUT);                                                                                               
while(1)                                                
 {
  i = 0;
  for(i=0;i<=8;i++)                                           
   {
   printf("Current LED = %d\n",100+i);                     
   digitalWrite((100+i),HIGH);                      
   delay(500);                                      
   digitalWrite((100+i),0);                        
   delay(500);                                      
    }
  }
}

购买链接

附件


1306-0.91-CODE.zip
SSD1306-Revision 1.0.pdf Category:名称
如对此页的规则或教程有意见者,可到此网页或是在管理员Powup333的讨论页留言。