CN101425877A - Method for inter-module communication - Google Patents

Method for inter-module communication Download PDF

Info

Publication number
CN101425877A
CN101425877A CNA2008103058437A CN200810305843A CN101425877A CN 101425877 A CN101425877 A CN 101425877A CN A2008103058437 A CNA2008103058437 A CN A2008103058437A CN 200810305843 A CN200810305843 A CN 200810305843A CN 101425877 A CN101425877 A CN 101425877A
Authority
CN
China
Prior art keywords
data
packet
module
communication
communication interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2008103058437A
Other languages
Chinese (zh)
Inventor
王建国
黄葛玲
钟怡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CNA2008103058437A priority Critical patent/CN101425877A/en
Publication of CN101425877A publication Critical patent/CN101425877A/en
Pending legal-status Critical Current

Links

Landscapes

  • Communication Control (AREA)

Abstract

The invention relates to the multimedia technology, and solves the problems that no error detecting mechanism is available in communication among modules, so that the command and data can not be divided. The invention provides a method for communicating among modules and adopts the technical proposal that firstly, each module is provided with a pre-reserved general communication interface; in use, the modules need to communicate are connected by the general communication interface, and corresponding parameters of the general purpose communication interface are set so as to cause the modules to communicate normally with each other through the general communication interface. The communication data are transmitted and received in form of data packet. The data packet comprises a packet header, the data content and an end bit, wherein the packet header comprises an initial identifier, data types, the data size and a parity bit. After receiving the data packet, the module checks the data packet according to the packet header in the data packet; and if error occurs, no data can be processed. The invention has the advantages that the efficiency of the system can be enhanced to avoid confusion so as to be suitable for the communication among multimedia modules.

Description

