Unlock instant, AI-driven research and patent intelligence for your innovation.

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.

Active Publication Date: 2021-12-31
卓望数码技术(深圳)有限公司
View PDF15 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The address space of I2C interface sensors is limited; and due to different sensor chip manufacturers, the encoding rules of I2C addresses and data reading methods will be different. At the time of entry, because different sensors will use different host computer software, different types of sensors cannot be connected to the same I2C bus for mixed use, and the data of all sensors cannot be read correctly, which creates compatibility difficulties for the software development of the main device , but also bring a lot of inconvenience to the site construction, urgently need to solve the above problems

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A kind of i2c device data collection method and its system
  • A kind of i2c device data collection method and its system
  • A kind of i2c device data collection method and its system

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an I2C device data acquisition method and its system. The invention uses a multiplexer to connect an I2C device, and an I2C interface of the host is connected to the multiplexer to realize the expansion of the address space, so that the host can access The number of I2C devices is not limited, which overcomes the technical problem of the limited address space of the I2C interface sensor in the prior art; in addition, the I2C device in-position judgment is realized through the data length check, and the data is set according to the type of the I2C device in place Reading parameters is used to realize data reading of I2C devices, so that the I2C device data acquisition method can be compatible with various I2C address types of I2C devices, and overcome the technical problem that host software is incompatible with various I2C interface sensors in the prior art.

Description

technical field [0001] The invention relates to the field of data reading, in particular to an I2C device data acquisition method and system thereof. Background technique [0002] The I2C interface temperature and humidity sensor is one of the most commonly used environmental quantity measurement sensors. It is widely used because of its high precision, simple peripheral circuit, and networking. [0003] In the prior art, the master device can obtain the data information of different sensors by distinguishing the bus address of the I2C interface temperature and humidity sensor as the slave device, refer to figure 1 and figure 2 , wherein, the number of data bytes of a type A I2C interface sensor is m, and the number of data bytes of a type B I2C interface sensor is n. When only Type A I2C interface sensors or Type B I2C interface sensors are networked separately, the process of reading sensor data is as follows: figure 1 and figure 2 As shown, there are i type A I2C in...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G01D21/02
CPCG01D21/02
Inventor 石华功
Owner 卓望数码技术(深圳)有限公司