• I2C 总线协议


    摘自 <<I2C-bus specification and user manual>> Rev. 6 -- 4 April 2014

    1  features

    1)  two bus lines: SCL, SDA

    2)  each device is software addressable

    3)  multi-master

    4)  100kb/s  ~ Standard-mode; 3.4Mb/s ~ High-speed mode

    2  protocol

    2.1  signals

      SDA and SCL are bidirectional lines, connected to a positive supply voltage via a current-source or pull-up resistor.

      Both lines are HIGH when the bus is free.

       Input reference level are set as 30% and 70% of VDD, VIL = 0.3VDD, VIH = 0.7VDD

    2.2  data validity

        the data on SDA must be stable during the High period of SCL

        the data on SDA can only change when Low period of SCL

    2.3  START and STOP conditions

        S condition, a HIGH to LOW transition on SDA while SCL is HIGH

        P condition, a LOW to HIGH transition on SDA while SCL is HIGH

    2.4  BYTE format

        every byte put on the SDA line must be 8 bits long

        each byte must be followed by an Acknowledge bit

        If a slave cannot receive or transmit another complete byte of data until it has performed some other function, for example servicing an internal interrupt, it can hold the clock line SCL LOW to force the master into a wait state.

    2.5  ACK and NACK

        ACK signal (LOW): the transmitter releases the SDA line during the ack clock pulse so the receiver can pull the SDA line LOW and it remained LOW durng the HIGH period of this clock pulse.

        NACK signal (HIGH): when SDA remains HIGH during this 9th clock pulse, the master can then generate either a STOP to abort the transfer, or a repeated START to start a new transfer.

    2.6  slave address and R/W bit

    1)  a complete data transfer

    2)  a master writes data into a slave

    3)  a master reads dta from a slave

    4)  combined format

  • 相关阅读:
    Linux常用指令整理
    结构型模式-组合模式(树形结构的处理)
    结构型模式-适配器模式(不兼容结构的协调)
    创建型模式-原型模式(对象的克隆)
    创建型模式-单例模式(确保对象唯一性)
    创建型模式-抽象工厂
    Linux之linux下安装mysql
    关于elipse中maven搭建好后,一直building workspace的问题
    idea配置数据库下载驱动
    idea配置maven以及手动添加webapp目录
  • 原文地址:https://www.cnblogs.com/xinxue/p/5248520.html
Copyright © 2020-2023  润新知