Optimization of Dynamic Address Mapping for Multi-I2C in SoC

Optimization of Dynamic Address Mapping for Multi-I2C in SoC

For many years, I have been troubled by a reuse issue in C, such as when we establish an I2C IP register address offset, and there are multiple I2Cs on the SoC, each with irregular offsets. How can we solve the problem of calling this function with different offsets for multiple I2Cs in a single … Read more

Understanding SPI, I2C, UART, I2S, GPIO, SDIO, and CAN: Can You Differentiate Them?

Understanding SPI, I2C, UART, I2S, GPIO, SDIO, and CAN: Can You Differentiate Them?

Buses, buses, you always get caught up in them. All signals in this world are the same, but there are thousands of buses, which can be quite a headache. In general, there are three types of buses: internal buses, system buses, and external buses. The internal bus connects various peripheral chips within the microcomputer to … Read more

Understanding I2C: Principles and Protocols

Understanding I2C: Principles and Protocols

I2C is a widely used bus, generally used to connect various slave devices, such as EEPROM memory, temperature and humidity sensors, gyroscopes, etc.Mastering I2C is considered a fundamental skill, and it is essential for newcomers in the industry to learn it systematically.1. A Brief History of I2C In 1980, Philips began developing a communication bus … Read more

Embedded Linux Driver Development Secrets: Detailed Explanation of GPIO, I2C, and SPI Drivers

Embedded Linux Driver Development Secrets: Detailed Explanation of GPIO, I2C, and SPI Drivers

Do you want to delve into the Linux kernel and write your own drivers? This tutorial will take you from scratch to mastering the core skills of Linux driver development, and through rich practical cases, you will quickly acquire the ability to write various types of drivers! 1. Preparation: Environment Setup and Tool Installation This … Read more

Realistic Animation Demonstrating the Communication Processes of I2C, SPI, and UART

So far, protocols such as I2C, SPI, and UART remain the most commonly used communication protocols in electronic embedded devices. In this article, we will analyze these three protocols to provide a clear and intuitive understanding of their functions, advantages, and limitations, supplemented with GIF animations. I2C Protocol I2C is a serial communication protocol typically … Read more

Device Initialization Order in Zephyr

Device Initialization Order in Zephyr

On a motherboard, there are numerous devices, and the order of their initialization is critical. For example, on an ESP32, an I2C device must be initialized before other devices that depend on it. In Zephyr, the initialization order of devices is controlled through device initialization levels, priorities, and the device tree. Initialization Methods There are … Read more

Principles, Differences, and Connections of the Three Major Embedded Protocols: UART, SPI, and I²C

Principles, Differences, and Connections of the Three Major Embedded Protocols: UART, SPI, and I²C

1. UART (Universal Asynchronous Receiver/Transmitter) The host and slave must connect at least three wires: RX, TX, and GND. TX is used for sending data, while RX is for receiving data (the transmission and reception are not on the same line, hence it is full-duplex). Basic Characteristics: Asynchronous Communication: No shared clock signal, relies on … Read more

When Not to Use I2C

When Not to Use I2C

I2C, as the most convenient and simplest onboard communication method, has certain scenarios where it is not suitable, and there are timing considerations to be aware of. Hardware Interface • Simple hardware interface with only two wires • SCL (Serial Clock) / SDA (Serial Data) • Low communication speed and low communication requirements • Fast: … Read more

Digital Power Software Interview: How to Answer Questions About the I2C Protocol in Microcontrollers?

Digital Power Software Interview: How to Answer Questions About the I2C Protocol in Microcontrollers?

Digital power modules utilize various communication protocols such as I2C, SPI, CAN, UART, etc., as well as interaction protocols based on these, such as CANopen, SAE 1939, SMbus, PMbus, Modbus, etc. This article simulates a Q&A session regarding I2C communication knowledge. Question 1: What are the components of I2C communication, and what are their functions? … Read more

Embedded Development in C: I2C Communication Protocol

Embedded Development in C: I2C Communication Protocol

Embedded Development in C: I2C Communication Protocol Introduction I2C (Inter-Integrated Circuit) is a widely used serial communication protocol, commonly utilized for communication between microcontrollers and various peripherals. It was developed by Philips in the early 1980s, primarily for short-distance, low-speed data transmission. I2C offers advantages such as simplicity, flexibility, and multi-master support, making it well-suited … Read more