A kind of method of inter-module communication
Technical field
The present invention relates to multimedia technology, particularly the technology of communication between multi-media module.
Background technology
The E-consumer series products makes rapid progress at present, constantly the new product of releasing has increased many new functions, but new product all is identical with the most of function of original product, have only partial function to have and improve and increase, for product design, new product can redesign, and also can increase new functional module on original design basis.Redesign new product, then all needs of work start anew, and the structure of choosing software systems from hardware platform requires a great deal of time and capital.And newly-increased function much can adopt modularized design, so on original design basis, increase new functional module, then can save a large amount of time and efforts, hardware designs and software architecture do not need big modification, only need new functional module is incorporated in the system, communications protocol by appointment and mode interactive information, finish communication and control etc., and just simple order and the data of sending of existing inter-module communication, there is not error-detection mechanism, if order is in the same place with data mixing, just can't effectively make a distinction, if primary module and a plurality of inter-module communication, several modules have identical order, in the time of data, just can't effectively recognize order and data which intermodule the end is, and the module that increases is many more, and the order of transmission and data are many more, just needs to increase different definition, the condition that then needs to judge will be many more, influence the efficient of system.
Summary of the invention
Technical problem to be solved by this invention does not have error-detection mechanism in order to solve existing inter-module communication exactly, can't separately order the shortcoming with data, and a kind of method of inter-module communication is provided.
The present invention solves its technical problem, and the technical scheme of employing is that a kind of method of inter-module communication is characterized in that, may further comprise the steps:
A. on each module, reserve general-purpose communication interface, will need the module of communication to connect during use by general-purpose communication interface;
B. set the relevant parameter of general-purpose communication interface, so that can carry out normal communication by general-purpose communication interface between the module;
C. communication data all adopts the form of packet to carry out the transmission and the reception of data, and packet comprises packet header, data content, stop bits, and its middle wrapping head comprises origin identification, data type, size of data, check digit;
D. module is tested to packet according to the packet header in the packet after receiving packet, if wrong, then disregards;
Concrete, the described general-purpose communication interface of step a is the UART mouth;
Further, the described relevant parameter of step b comprises baud rate, parity check, data bit, position of rest, data flow con-trol.
The invention has the beneficial effects as follows, can when intermodule carries out communication, packet be tested, and distinguish order and data that the efficient of raising system is also avoided confusion by the packet header in the packet by above-mentioned steps.
Description of drawings
Fig. 1 is the system flow chart of embodiment.
Embodiment
Below in conjunction with drawings and Examples, describe technical scheme of the present invention in detail.
The invention provides a kind of method of inter-module communication, at first on each module, reserve general-purpose communication interface, to need the module of communication to connect during use by general-purpose communication interface, and set the relevant parameter of general-purpose communication interface, so that can carry out normal communication by general-purpose communication interface between the module, communication data all adopts the form of packet to carry out the transmission and the reception of data, packet comprises packet header, data content, stop bits, its middle wrapping head comprises origin identification, data type, size of data, check digit, module is after receiving packet, according to the packet header in the packet packet is tested,, then disregard if wrong.
Embodiment
This routine general-purpose communication interface is an example with the UART mouth, reserves the UART mouth on each module, will need each module of communication to interconnect its system flow such as Fig. 1 by the UART mouth.
According to actual needs, intermodule sets baud rate (Baud Rate), parity check (Parity), data bit (Data bits), position of rest (Stop bits), the data flow con-trol parameters such as (Flow Control) of UART, so that can carry out normal communication by UART.
Communication data all adopts the form of packet to carry out the transmission and the reception of data, packet is made up of packet header, data content, stop bits three parts, wherein data content is an information packet, be used for realizing various functions, concrete function and data, can carry out self-definedly according to the actual needs, be used for carrying out the transmission etc. of the mutual and order of data, the scope of data length is 0 to 26; Stop bits is the end mark of packet, takies a Byte, gets fixed value 0xFF; Packet header adopts the data of fixed size to form, comprise origin identification, data type, size of data, check digit, origin identification is fixed, it is the beginning flag of a Frame, if this sign of the data-bag lost of being received, prove that so this packet is invalid, to not do any processing, the type of data type unlabeled data, be used for determining the type of various data, can be used to indicate is information interaction or control command etc., can define according to actual needs and realize, size of data is to be used for the size of unlabeled data content, can relatively come the integrality of specified data content according to the size of this value and the actual data content of receiving, check digit is to be used for the complete validity of checking data bag, the calculation check position is that the original position BYTEO from packet begins to finish to stop bits, just earlier with checksum location 0, one and S will be obtained then after all byte additions, check digit=0xFF-S+1, with being 0 with value after each the data addition in the packet,, then be correct if all bit data add up to 0 in the packet, otherwise show that the packet of receiving is wrong, then disregard.
Because the software engineering in the technical solution of the present invention all belongs to this area routine techniques, no longer describe in detail herein.Those of ordinary skill in the art according to foregoing description, can adopt various software approachs to realize technical scheme of the present invention, and it all belongs to protection scope of the present invention.

Claims (3)

  1. The method of [claim 1] a kind of inter-module communication is characterized in that, may further comprise the steps:
    A. on each module, reserve general-purpose communication interface, will need the module of communication to connect during use by general-purpose communication interface;
    B. set the relevant parameter of general-purpose communication interface, so that can carry out normal communication by general-purpose communication interface between the module;
    C. communication data all adopts the form of packet to carry out the transmission and the reception of data, and packet comprises packet header, data content, stop bits, and its middle wrapping head comprises origin identification, data type, size of data, check digit;
    D. module is tested to packet according to the packet header in the packet after receiving packet, if wrong, then disregards.
  2. [claim 2] is characterized in that according to the method for the described a kind of inter-module communication of claim 1, and the described general-purpose communication interface of step a is the UART mouth.
  3. [claim 3] is characterized in that according to the method for the described a kind of inter-module communication of claim 2, and the described relevant parameter of step b comprises baud rate, parity check, data bit, position of rest, data flow con-trol.
