Check patentability & draft patents in minutes with Patsnap Eureka AI!

Method and system for simulating I2C (Inter-Integrated Circuit) communication

A communication method and technology of a communication system, which is applied in the field of system task scheduling, and can solve problems such as I2C data transmission exceptions and operation command system exceptions

Pending Publication Date: 2022-07-15
FORYOU GENERAL ELECTRONICS
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The invention provides a method and system for simulating I2C communication, which solves the problem that the existing FreeRTOS operating system uses a preemptive task mechanism, so that during the task scheduling process of the simulating I2C communication system, communication interruption causes abnormal I2C data transmission, which in turn leads to operation instructions and even System abnormal technical 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
  • Method and system for simulating I2C (Inter-Integrated Circuit) communication
  • Method and system for simulating I2C (Inter-Integrated Circuit) communication

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] An analog I2C communication method provided by an embodiment of the present invention, such as figure 1 As shown, in this embodiment, steps S1 to S4 are included:

[0042] S1. Set an I2C sending task and configure it as the highest priority;

[0043] In this embodiment, configuring it as the highest priority is specifically: configuring the priority of the I2C sending task to be higher than the priority of the data tasks corresponding to all the I2C slave devices.

[0044] Task states include running, ready, blocked, and suspended.

[0045] In this embodiment, the I2C sending task is configured to have a higher priority than the data tasks corresponding to all I2C slave devices, so as to ensure that in the RTOS, only one task is running at any time. When the data task corresponding to one of the slave devices calls the analog I2C module to send I2C data, even if the data tasks of other slave devices are ready, the current I2C data transmission cannot be interrupted. O...

Embodiment 2

[0061] The reference numerals in the drawings in the description in this embodiment include: master control device 1, slave device 1 to slave device n, data task module 1 to data task module n, I2C sending task module 2, analog I2C module 3, I / O1, I / O2.

[0062] The embodiment of the present invention also provides an analog I2C communication system, see figure 2 , including master device 1 and multiple slave devices (such as figure 2 Slave device 1 to slave device n (n>1)); the master control device 1 includes a plurality of data task modules corresponding to the slave devices one-to-one, as well as I2C sending task module 2, analog I2C module 3 and I / O interface ; The data task module, I2C sending task module 2, and analog I2C module 3 are connected in turn, and the analog I2C module 3 is connected to the slave device through the I / O interface;

[0063] The data task module is used to generate I2C data corresponding to the slave device; such as figure 2 Data task modu...

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 relates to the technical field of system task scheduling, and provides an I2C (Inter-Integrated Circuit) communication simulation method and system, which are improved on the basis of an original preemptive task mechanism, a sending rule of an I2C sending task is set to be multi-round single-frame data sending, and only one frame of data is sent in each round; and when the target to-be-handled task with the priority higher than that of the current to-be-handled task is detected, the target to-be-handled task is executed after the single-frame data of the round is sent, so that when the slave devices perform simulated I2C communication, the communication between the slave devices with the low priority and the master controller is not randomly interrupted by the slave devices with the high priority, and the communication efficiency is improved. In the data sending process, single-frame data is complete, and the high-priority target to-do task can be quickly executed.

Description

technical field [0001] The invention relates to the technical field of system task scheduling, in particular to an analog I2C communication method and system. Background technique [0002] When the high-level task obtains resources and enters the ready state, the low-level task exits from the execution state to the ready state, allowing the high-level task to execute, which is called a preemptive task scheduling mechanism. [0003] In the existing analog I2C technology, the programs corresponding to each I2C slave device respectively call the analog I2C module to send data to the corresponding I2C slave device, which is no problem in the time slice single-loop software. [0004] However, the preemptive task mechanism is used in the FreeRTOS operating system, because the programs corresponding to each I2C slave device have different priorities. Therefore, it is possible that when program 1 (such as radio) is sending I2C data, the system schedules a higher priority program 2 ...

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 Applications(China)
IPC IPC(8): G06F9/48G06F13/42
CPCG06F9/4881G06F13/4282
Inventor 张国柱
Owner FORYOU GENERAL ELECTRONICS
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More