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的更多相关文章
随机推荐
- DB天气app冲刺第四天
今天卡壳了 做得很慢.. 明天继续 换一种思路试一下吧..
- About Interface
http://www.codeproject.com/Articles/18743/Interfaces-in-C-For-Beginners Interface can't have thi ...
- pgrep 查询进程的工具
pgrep 1:简介 pgrep 是通过程序的名字来查询进程的工具,一般是用来判断程序是否正在运行.在服务器的配置和管理中,这个工具常被应用,简单明了: 1:用法 #pgrep 参数选项 程序名 常用 ...
- Command-line tools can be 235x faster than your Hadoop cluster
原文链接:http://aadrake.com/command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html Introduc ...
- hdu 4815 Little Tiger vs. Deep Monkey
概率dp,有点像背包的做法: dp[i][j]代表前i个数组成的j数的概率为多少 #include<cstdio> #include<cstring> #define maxn ...
- [AC自动机]HDOJ3695 Computer Virus on Planet Pandora
题意:给t.n,t个案例,n个字符串 下面给n+1个字符串,n个互不相同的小串,最后一个是模式串 模式串会出现[qx]的形式,q为数字,x为一个字母 问n个小串在模式串中出现的个数,正着出现.反着出现 ...
- [topcoder]FoxAndChess
http://community.topcoder.com/stat?c=problem_statement&pm=12725&rd=15702 这题比较简单.首先所有的LR的顺序要一 ...
- SPRING IN ACTION 第4版笔记-第七章Advanced Spring MVC-005- 异常处理@ResponseStatus、@ExceptionHandler、@ControllerAdvice
No matter what happens, good or bad, the outcome of a servlet request is a servlet response. If an e ...
- ANDROID_MARS学习笔记_S01原始版_001_Intent
一.Intent简介 二.代码 1.activity_main.xml <RelativeLayout xmlns:android="http://schemas.android.co ...
- File List()列出文件目录
import java.io.File; public class FileTest { public static void main(String[] args) { File myFile = ...