简体   繁体   English

在I2C总线中,从设备如何知道数据是否属于它们

[英]In I2C bus, how slave devices knows data belongs to them or not

I have one micro controller and 4 slave devices are attached with micro controller I2C bus.我有一个微控制器和 4 个从设备连接到微控制器 I2C 总线。 I have one doubt regarding data reading from I2C bus.我对从 I2C 总线读取数据有一个疑问。 When master initiates any transmission it will write device address on the I2C bus, but i want to know how slave devices will identify in I2C bus, data belongs to them or not.当主机启动任何传输时,它会在 I2C 总线上写入设备地址,但我想知道从设备将如何在 I2C 总线中识别,数据是否属于它们。

Slave devices have an address, either a fixed one or often an address where one or two bits can be configured by hardware (pulling certain pins of the chip to ground or VCC).从设备有一个地址,要么是固定地址,要么通常是一个地址,其中一位或两位可以由硬件配置(将芯片的某些引脚拉到地或 VCC)。 Each slave knows its own address.每个从站都知道自己的地址。

The slaves listen to all I2C communication.从设备监听所有 I2C 通信。 If an I2C transaction contains their address at the start, they will interact in the transaction.如果 I2C 事务在开始时包含它们的地址,它们将在事务中进行交互。 Otherwise they will ignore the transaction.否则他们将忽略该交易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM