TechnologiesElectronics

I2C interface: a description in Russian

In modern household appliances, industrial electronics and various telecommunications equipment, you can often meet similar solutions, although products can be virtually unrelated. For example, almost every system includes the following:

  • A certain "smart" control node, which in the majority of cases is a single-chip microcomputer;
  • Nodes of general purpose like buffers LCD, RAM, I / O ports, EEPROM or specialized data converters;
  • Specific nodes, including schemes for digital tuning and signal processing for video and radio systems.

How to optimize their application?

In order to maximize the use of such common solutions for the benefit of designers and manufacturers themselves, and to improve the overall performance of various equipment and simplify the circuitry used, Philips has set itself the goal of developing an extremely simple two-wire bi-directional bus providing the most productive inter-microcircuit control. This bus provides data transfer via the I2C interface.

To date, the range of this manufacturer includes more than 150 CMOS, as well as bipolar devices that are compatible with I2C and designed to work in any of the listed categories. It should be noted that the I2C interface is initially built-in to all compatible devices, due to which they can without any difficulties keep in touch with each other when using a special bus. Due to the use of such a design solution, it has been possible to solve a sufficiently large number of coupling problems of various equipment, which is quite typical for the development of digital systems.

Main advantages

Even if you look briefly at the description of UART, SPI, I2C interfaces, you can distinguish the following advantages of the latter:

  • To work, you need only two lines - synchronization and data. Any device that connects to such a bus, in the future can be programmed to address a completely unique address. At any time, there is a simple relationship that allows the master to operate as a master transmitter or master receiver.
  • This bus provides for the ability to have several leaders at the same time, providing all necessary means for determining collisions, as well as arbitration, which allows to prevent data corruption in the event that two or more leaders start simultaneously transmitting information. In the standard mode, only serial eight-bit data is transmitted at a speed of not more than 100 kbit / s, and in fast mode this threshold can be increased fourfold.
  • In chips, a special built-in filter is used, which effectively suppresses bursts and ensures maximum data integrity.
  • The maximum possible number of chips that can be connected to one bus is limited only by its maximum possible capacity of 400 pF.

Advantages for designers

The I2C interface, as well as all compatible microcircuits, significantly speeds up the development process, from the functional diagram to its final prototype. It should be noted that due to the possibility of connecting such microcircuits directly to the bus without the use of all possible additional circuits, there is scope for further modernization and modification of the prototype system by disconnecting and connecting various devices from the bus.

There are a lot of advantages that distinguish the I2C interface. The description, in particular, allows you to see the following advantages for designers:

  • The blocks on the functional diagram fully correspond to the microcircuits, and at the same time a sufficiently rapid transition from functional to principal is ensured.
  • There is no need to develop bus interfaces, because the bus is already integrated into special chips.
  • Integrated protocols for the transfer of information and addressing devices allow the system to be fully programmable.
  • The same types of chips can be used in completely different applications if necessary.
  • Total development time is significantly reduced due to the fact that designers can quickly get acquainted with the most frequently used functional blocks, as well as all kinds of microcircuits.
  • If desired, you can add or remove chips from the system, and at the same time do not have much influence on other equipment connected to one bus.
  • The total time of software development can be significantly reduced due to the fact that it is allowed to use the library of reusable software modules.

Among other things, it is worth noting the extremely simple procedure for diagnosing the failures and further debugging, which differs the I2C interface. The description says that, if necessary, you can instantly monitor even minor deviations in the operation of such equipment without any difficulty and, accordingly, take appropriate measures. Also it is worth noting that designers receive special solutions, which, in particular, are quite attractive for various portable equipment and systems providing battery power, using the I2C interface. The description in Russian also indicates that its use makes it possible to provide the following important advantages:

  • A sufficiently high degree of resistance to any arising interference.
  • Extremely low energy consumption.
  • The widest range of supply voltage.
  • Wide temperature range.

Advantages for technologists

It should be noted that not only designers, but also technologists quite often recently began to use a specialized I2C interface. The description in Russian indicates a rather wide range of merits that are provided to this category of specialists:

  • A standard two-wire serial bus with this interface allows to minimize the connections between the microcircuits, that is, they have fewer contacts and fewer tracks, so that the printed circuit boards become less expensive and have much smaller dimensions.
  • Fully integrated I2C interface LCD1602 or some other option completely eliminates the need for address decoders, as well as other external small logic.
  • It is envisaged to use simultaneously several hosts on such a bus, thereby significantly accelerating the testing and subsequent configuration of equipment, since the bus can be connected to the computer of the assembly line.
  • The availability of interfaces compatible with this interface in VSO, SO and specialized DIL-package allows to significantly reduce the requirements for the size of the device.

This is just a short list of the advantages that distinguish the I2C interface of the LCD1602 and others. In addition, compatible chips allow to significantly increase the flexibility of the system used, providing extremely simple design of various equipment options, as well as relatively easy upgrades to further support development at the modern level. Thus, it is possible to develop a whole family of different equipment, using as a basis a certain basic model.

Further equipment upgrades and expansion of its functions can be carried out by means of a standard connection to the bus of the corresponding chip using the Arduino 2C interface or some other available list. If a larger ROM is required, then in this case it will be sufficient to select another microcontroller having an increased ROM capacity. Since the updated chips, if necessary, can completely replace the old ones, one can easily add new properties to the equipment or increase its overall performance by means of the usual disconnection of the obsolete chips and their further replacement with newer equipment.

