当前位置:网站首页>Learn the knowledge you need to know about the communication protocol I2C bus
Learn the knowledge you need to know about the communication protocol I2C bus
2022-07-01 08:00:00 【Huawei SCM Linbei】

I2C It was Philips in 80 A serial communication bus designed in the s , Using multiple groups of slave architectures , It is mainly used in the main chip and sensor of the system 、EEPROM And other peripheral equipment components .

I2C All devices on the bus have a master-slave relationship , Support multiple master devices online , It also supports arbitration and conflict detection .
I2C The maximum number of slaves supported by the bus is theoretically 127 individual , Each device has only one unique address , So that the main equipment can select the corresponding equipment for communication .
I2C The agreement only needs SCL and SDA Two lines .
SCL Is the abbreviation of serial clock line , The synchronization clock is generated by the master device , Responsible for transmitting clock signals .
SDA Is the abbreviation of serial data line , Used to transmit data signals .
Since both data lines are open drain output , Therefore, it is necessary to connect the pull-up resistor during communication . Usually in standard mode 100KBPS Use 10K The pull-up resistance of , In fast mode 400KBPS Use 2K The pull-up resistance of .I2C The bus also has high-speed mode 3.4MBPS And ultra fast mode 5MBPS You can choose .
When the main equipment and heavy equipment transmit data, they need to follow the corresponding data structure sequence .

The first part is the start signal , After the master sends the start condition signal , All slaves, even in sleep mode, will become active and wait to receive address bits .
The second part is address bits and read-write bits , Usually the address bits occupy seven bits of data , The master device needs to send the corresponding slave address , Match the slave attached to the bus .I2C It also supports ten bit addressing , The read / write bit has specified the transmission direction of the data .
The third part is the reply bit , Every time the host sends data, it will wait for the response signal from the slave device ACK.
The fourth part is the address of the internal register or the instruction data of the slave device .
The fifth part is the data block sent .
Finally, the stop bit .

Next, let's take a look at the timing table I2C agreement , The condition for starting the signal is SCL When it's high level ,SDA Jump from high level to low level , After that ,SDA Start with SCL Clock sending device address data ,8bit The data of contains seven bit device address data and degree reading data .
For read and write bits , If the master device sends to the slave device 0, If it is sent from the slave device to the master device in turn, it is 1, Then comes the reply bit , This data is in the 9 Clock signal cycle expression .
If the response signal is sent from the device ACK, that SDA Will be pulled down , If there is no answer signal , It means that the previous address data has not been received from the device ,SDA Will output to high level .

cause NACK There are many reasons , For example, the master device sends the wrong address data , Or the slave device is busy and cannot answer , The corresponding master device will choose to resend or stop according to the corresponding situation .
If the master device receives the reply signal , The address information of the internal register of the same device will be sent , For example, we want to read ADSL345 Acceleration sensor X Axis of the data ,ADSL The device address of is 0x53,X The internal register address of the axis data is 0x32, The corresponding master device needs to access after pairing the slave device address ADSL Internal address 0x32 In order to read X Axis data information .

After each transmission, a reply bit will follow , If the receiver successfully receives data , Is set to 0, Otherwise keep the logic 1, Then the eight bit data frame and the corresponding response are , The end is , The end condition is SCL When it's high level ,SD A It will jump from low level to high level .
Like to help collect some praise , Thank you for your support and encouragement !
Learn SCM , I'm serious about Warwick North , Children's shoes can come to me if they have any questions , Reply to Lin Bei in time to get very practical dry goods , I will be very satisfied if I can help you grow ! Okay , That's all for this issue , See you next time !
Hua Weilin North
边栏推荐
- Erreur de hauteur du clavier souple
- AArdio - 【问题】bass库回调时内存增长的问题
- [skill] create Bat quick open web page
- web254
- 2022 operation of refrigeration and air conditioning equipment operation of national question bank simulated examination platform
- Teach you how to apply for domestic trademark online step by step
- Aardio - 自己构造的getIconHandle的方法
- 2022年茶艺师(中级)复训题库及答案
- Aardio - Method of self constructed geticonhandle
- 【入门】截取字符串
猜你喜欢

038 network security JS

base64

Minecraft 1.16.5模组开发(五十一) 方块实体 (Tile Entity)

软键盘高度报错

SharePoint - how to quickly check whether SharePoint is standard or enterprise edition?

軟鍵盤高度報錯

凸印的印刷原理及工艺介绍
![[batch dos-cmd command - summary and summary] - Common operators in the CMD window (<, < <, & <,>, > >, & >, & >, & &, ||, (),;, @)](/img/48/de19e8cc007b93a027a906d4d423b2.png)
[batch dos-cmd command - summary and summary] - Common operators in the CMD window (<, < <, & <,>, > >, & >, & >, & &, ||, (),;, @)

Differential: definition of total differential, partial derivative, gradient

Five combination boxing, solving six difficult problems on campus and escorting the construction of educational informatization
随机推荐
【入门】输入整型数组和排序标识,对其元素按照升序或降序进行排序
Gui Gui programming (XV) - use scale to control font size changes
ONES 创始人王颖奇对话《财富》(中文版):中国有没有优秀的软件?
2022 test question bank and simulation test of tea master (primary) operation certificate
Array: question brushing record
三极管是一项伟大的发明
Cmake I two ways to compile source files
Minecraft 1.16.5模组开发(五十一) 方块实体 (Tile Entity)
【mysql学习笔记28】存储函数
[R language] two /n data merge functions
2022危险化学品经营单位主要负责人试题及模拟考试
Introduction to kubernetes resource objects and common commands (II)
The Windows C disk is full
Aardio - 阴影渐变文字
EDA开源仿真工具verilator入门6:调试实例
Two expressions of string
Thesis learning -- Analysis and Research on similarity query of hydrological time series
Latex table
uni 热更新
Li Kou daily question - day 31 -202 Happy number