Analog.com Analog Dialogue Wiki 简体中文
EngineerZone
EngineerZone
  • Log In
  • Site
  • Search
  • User
  • Support

    Popular Forums

    • RF and Microwave
    • Power Management
    • Video
    • FPGA Reference Designs
    • Precision ADCs
    • Linux Software Drivers
    • SigmaDSP Processors & SigmaStudio Dev. Tool

    Product Forums

    • A2B
    • Amplifiers
    • Analog Microcontrollers
    • Clock and Timing
    • Data Converters
    • Direct Digital Synthesis (DDS)
    • Energy Monitoring and Metering
    • Interface and Isolation
    • MEMS Inertial Sensors
    • Processors and DSP
    • Switches/Multiplexers
    • Temperature Sensors
    • Voltage References
    View All

    Application Forums

    • Audio
    • Automated Test Equipment (ATE)
    • Condition-Based Monitoring
    • Depth, Perception & Ranging Technologies
    • Embedded Vision Sensing
    • Optical Sensing
    • Precision Technology Signal Chains
    • Video
    • Wireless Sensor Networks Reference Library

    Design Center Forums

    • ACE Evaluation Software
    • ADEF System Platforms
    • Design Tools and Calculators
    • FPGA Reference Designs
    • Linux Software Drivers
    • Microcontroller no-OS Drivers
    • Reference Designs
    • Signal Chain Power (SCP)
    • Software Interface Tools
    • System Demonstration Platform (SDP) Support
  • Learn

    Recent Discussions

    • Pluto + GNURADIO frequency change
    • Pluto SDR
    • pluto sdr pyadi-iio continous iq recording
    • attribute error
    • gps-sdr-sim is not working with my ADALM-PLUTO

    Places

    • ADI Education Home
    • ADI Education China
    • ADI Education India
    • ADI Education Philippines
    • StudentZone (Analog Dialogue)
    • Virtual Classroom

    Latest Webinars

    • Webinar Biasing Circuits for GaN and GaAs RF Amplifiers
    • Webinar Improving Switch-Mode Power Supplies Using Noise Cancelling Technology
    • Webinar Accelerate Your Design With a 2 to 24 GHz Wideband Transceiver Reference Design
    • How to Design an Optimized Motion Control System for Intelligent Edge Based Surveillance Camera
    • How to Enhance High Precision Current Sensing Systems
    View All
  • Community Hub

    Challenge Yourself!

      KCC's Quizzes: Buffers and Fan Out
    View All

    Places

    • Community Help
    • Logic Lounge

    Resources

    • EZ Code of Conduct
    • Getting Started Guide
    • ADI: Words Matter
    • Community Help Videos
    View All
  • Blogs

     

    How To Design Fieldbus Agnostic Smart Factory Sensors

     

    You Passed EMC Testing… But Wait, Is There More?

    Latest Blogs

    • The 5 Things You Need to Know about RF Matching Networks
    • Does Reliability Prediction Uncertainty Justify Mandating Two Channel Safety?
    • An Inside Look at 2022
    • Meet the Person Behind the Quizzes
    • Updates Required: Why Newer is Better
    Read All Blogs

    ADI Blogs

    • EZ Spotlight
    • The Engineering Mind
  • Partners

    Electronic Design Services - PartnerZone

    • Boston Engineering
    • Calian, Advanced Technologies
    • Colorado Engineering Inc. (DBA CAES AT&E)
    • Clockworks Signal Processing
    • Epiq Solutions
    • Fidus
    • PalmSens
    • Richardson RFPD
    • Tri-Star Design, Inc.
    • VadaTech
    • Vanteon
    • X-Microwave
    View All
