A kind of i2c device data collection method and its system
A technology for device data and collection methods, applied in the field of data reading, can solve the problems of limited sensor address space, inability to read data correctly, inconvenience, etc., and achieve the effect of overcoming incompatibility and realizing address space expansion.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0034] An I2C device data acquisition system, including a host for reading data from the I2C device, a multiplexer, and at least two I2C address types of I2C devices. The I2C device takes a temperature and humidity sensor as an example, and the temperature and humidity sensor has a class A There are two types of I2C addresses for temperature and humidity sensors, the I2C start address of the A-type sensor is X, and the I2C start address of the B-type sensor is Y. A multiplexer is connected with an I2C device, an I2C interface of the host is connected with the multiplexer, and the host assigns an allocation address to each multiplexer. In addition, the I2C device data collection system also includes directly connected I2C devices connected to the above-mentioned I2C interface, and each directly connected I2C device corresponds to an I2C address. Wherein, the I2C device and / or the directly connected I2C device may be an I2C interface sensor, and in this embodiment, the I2C inter...
Embodiment 2
[0038] An I2C device data collection method, applied to the I2C device data collection system described in Embodiment 1, wherein the host assigns addresses to the multiplexer, and the type of the I2C device connected to each assigned address is known, then each The data reading parameter and data length of the I2C device corresponding to the distribution address, the I2C address are known, the distribution address, the I2C address of the I2C device corresponding to the distribution address, the data reading parameter and the data length of the I2C device corresponding to the distribution address (ie The corresponding relationship of the first preset data length) is pre-stored in the host computer. For example, the I2C device is a temperature and humidity sensor, and there are two types of A-type sensors and B-type sensors. The data length of the sensor is m, the I2C start address is X, the data length of the B-type sensor is n, and the I2C start address is Y. The I2C device da...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


