View Raw Markdown
rev:640 · 2015-07-20T01:49:04+00:00
Raspberry Pi I2C-IO Expand Module(English)
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. 
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
mounted on Raspberry Pi
in the night
product scale
schematic
Learn
- If it's the first time for you to use Raspberry Pi, please make sure the I2C interface is enabled. This page will show you how to enable the I2C interface. http://www.52pi.net/forum.php?mod=viewthread&tid=1363&highlight=rtc
- Type
sudo apt-get install i2c-toolsto install necessary component

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

- type
sudo i2cdetect -y -a 1to detect the module is work on raspberry Pi

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

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

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的讨论页留言。