2017年2月2日 星期四

I2C 硬體了解

What is I2C (Inter-IC) ?

  • 它是一種半雙工的串列式 bus
  • 它是一種廣播式的 bus
  • 三種通訊速度
    • Standard is 100 Kbps
    • Fast-mode is 400 Kbps
    • High-speed mode supports speeds up to 3.4 Mbps
  • supports 7-bits and 10-bits address
  • Master-slave communication
  • 每一個 slave 都會給一個特定位址, 對於 7-bits address 只能 0x08 ~ 0x77, 10-bits address 可以設定 0x77 以後
  • 假如 slave address 有相同, 硬體上則可能會使用多工器來切換

    硬體實際接法






    硬體訊號

    •When the bus is free, both lines are HIGH.
    • The data on the SDA line must be stable during the HIGH period of the clock.
    • The HIGH or LOW state of the data line can only change when the clock signal on the SCL line is LOW.





    Start and Stop conditions

    •A HIGH to LOW transition on the SDA line while SCL is HIGH is one such unique case. This situation indicates a START condition.
    • A LOW to HIGH transition on the SDA line while SCL is HIGH defines a STOP condition.
    • START and STOP conditions are always generated by the master.
    • The bus is considered to be busy after the START condition.
    • The bus is considered to be free again a certain time after the STOP condition.



    Data Format
    •Every byte put on the SDA line must be 8-bits long.
    • Each byte has to be followed by an acknowledge bit.




    Link level protocol









    Address table


     Two groups of eight addresses (0000XXX and 1111XXX) are reserved for the purposes







沒有留言:

張貼留言