I2C Bus Specification
A typical embedded system consists of one or more microcontrollers and peripheral devices like memories, converters, I/O expanders, LCD drivers, sensors, matrix switches, etc. The complexity and the cost of connecting all those devices together must be kept to a minimum. The system must be designed in such a way that slower devices can communicate with the system without slowing down faster ones.
To satisfy these requirements a serial bus is needed. A bus means specification for the connections, protocol, formats, addresses and procedures that define the rules on the bus. This is exactly what I2C bus specifications define.
The I2C bus uses two wires: serial data (SDA) and serial clock (SCL). All I2C master and slave devices are connected with only those two wires. Each device can be a transmitter, a receiver or both. Some devices are masters – they generate bus clock and initiate communication on the bus, other devices are slaves and respond to the commands on the bus. In order to communicate with specific device, each slave device must have an address which is unique on the bus. I2C master devices (usually microcontrollers) don't need an address since no other (slave) device sends commands to the master.
I2C terminology
TransmitterThis is the device that transmits data to the bus
ReceiverThis is the device that receives data from the bus
MasterThis is the device that generates clock, starts communication, sends I2C commands and stops communication
SlaveThis is the device that listens to the bus and is addressed by the master
Multi-masterI2C can have more than one master and each can send commands
ArbitrationA process to determine which of the masters on the bus can use it when more masters need to use the bus
SynchronizationA process to synchronize clocks of two or more devices
Bus Signals
Both signals (SCL and SDA) are bidirectional. They are connected via resistors to a positive power supply voltage. This means that when the bus is free, both lines are high. All devices on the bus must have open-collector or open-drain pins. Activating the line means pulling it down (wired AND). The number of the devices on a single bus is almost unlimited – the only requirement is that the bus capacitance does not exceed 400 pF. Because logical 1 level depends on the supply voltage, there is no standard bus voltage.
Serial Data Transfer
For each clock pulse one bit of data is transferred. The SDA signal can only change when the SCL signal is low – when the clock is high the data should be stable.
本文详细介绍了I2C总线规格,包括其在典型嵌入式系统中的应用,如何通过两条线(串行数据SDA和串行时钟SCL)连接多个设备,并保持成本和复杂性的最小化。此外还解释了I2C总线的基本概念,如传输器、接收器、主机和从机等。

被折叠的 条评论
为什么被折叠?