ACCESS.bus

Due to the fact that the bus has two-wire nature, and also the possibility of program addressing, for ACCESS.bus one of the most ideal platforms is the I2C interface. Specification (the description in Russian is presented in the article) of this device makes it a much cheaper alternative to the actively used RS-232C interface for connecting various peripherals to computers using a standard four-pin connector.

Introduction to the specification

For modern 8-bit control applications that use microcontrollers, it is possible to install some design criteria:

  • The complete system in the majority of cases includes one microcontroller and other peripheral devices, including memory and all kinds of I / O ports;
  • The total cost of combining different devices within one system should be minimized;
  • The system entrusted with management functions does not require the provision of high-speed information transfer;
  • The overall efficiency directly depends on the equipment chosen, and also on the nature of the connecting bus.

To develop a system that fully meets the above criteria, you need to use a bus in which the serial I2C interface will be used. Despite the fact that the serial bus does not have parallel bandwidth, it needs fewer connections, and fewer chip contacts. At the same time, do not forget that the bus includes not only the connecting wires, but also the various procedures and formats necessary to provide communication within the system.

Devices for communication using I2C software emulation or a corresponding bus must have a specific protocol that can prevent various collision, loss or blocking of information. Fast devices should be able to communicate with slow ones, and the system should not depend on the equipment connected to it, because otherwise all improvements and modifications can not be used. It is also necessary to develop a procedure by which it is really possible to determine which device is currently controlling the bus and at what point in time. In addition, if different devices having different clock frequencies are connected to the same bus, you need to determine the source of its synchronization. All of these criteria correspond to the I2C interface for AVR and any others from this list.

Basic concept

The I2C bus can support any chip technology used. The interface I2C LabVIEW and others similar to it provide for the use of two lines for the transfer of information - data and synchronization. Any device connected in this manner is recognized by a unique address, regardless of whether it is a LCD buffer, microcontroller, memory or keyboard interface, and can act as a receiver or transmitter depending on for what purpose This equipment is intended.

In the majority of cases, the LCD buffer is a standard receiver, and the memory can not only receive but also transmit various data. Among other things, in the process of moving information, instruments can be classified as slaves and hosts.

In this case, the master is called the device, which initiates data transmission, and also generates synchronization signals. At the same time, any addressable devices will be considered slaves to it.

The I2C communication interface provides for the presence of several leading, that is, more than one device capable of managing the bus, is able to connect to it. The possibility of using more than one microcontroller in one bus indicates that more than one master can be sent at a certain point in time. To eliminate potential chaos, which risks to appear in the event of such a situation, a specialized arbitration procedure is developed, which uses the I2C interface. Expanders and other devices provide for connecting devices to the bus by the so-called rule of installation I.

Generation of the clock signal is the responsibility of the master, and each of them generates its own signal during data transfer, and in the future it can be changed only if it is "pulled" by the slow slave device or other master in the event of a collision.

Common parameters

Both SCL and SDA are bi-directional lines that are connected to the positive power source using a pull-up resistor. When the tire is completely free, each line is in a high position. The output stages of devices that are connected to the bus must be open-drain or open collector so that the editing function can be provided. Information via the I2C interface can be transmitted at a speed of no more than 400 kbit / s in fast mode, while in standard speed Does not exceed 100 kbit / s. The total number of devices that can be simultaneously connected to the bus depends only on one parameter. This is the capacity of the line, which is not more than 400 pF.

the confirmation

Acknowledgment is a mandatory procedure in the data transfer process. The master generates a corresponding synchronization pulse, while the transmitter releases the SDA line during this clock as a confirmation. After this, the receiver must ensure a stable hold of the SDA line during a high state of the synchronous pulse in a stably low state. In this case, you must always take into account the time of installation and retention.

In the predominant majority of cases, the addressed receiver must necessarily generate a confirmation after each byte received, and the only exception here is those situations where the start of the packet includes the CBUS address.

If the slave receiver does not have the capability to send a confirmation of its own address, it is necessary to leave the data line in a high state, and after that the master will be able to issue a "Stop" signal that will interrupt the sending of all information. If the address has been confirmed, but the slave can not take any more data for a long time, the parcel must also be interrupted. To do this, the slave does not acknowledge the next received byte and simply leaves the data line in high state, causing the master to generate a Stop signal.

If, in the transfer procedure, a master-receiver is provided, then in that case it must inform the slave about the end of the transmission, and this is done by not confirming the last received byte. In this case, the slave-transmitter immediately releases the data line so that the master can issue a "Stop" signal or repeat the "Start" signal again.

To test the hardware performance, you can try to enter the standard sketch examples for the I2C interface in Arduino, as in the photo above.

Arbitration

The host may start sending information only after the bus is completely freed, but two or more drivers can generate a start signal at the time of minimum retention. This eventually leads to a certain "Start" signal on the bus.

The work of arbitration is carried out on the SDA bus at the time when the SCL bus is in a high state. If one of the master starts sending a low level to the data line, but the other one is high, then the latter completely disconnects from it, because the SDL state is not corresponding to the high state of its internal line.

Arbitration can be continued for several bits. Due to the transfer of the address first, and then the data, the arbitration may have a duration before the end of the address, and if the same device is addressed by the master, then in the arbitration will take part and various data. Due to this arbitration scheme, if any collisions occur, the data will not be lost.

If the host loses arbitration, then in this case it can issue synchronization pulses in the SCL to the end of the byte, during which the access was lost.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.