TCA9546A
The TCA9546A is a 4-channel, bidirectional translating switch for I 2 C buses that supports Standard-Mode (100
kHz) and Fast-Mode (400 kHz) operation
TCA9546A是一个4频道双向传输的i2c复用芯片,可以支持标准的100KHZ和高速传输的400KHZ.
The TCA9546A features I 2 C control using a single 8-bit control register
in which the four least significant bits control the enabling and disabling of the 4 switch channels of I 2 C data flow
TCA9546A使用一个8位的控制寄存器,其中的低4位来控制开关这4路i2c数据流频道.
The connections of the I 2 C data path are controlled by the same I 2 C master device that is switched to
communicate with multiple I 2 C slaves. After the successful acknowledgment of the slave address (hardware
selectable by A0 and A1 pins), a single 8-bit control register is written to or read from to determine the selected
channels
A0和A1是硬件连接,如果接地那么就全是0.

由于我遇到的情况,A2,A1,A0均接地,所以slave address = 0xE0.
下表是控制寄存器的情况.
0x01 channel0
0x02 channel1
0x04 channel2
0x08 channel3

当需要使用channel 0时,首先需要:
发送 tca9546a 的slave address: 0xE1(写模式).
然后发送Control register : 0x1.
然后再使用正常的i2c写,比如这个时候你连接的是一个camera sensor, slave 地址是0x70, 这个时候使用你当前芯片的正常写i2c的步骤即可.只是需要在执行之前设置好tca9546a的channel,好让它知道当前是使用哪个channel.
当你需要读设备的寄存器时,同样, 需要先发送:
tca9546a的slave address :0xE1(读模式),然后发送
0x1,选择channel.
然后调用当前芯片的i2c读api函数.
TCA9546A的更多相关文章
随机推荐
- NodeJS+Express+Socket.io的一个简单例子
关键字:NodeJS,Express,Socket.io. OS:Windows 8.1 with update pro. 1.安装NodeJS:http://nodejs.org/. 2.初始化一个 ...
- hdu 5646 DZY Loves Partition 二分+数学分析+递推
链接:http://acm.hdu.edu.cn/showproblem.php?pid=5646 题意:将n分成k个正整数之和,要求k个数全部相同:并且这k个数的乘积最大为多少?结果mod 1e^9 ...
- Codeforces Round #345 (Div. 1) A. Watchmen 模拟加点
Watchmen 题意:有n (1 ≤ n ≤ 200 000) 个点,问有多少个点的开平方距离与横纵坐标的绝对值之差的和相等: 即 = |xi - xj| + |yi - yj|.(|xi|, |y ...
- mysql(转)
/* 启动MySQL */net start mysql /* 连接与断开服务器 */mysql -h 地址 -P 端口 -u 用户名 -p 密码 /* 跳过权限验证登录MySQL */mysqld ...
- SqlServer2008 设置修改表设计限制
我记起来了 SQL Server 2008 对操作的安全性进行了限制 你要在Management Studio菜单栏 -工具-选项,弹出选项窗口:把 “阻止保存要求重新创建表的更改” 请的勾去掉.
- Hadoop集群(第10期)_MySQL关系数据库
1.MySQL安装 MySQL下载地址:http://www.mysql.com/downloads/ 1.1 Windows平台 1)准备软件 MySQL版本:mysql-5.5.21-win32. ...
- Swift 中的 Runtime
即使在 Swift APP 中没有一行 Object-c 的代码,每个 APP 也都会在 Object-c runtime 中运行,为动态任务分发和运行时对象关联开启了一个世界.更确切地说,可能在仅使 ...
- jquery sortTable拖拽排序
所有的事件回调函数都有两个参数:event和ui,浏览器自有event对象,和经过封装的ui对象 ui.helper - 表示sortable元素的JQuery对象,通常是当前元素的克隆对象 ...
- code forces Jeff and Periods
/* * c.cpp * * Created on: 2013-10-7 * Author: wangzhu */ #include<cstdio> #include<iostrea ...
- cocos2d-html5 Layer 和 Scene 创建模式
var myLayer = cc.Layer.extend({ init:function() {//2 界面 var bRet = false; if (this._super()) { bRet ...