CNA2008103058437A 2008-11-28 2008-11-28 Method for inter-module communication Pending CN101425877A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008103058437A CN101425877A (en) 2008-11-28 2008-11-28 Method for inter-module communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008103058437A CN101425877A (en) 2008-11-28 2008-11-28 Method for inter-module communication

Publications (1)

Publication Number Publication Date
CN101425877A true CN101425877A (en) 2009-05-06

Family

ID=40616238

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008103058437A Pending CN101425877A (en) 2008-11-28 2008-11-28 Method for inter-module communication

Country Status (1)

Country Link
CN (1) CN101425877A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104440A (en) * 2009-12-18 2011-06-22 北京华控技术有限责任公司 Method for implementing communications between intelligent actuating mechanisms and field buses
CN103901839A (en) * 2014-03-04 2014-07-02 清华大学 Communication method and system of unmanned aerial vehicle
CN104486034A (en) * 2014-12-08 2015-04-01 江西洪都航空工业集团有限责任公司 RS422/485 serial port communication data packaging method
CN111399435A (en) * 2020-03-20 2020-07-10 重庆成峰水务工程有限责任公司 Intelligent pump room data acquisition terminal

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104440A (en) * 2009-12-18 2011-06-22 北京华控技术有限责任公司 Method for implementing communications between intelligent actuating mechanisms and field buses
CN103901839A (en) * 2014-03-04 2014-07-02 清华大学 Communication method and system of unmanned aerial vehicle
CN103901839B (en) * 2014-03-04 2018-02-09 清华大学 The communication means and system of unmanned plane
CN104486034A (en) * 2014-12-08 2015-04-01 江西洪都航空工业集团有限责任公司 RS422/485 serial port communication data packaging method
CN104486034B (en) * 2014-12-08 2017-12-01 江西洪都航空工业集团有限责任公司 A kind of RS422/485 serial port communication datas group bag method
CN111399435A (en) * 2020-03-20 2020-07-10 重庆成峰水务工程有限责任公司 Intelligent pump room data acquisition terminal

Similar Documents

Publication Publication Date Title
CN101404556B (en) One-wire bus communication method
CN102868584B (en) Synchronization time-division multiplexing bus communication method adopting serial communication interface
CN102780705B (en) Ethernet-(controller area network) CAN protocol converter
CN109379264B (en) Multi-board card communication equipment, method and system based on CAN2.0
CN105975424B (en) A kind of principal and subordinate's serial communication protocol
CN202190284U (en) Protocol converter for CAN bus and SpaceWire bus
CN110990312B (en) Chip-level data communication method for detection while drilling
CN103051414A (en) Serial communication error correction method and system
CN101425877A (en) Method for inter-module communication
CN107741915A (en) A kind of FPGA plate level communicators and communication means based on SDIO interfaces
CN112003773A (en) End-to-end checking method and system for CAN bus safety data
CN108111494A (en) A kind of protocol conversion apparatus of 1553B buses and FlexRay buses
CN105183687A (en) Time-sharing serial communication method and system
CN101140558A (en) Embedded system and satellite communication method thereof
CN115190030A (en) Hardware device and UVM verification platform for realizing CAN FD
CN106612160A (en) Controller
CN200944235Y (en) Interface device of digital signal processor synchronous serial port and asynchronous serially equipment
CN100468375C (en) Method for raising writing speed of memory card
CN102420675B (en) Methods and devices for transmitting and receiving using state information of buffer of data message
CN101764669A (en) CRC code check method in data receiving process
CN104009823B (en) Dislocation detection and error correction circuit in a kind of SerDes technologies
CN106656702A (en) Time sequence control method of intelligent redundant serial bus
CN104735551B (en) ADVB receives fault-tolerant and processing method
CN113934133B (en) Control command confirmation method and system suitable for security control system
CN110113265A (en) More I2C interface interconnected methods and module based on FPGA

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20090506