Video
Video
Documents I2C Protocol Sequence
  • Q&A
  • File Uploads
  • Docs/ FAQs
  • Members
  • Tags
  • More
  • Cancel
  • FREE RUN
  • +AD724: FAQ
  • +AD725: FAQ
  • +AD7441A: FAQ
  • +AD8122: FAQ
  • +AD8380: FAQ
  • +AD8381: FAQ
  • +AD9388A: FAQ
  • +AD9389: FAQ
  • +AD9880: FAQ
  • +AD9882: FAQ
  • +AD9884A: FAQ
  • +AD9888: FAQ
  • +AD9889B: FAQ
  • +AD9978: FAQ
  • +AD9981: FAQ
  • +AD9984A: FAQ
  • +AD9985A: FAQ
  • +AD9994: FAQ
  • +ADA4891: FAQ
  • +ADDI7004: FAQ
  • +ADI Video Parts: FAQ
  • +ADV202: FAQ
  • +ADV212: FAQ
  • +ADV3002: FAQ
  • +ADV3224/25/28/29: FAQ
  • +ADV7123: FAQ
  • +ADV7125: FAQ
  • +ADV7128: FAQ
  • +ADV7171: FAQ
  • +ADV7174: FAQ
  • +ADV7179: FAQ
  • +ADV7180: FAQ
  • +ADV7180W: FAQ
  • +ADV7181C: FAQ
  • +ADV7181D: FAQ
  • +ADV7182: FAQ
  • +ADV7183B: FAQ
  • +ADV7184: FAQ
  • +ADV7185: FAQ
  • +ADV7188: FAQ
  • +ADV7202: FAQ
  • +ADV7280: FAQ
  • +ADV7281: FAQ
  • +ADV7282: FAQ
  • +ADV7283: FAQ
  • +ADV728x: FAQ
  • +ADV7341: FAQ
  • +ADV7343: FAQ
  • +ADV734X: FAQ
  • +ADV7390: FAQ
  • +ADV7393: FAQ
  • +ADV739x: FAQ
  • +ADV7401: FAQ
  • +ADV7403: FAQ
  • +ADV7441A: FAQ
  • +ADV7480: FAQ
  • +ADV7481: FAQ
  • +ADV7482: FAQ
  • +ADV749x: FAQ
  • +ADV7510: FAQ
  • +ADV7511: FAQ
  • +ADV7513: FAQ
  • +ADV7520: FAQ
  • +ADV7604: FAQ
  • +ADV7610: FAQ
  • +ADV7611: FAQ
  • +ADV7612: FAQ
  • +ADV7613: FAQ
  • +ADV7614: FAQ
  • +ADV7619: FAQ
  • +ADV7622: FAQ
  • +ADV7623: FAQ
  • +ADV7625: FAQ
  • +ADV7626: FAQ
  • +ADV7627: FAQ
  • +ADV7630: FAQ
  • +ADV7800: FAQ
  • +ADV7802: FAQ
  • +ADV7842: FAQ
  • +ADV7844: FAQ
  • +ADV7850: FAQ
  • +ADV78xx: FAQ
  • +adv8003: FAQ
  • +ADV8005: FAQ
  • +Advantiv: FAQ
  • +AN-1191: FAQ
  • +analog input muxing: FAQ
  • +Apple TV: FAQ
  • +Customer hardware validation scripts: FAQ
  • +CVBS: FAQ
  • +Decoder Product: FAQ
  • +DVP Evaluation Software: FAQ
  • +EVAL-MELODY: FAQ
  • +HDCP-Enabled Parts: FAQ
  • +HDMI: FAQ
  • -I2C: FAQ
    • I2C Protocol Sequence
    • I2C readback not reading what I have written !
    • I2C read and Write Sequence
    • My I2C writes seem to work, but when I read the value back it's not what I wrote.  What happened?
    • When I try to write to I2C registers of the ADI HDMI transmitter, the register values do not change.  What is going on?
  • +PCB Trace Impedance Calculator: FAQ
  • +VESA Standards: FAQ
  • +xtal Load Caps: FAQ

I2C Protocol Sequence

I2C require two bus line – SDA and SCL
Most I2C devices can communicate at 100 kHz or 400 kHz.

Start/Stop Condition:
Start and Stop condition are always generated by the master.
Each I2C command initiated by master device starts with a START condition and ends with a STOP condition. For both conditions SCL has to be high. A high to low transition of SDA is considered as START and a low to high transition as STOP.

Generally our i2c driver perform the following sequence:
    Start condition – write operation (sub-address)-start condition- Read operation (data)-stop condition.
    Need to send STOP bit when the whole process reading is done. To terminate a read/write sequence a stop signal must be sent.

Please make sure with below Read/Write sequences,
a.Write Sequence
 1) Send the start condition
 2) Send the slave address
 3) Check for the acknowledge
 4) Send the sub-address to be written to
 5) Check for the acknowledge from
 6) Send the data to write to specified sub address
 7) Check for the acknowledge
 8) If No-acknowledge send the stop condition
 9) Send a stop condition

b. Read Sequence
1) Send the start condition
2) Send the slave address
3) check for the acknowledge
4) Send the sub-address to be read from
5) check for the acknowledge
6) Send the start condition
7) Send the slave address
8) check for the acknowledge
9) If No-acknowledge send the stop condition
10) If acknowledged read the data from specified sub-address
12) Send a No-Acknowledge
13) Send a stop condition

Here we can find the more details about i2c bus specification and also timing related details I2C Bus Specification and User Manual

https://i2c.info/i2c-bus-specification

Note: Some i2c drivers work with 7 bit addressing, if your software/tool is using 7-bit i2c address, In that case, we need to right shift the 8 bit map address to one.
For example: 0x98 IO Map   –   8 bit address
                 0x98>>1 =0x4C – 7 bit address
Please crosscheck: 0x98 is an 8-bit I2C address. In other words, it assumes the software/tool is using 8-bit I2C addresses.
In-case if your software/tool is using 7-bit I2C addresses (fairly common), you should use 0x4C instead.

NACK(No ACK):  I2C reset is the only write that will no ACK back. The reset bit resets the I2c engine before it has a chance to ACK back.The I2C master controller will receive a no acknowledge condition on the ninth clock cycle when chip Reset is implemented.


Thanks,
Poornima

  • Share
  • History
  • More
  • Cancel
Related
Recommended
 
Social
Quick Links
  • About ADI
  • Partners
  • Analog Dialogue
  • Careers
  • Contact us
  • Investor Relations
  • News Room
  • Quality & Reliability
  • Sales & Distribution
  • Analog Garage
Languages
  • English
  • 简体中文
  • 日本語
  • Руccкий
Newsletters

Interested in the latest news and articles about ADI products, design tools, training and events? Choose from one of our 12 newsletters that match your product area of interest, delivered monthly or quarterly to your inbox.

Sign Up
Switch to mobile view
Analog Logo
© 1995 - 2023 Analog Devices, Inc. All Rights Reserved 沪ICP备09046653号-1
  • ©
  • 1995 - 2023 Analog Devices, Inc. All Rights Reserved
  • 沪ICP备09046653号-1
  • Sitemap
  • Privacy & Security
  • Privacy Settings
  • Terms of use
EngineerZone Uses cookies to ensure you get the best experience in our community. For more information on cookies, please read our Privacy & Security Statement.