Vedon Video Section III I²C protocol

Source: Internet
Author: User

If the contact hardware is more, you can find that the I²C protocol is often used by us. Only SDA (data) and SCL (clock) are required to build the circuit.

The circuit is simple, but the key is to understand the protocol it prescribes. First, take a look at the timing diagram.

As can be seen, the transmission of data is divided into four main links: S (start signal), start byte (the byte to write), ACK (answer signal),

SR (stop signal). function does not describe, the following how they have a role to describe my opinion.

    1. S (Start signal): When the SCL is high, the SDA is pulled down by a high level, which represents the start of the transfer.
    2. Start byte (bytes to write): SCL period high-low level transform, SDA maintains the bit it wants to transmit at the SCL.
    3. ACK (Answer signal): eight-bit transmission, the CPU abandons the control of the receiver, at this time the sink low level, the representative received data.
    4. SR (Stop signal): SCL is high, SDA is low and the rep stops.

The above is a description of the transmission of a byte, if I want to 24C02 (with 24C02 as an object) an address to write some data, how the signal is transmitted?

The following will be explained by another picture.

This is the data graph when writing an address data, where the level change is not described. From left to right, you should first send a start signal and then send a

Bytes. In this byte, the last seven bits are to select the address of the device, and the final one is to control read and write. So, to write the data, it should be A1 (there seems to be a problem on the picture,

The high byte should not be f). After writing to play a byte, make an answer. After that it is simple to send the address to be written to the memory, the data to be written, the answer. At last

Stop the signal.

Finally, why add a pull resistor on SDA and SCL. This is primarily the function of the pull-up resistor to determine the level state of the line.

Vedon Video Section III I²C protocol

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.