Movatterモバイル変換


[0]ホーム

URL:


CN114978798B - Serial communication method, device and board card - Google Patents

Serial communication method, device and board card
Download PDF

Info

Publication number
CN114978798B
CN114978798BCN202210565596.4ACN202210565596ACN114978798BCN 114978798 BCN114978798 BCN 114978798BCN 202210565596 ACN202210565596 ACN 202210565596ACN 114978798 BCN114978798 BCN 114978798B
Authority
CN
China
Prior art keywords
slave unit
unit
slave
preset
control instruction
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.)
Active
Application number
CN202210565596.4A
Other languages
Chinese (zh)
Other versions
CN114978798A (en
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.)
Chongqing Aoputai Communication Technology Co ltd
Original Assignee
Chongqing Aoputai Communication Technology 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 Chongqing Aoputai Communication Technology Co ltdfiledCriticalChongqing Aoputai Communication Technology Co ltd
Priority to CN202210565596.4ApriorityCriticalpatent/CN114978798B/en
Publication of CN114978798ApublicationCriticalpatent/CN114978798A/en
Application grantedgrantedCritical
Publication of CN114978798BpublicationCriticalpatent/CN114978798B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The embodiment of the invention provides a serial communication method, a serial communication device and a board card, wherein a control unit is connected with a slave unit set through the same bus, and the slave unit set comprises a plurality of slave units; the method is applied to a control unit, the method comprising: acquiring a first control instruction to be sent to at least one slave unit; the first control instruction includes a slave unit identification; generating a corresponding issuing serial frame according to the first control instruction; and sending the issuing serial frame to the slave unit set through the bus, so that the slave unit set sends corresponding data in the issuing serial frame to a corresponding slave unit according to the slave unit identifier. According to the serial communication method, the control unit and the slave unit set are connected through the same bus, the same communication protocol is adopted, the control unit can communicate with each slave unit in real time through only one bus, and the signal transmission rate is improved.

Description

Serial communication method, device and board card
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a serial communication method, a serial communication device and a board card.
Background
The board card of the communication equipment is the core of the equipment, and a control unit, a slave unit of the control unit, a storage device and the like are integrated on the board card.
At present, the board card functions and integration degree of the communication equipment are increased, and the control unit needs to communicate with a plurality of slave units in real time so as to realize issuing and status reporting of various instructions to control and monitor the status and performance of the board card in real time. In the traditional mode, the master unit and the slave unit are in signal transmission in a single direct connection mode, and different slave units are connected in different modes, so that the signal transmission rate between the control unit and the slave units is low.
Disclosure of Invention
The invention provides a serial communication method, a serial communication device and a board card, which are used for solving the problem of low signal transmission rate between a control unit and a slave unit at present.
The first aspect of the embodiment of the invention provides a serial communication method, wherein a control unit is connected with a slave unit set through the same bus, and the slave unit set comprises a plurality of slave units; the method is applied to a control unit, the method comprising:
acquiring a first control instruction to be sent to at least one slave unit; the first control instruction includes a slave unit identification;
generating a corresponding issuing serial frame according to the first control instruction;
and sending the issuing serial frame to the slave unit set through the bus, so that the slave unit set sends corresponding data in the issuing serial frame to a corresponding slave unit according to the slave unit identifier.
Optionally, in the method as described above, the generating a corresponding issuing serial frame according to the first control instruction includes:
and carrying out data encoding processing and protocol frame processing on the first control instruction to generate a corresponding issuing serial frame.
Optionally, the method as described above, the slave unit set further includes: a high-speed signal unit; the method further comprises the steps of:
acquiring a second control instruction to be sent to the high-speed signal unit; the second control instruction comprises a high-speed signal unit identifier;
the data encoding process and the protocol frame process are performed on the first control instruction to generate a corresponding issuing serial frame, including:
determining a preset sending priority corresponding to the first control instruction and a preset sending priority corresponding to a second control instruction according to the slave unit identifier and the high-speed signal unit identifier; the slave unit identifier, the high-speed signal unit identifier and a preset transmission priority have a mapping relation;
encoding the corresponding first control instruction and second control instruction according to a preset protocol and a preset encoding strategy to generate a corresponding issuing serial frame; the preset encoding strategy is to encode the corresponding first control instruction and second control instruction according to the sequence from the highest preset sending priority to the lowest preset sending priority.
Optionally, as described above, the issuing the serial frame includes:
a frame header, an identifier, a cyclic redundancy check code, a high speed signal unit overhead, and at least one slave unit overhead; the high-speed signal unit overhead is located before the slave unit overhead;
the high speed signal unit overhead and the at least one slave unit overhead are structured in a parity byte interleaving manner.
Optionally, the method as described above, the method further comprises:
acquiring an uploading serial frame sent by a unit set;
and decoding the uploading serial frame and processing the protocol frame to generate uploading state signals correspondingly transmitted by each slave unit.
The first aspect of the embodiment of the invention provides a serial communication method, wherein a control unit is connected with a slave unit set through the same bus, and the slave unit set comprises a plurality of slave units; the method is applied to a set of slave units, the method comprising:
acquiring an uploading state signal of at least one slave unit to be uploaded to the control unit; the upload status signal comprises a slave unit identity;
generating a corresponding uploading serial frame according to the uploading state signal;
and sending the uploading serial frame to the control unit through the bus so that the control unit determines an uploading state signal corresponding to the slave unit according to the slave unit identifier.
Optionally, the method as described above, wherein the generating a corresponding upload serial frame according to the upload status signal includes:
and carrying out data coding processing and protocol frame processing on the uploading state signal to generate a corresponding uploading serial frame.
A third aspect of the embodiment of the present invention provides a serial communication device, where a control unit is connected to a slave unit set through the same bus, and the slave unit set includes a plurality of slave units; the device is located in a control unit, the device comprising:
the acquisition module is used for acquiring a first control instruction to be sent to at least one slave unit; the first control instruction includes a slave unit identification;
the generation module is used for generating a corresponding issuing serial frame according to the first control instruction;
and the sending module is used for sending the issuing serial frame to the slave unit set through the bus so that the slave unit set sends corresponding data in the issuing serial frame to a corresponding slave unit according to the slave unit identifier.
Optionally, in the apparatus as described above, the generating module is specifically configured to:
and carrying out data encoding processing and protocol frame processing on the first control instruction to generate a corresponding issuing serial frame.
Optionally, the apparatus as described above, the slave unit set further includes: a high-speed signal unit; the acquisition module is further configured to:
acquiring a second control instruction to be sent to the high-speed signal unit; the second control instruction comprises a high-speed signal unit identifier;
the generation module is specifically configured to, when performing data encoding processing and protocol frame processing on the first control instruction to generate a corresponding serial frame:
determining a preset sending priority corresponding to the first control instruction and a preset sending priority corresponding to a second control instruction according to the slave unit identifier and the high-speed signal unit identifier; the slave unit identifier, the high-speed signal unit identifier and a preset transmission priority have a mapping relation; encoding the corresponding first control instruction and second control instruction according to a preset protocol and a preset encoding strategy to generate a corresponding issuing serial frame; the preset encoding strategy is to encode the corresponding first control instruction and second control instruction according to the sequence from the highest preset sending priority to the lowest preset sending priority.
Optionally, as described above, the issuing the serial frame includes:
a frame header, an identifier, a cyclic redundancy check code, a high speed signal unit overhead, and at least one slave unit overhead; the high-speed signal unit overhead is located before the slave unit overhead; the high speed signal unit overhead and the at least one slave unit overhead are structured in a parity byte interleaving manner.
Optionally, the apparatus as described above, the apparatus further comprises:
the uploading processing module is used for acquiring an uploading serial frame sent by the unit set; and decoding the uploading serial frame and processing the protocol frame to generate uploading state signals correspondingly transmitted by each slave unit.
The fourth aspect of the embodiment of the invention provides a serial communication device, wherein a control unit is connected with a slave unit set through the same bus, and the slave unit set comprises a plurality of slave units; the apparatus is located in a slave unit set, the apparatus comprising:
the acquisition module is used for acquiring an uploading state signal to be uploaded to the control unit by at least one slave unit; the upload status signal comprises a slave unit identity;
the generation module is used for generating a corresponding uploading serial frame according to the uploading state signal;
and the transmitting module is used for transmitting the uploading serial frame to the control unit through the bus so that the control unit determines an uploading state signal corresponding to the slave unit according to the slave unit identifier.
Optionally, in the apparatus as described above, the generating module is specifically configured to:
and carrying out data coding processing and protocol frame processing on the uploading state signal to generate a corresponding uploading serial frame.
A fifth aspect of an embodiment of the present invention provides a control unit, including: a processor and a memory; a memory storing the processor-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the serial communication method of any one of the first aspects.
A sixth aspect of an embodiment of the present invention provides a slave unit set, including: a plurality of slave units; the slave unit comprises a processor and a memory; a memory storing the processor-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the serial communication method of any one of the second aspects.
A seventh aspect of embodiments of the present invention provides a computer-readable storage medium having stored therein computer-executable instructions for implementing the serial communication method of any one of the first or second aspects when executed by a processor.
An eighth aspect of an embodiment of the present invention provides a computer program product comprising a computer program which, when executed by a processor, implements the serial communication method according to any one of the first or second aspects.
The embodiment of the invention provides a serial communication method, a serial communication device and a board card, wherein a control unit is connected with a slave unit set through the same bus, and the slave unit set comprises a plurality of slave units; the method is applied to a control unit, the method comprising: acquiring a first control instruction to be sent to at least one slave unit; the first control instruction includes a slave unit identification; generating a corresponding issuing serial frame according to the first control instruction; and sending the issuing serial frame to the slave unit set through the bus, so that the slave unit set sends corresponding data in the issuing serial frame to a corresponding slave unit according to the slave unit identifier. According to the serial communication method, the control unit and the slave unit set are connected through the same bus, the same communication protocol is adopted, the control unit can communicate with each slave unit in real time through only one bus, and the signal transmission rate is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a schematic diagram of a serial communication method in which embodiments of the present invention may be implemented;
fig. 2 is a schematic flow chart of a serial communication method according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating connection between a control unit and a slave unit set in a serial communication method according to a first embodiment of the present invention;
fig. 4 is a schematic diagram of a serial frame structure of a serial communication method according to a first embodiment of the present invention;
FIG. 5 is a flow chart of a serial communication method according to a second embodiment of the present invention;
FIG. 6 is a schematic overall flow chart of a serial communication method according to a second embodiment of the present invention;
fig. 7 is a schematic structural diagram of a serial communication device according to a third embodiment of the present invention;
fig. 8 is a schematic structural diagram of a serial communication device according to a fourth embodiment of the present invention;
fig. 9 is a schematic structural diagram of a control unit or a slave unit according to a fifth embodiment of the present invention.
Specific embodiments of the present invention have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the invention. Rather, they are merely examples of apparatus and methods consistent with aspects of the invention as detailed in the accompanying claims.
The technical scheme of the invention is described in detail below by specific examples. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
For a clear understanding of the technical solutions of the present application, the prior art solutions will be described in detail first. Currently, a control unit and a slave unit are integrated on a board card of a communication device. The control unit is connected with different slave units through different buses, different buses use different protocols, and the buses have different clocks and redundant signals. Thus, when the control unit communicates with a plurality of slave units in real time, a complex protocol needs to be processed, and communication can be performed only through different buses, respectively, resulting in a low signal transmission rate between the control unit and the slave units.
Therefore, in order to solve the problem of low signal transmission rate between the control unit and the slave units in the prior art, the inventor finds that, in order to solve the problem, multiple buses can be integrated, so that the control unit and each slave unit are connected and communicated through the same bus, and the signal transmission rate between the control unit and the slave unit is improved. The method comprises the following steps: when a control instruction is issued, the control unit acquires a first control instruction to be sent to at least one slave unit. The first control instruction includes a slave unit identification. And generating a corresponding issuing serial frame according to the first control instruction. The outgoing serial frame is sent over the bus to the slave unit set. And when uploading the state signals, the slave unit sets acquire at least one uploading state signal to be uploaded to the control unit by the slave unit. The upload status signal comprises a slave unit identification. And generating a corresponding uploading serial frame according to the uploading state signal. And transmitting the uploading serial frame to the control unit through the bus so that the control unit determines an uploading state signal corresponding to the slave unit according to the slave unit identification.
According to the serial communication method, the control unit and the slave unit set are connected through the same bus, the same communication protocol is adopted, the control unit can communicate with each slave unit in real time through only one bus, and the signal transmission rate is improved.
The inventor puts forward the technical scheme of the application based on the creative discovery.
The application scenario of the serial communication method provided by the embodiment of the invention is described below. As shown in fig. 1, in this embodiment, in order to better describe an application scenario of the serial communication method, other devices in the scenario are also described at the same time. Wherein 10 is a board card, 11 is a control unit, 12 is a slave unit set, and 13 is a bus. The control unit 11, the slave unit set 12, and the bus 13 are provided on the board card 10. The slave unit set 12 includes a plurality of slave units, as shown in the drawing as slave unit a, slave unit b, slave unit c to slave unit n.
In the process of communication between the control unit and the slave unit set, if the control unit needs to issue data, for example, issues control instructions to the slave unit a, the slave unit b and the slave unit c, corresponding issuing serial frames are generated according to the control instructions to be sent to the slave unit a, the slave unit b and the slave unit c. The issued serial frame contains slave unit a, slave unit b, and slave unit identification of slave unit c. The outgoing serial frame is then sent over bus 13 to the slave unit set 12. The slave unit set 12 performs identification processing, such as decoding processing and protocol processing, based on the issued serial frame, and transmits corresponding data therein to the slave unit a, the slave unit b, and the slave unit c based on the slave unit identifications of the slave unit a, the slave unit b, and the slave unit c. The slave unit a, the slave unit b and the slave unit c output corresponding data to other devices according to corresponding control instructions.
If the slave unit a, the slave unit b and the slave unit c in the slave unit set 12 need to upload status signals to feed back the status of each device, the slave unit a, the slave unit b and the slave unit c generate corresponding upload serial frames according to the upload status signals, and send the upload serial frames to the control unit 11 through the bus 13. After the identification process is performed on the upload serial frame, the control unit 11 determines an upload status signal therein, and performs subsequent processing according to the upload status signal, for example, issuing a corresponding control instruction as follows.
Embodiments of the present invention will now be described with reference to the accompanying drawings.
Fig. 2 is a flow chart of a serial communication method according to a first embodiment of the present invention, as shown in fig. 2, in this embodiment, a control unit is connected to a slave unit set through the same bus, and the slave unit set includes a plurality of slave units. The serial communication method is applied to the control unit. The serial communication method provided in this embodiment includes the following steps:
step S101, a first control instruction to be sent to at least one slave unit is acquired. The first control instruction includes a slave unit identification.
The existing control unit is connected with different slave units through different buses, the protocols adopted by each bus are different, and the clocks of each bus are different. This approach will occupy multiple pin resources of the control unit, while the clocks are not uniform and the protocol processing is complex. In this embodiment, the control unit is connected to the slave unit set through a bus, and a communication protocol is adopted to reduce the complexity of protocol processing. The bus may include a serial data line for synchronizing timing and a clock line for transmitting serial frames.
The slave unit set may include a plurality of slave units, each of which is preset with a corresponding slave unit identifier, and the slave unit identifier may be a slave unit number, a slave unit name, or the like.
Step S102, generating a corresponding issuing serial frame according to the first control instruction.
In this embodiment, the first control instructions corresponding to different slave units may be different, and when the issuing serial frame is generated according to the first control instructions, the protocol frame processing and the encoding processing may be performed according to a preset protocol, so as to generate the issuing serial frame. The method comprises the following steps:
and carrying out data encoding processing and protocol frame processing on the first control instruction to generate a corresponding issuing serial frame.
The control unit may be provided with a data encoding and decoding module for encoding the issued control instruction and decoding the received uploading serial frame. And a serial protocol frame processing module for processing protocol frames of a preset protocol can be also arranged.
Optionally, the slave unit set on the board card further includes: the high-speed signal unit is connected with the control unit, and has certain requirements on the communication speed, and the transmission priority is required to be set. Thus, the method of the present embodiment may further comprise the steps of:
and acquiring a second control instruction to be sent to the high-speed signal unit. The second control instruction includes a high speed signal unit identification.
After the second control instruction is acquired, determining a preset sending priority corresponding to the first control instruction and a preset sending priority corresponding to the second control instruction according to the slave unit identifier and the high-speed signal unit identifier. The slave unit identifier and the high-speed signal unit identifier have a mapping relation with a preset transmission priority.
And encoding the corresponding first control instruction and second control instruction according to a preset protocol and a preset encoding strategy to generate a corresponding issuing serial frame. The preset encoding strategy is to encode the corresponding first control instruction and second control instruction according to the sequence from the highest preset sending priority to the lowest preset sending priority.
In this embodiment, the preset transmission priority may be set according to the priority that the high-speed signal unit is greater than the slave unit, so as to preferentially transmit and process the second control instruction of the high-speed signal unit, and improve the communication rate of the high-speed signal unit. Meanwhile, the sending priority can be set for different slave units according to actual requirements, so that when the first control instruction and the second control instruction are coded according to a preset protocol and a preset coding strategy, the priority code with the highest sending priority is coded at the head of the serial frame.
As shown in fig. 3, CLK refers to clock lines, MS0-1 to MS0-6, SM0-1 to SM0-6, MS1-1 to MS1-6, SM1-1 to SM1-6, MSn-1 to MSn-6, SMn-1 to SMn-6 refer to signal identifications, a codec module and a serial protocol frame processing module are provided in the control unit, and a serial protocol frame processing module and a codec module are provided in the slave unit set. The control unit is connected with the slave unit set through a bus, and the bus comprises a clock line and a serial data line marked with a serial data frame in the figure. After decoding and frame processing via the slave unit set, the issuing serial frame can parse out specific control commands to be transmitted by means of different kinds of signals, such as MS0-1, SM 0-1.
Alternatively, in this embodiment, as shown in FIG. 4, P0-1 to P1-12, P1-1 to P1-12, P2-1 to P2-12 and Pn-1 to Pn-12 refer to byte identifiers, and MS0-1 to MS0-6 and SM0-1 to SM0-6 refer to signal identifiers. h1 and h2 refer to frame header, TR and RE index identifier, TR is the down flag, RE refers to the up flag. C refers to CRC8, a cyclic redundancy check code. As shown, issuing a serial frame includes:
a frame header, an identifier, a cyclic redundancy check code, a high speed signal unit overhead, and at least one slave unit overhead. The high speed signal cell overhead is located before the slave cell overhead. The high-speed signal unit cost is 12 bytes, the slave units 1-n are included in the figure, and the specific number can be set according to actual requirements.
The high speed signal unit overhead and the at least one slave unit overhead are constructed in a parity byte interleaving manner.
Meanwhile, optionally, frame header and CRC8 checks can ensure frame data accuracy, and a 2-byte identifier is used for identifying the direction of issuing and uploading. In the unit overhead, the high-speed signal unit is used as the first unit overhead, so that the main signal of the high-speed signal unit is ensured to be transmitted preferentially under the condition that the frame header, the identifier and the CRC8 of each frame are checked without errors, and the unit overhead of the slave unit can also be used for data coding and transmission according to the priority. All issued control instructions can use odd bytes, uploaded state signals can use even bytes, and each unit overhead is formed in a mode of odd-even byte interleaving, so that communication efficiency and reliability are improved.
Optionally, in the method of this embodiment, when the control unit receives data uploaded from the unit set, the method specifically may include the following steps:
an upload serial frame transmitted from the set of units is acquired.
The uploading serial frame is decoded and processed by protocol frame to generate uploading state signals correspondingly transmitted by each slave unit.
The format of the upload serial frame is the same as the format of the download serial frame, as shown in fig. 4.
Step S103, the issuing serial frame is sent to the slave unit set through the bus, so that the slave unit set sends corresponding data in the issuing serial frame to the corresponding slave unit according to the slave unit identification.
Since the number of the slave units may be more than 2, the slave unit set needs to issue the data in the issued serial frame to the corresponding slave unit, so that the corresponding slave unit can be determined according to the slave unit identifier, and the corresponding data, such as the data in the unit overhead of the slave unit, can be sent to the corresponding slave unit.
According to the serial communication method, the control unit and the slave unit set are connected through the same bus, the same communication protocol is adopted, the control unit can communicate with each slave unit in real time through only one bus, and the signal transmission rate is improved.
Fig. 5 is a schematic flow chart of a serial communication method according to a second embodiment of the present invention, as shown in fig. 5, in which an execution body is a slave unit set based on the serial communication method according to the first embodiment of the present invention. The serial communication method provided by the present embodiment includes the following steps.
Step S201, obtaining at least one upload status signal to be uploaded from the slave unit to the control unit. The upload status signal comprises a slave unit identification.
Each slave unit receives data sent by other devices correspondingly connected, and the slave unit needs to convert the data into an uploading state signal and upload the uploading state signal to the control unit so that the control unit generates a subsequent control instruction according to the uploading state signal.
Step S202, corresponding uploading serial frames are generated according to the uploading state signals.
In this embodiment, the manner of generating the corresponding upload serial frame according to the upload status signal is similar to the manner of generating the corresponding download serial frame according to the control instruction in the control unit.
In this embodiment, data encoding processing and protocol frame processing are required to be performed on the upload status signal to generate a corresponding upload serial frame. The slave unit set may be provided with a data encoding and decoding module for encoding the uploaded status signal and decoding the received serial frame. And a serial protocol frame processing module for processing protocol frames of a preset protocol can be also arranged.
Meanwhile, the slave unit set on the board card can be also provided with a high-speed signal unit, so as to ensure the requirement of the high-speed signal unit on the communication speed.
The transmission priority can be preset for the uploading state signals to be uploaded by the slave unit and the high-speed signal unit, and the preset transmission priority can be set according to the fact that the high-speed signal unit is larger than the slave unit, so that the uploading state signals of the high-speed signal unit are transmitted and processed preferentially, and the communication rate of the high-speed signal unit is improved. Meanwhile, the sending priority can be set for different slave units according to actual demands, so that when the uploading state signal is encoded according to a preset protocol and a preset encoding strategy, the head of the uploading serial frame is encoded with the priority with the highest sending priority.
Step S203, the uploading serial frame is sent to the control unit through the bus, so that the control unit determines the uploading state signal corresponding to the slave unit according to the slave unit identification.
The bus includes a clock line and a serial data line, and the control unit can determine the content of the upload status signal and determine its corresponding slave unit through decoding processing and protocol frame processing after receiving the upload serial frame.
As shown in fig. 3, the control unit and the slave unit are interconnected by a clock line and a serial data frame. The encoding and decoding module encodes and decodes the command issued by the unit to be controlled and the state signal to be uploaded by each slave unit, and encapsulates all data into serial data frames according to a preset protocol frame format so as to realize the control and state monitoring of each unit.
In order to further explain the serial communication method of the present embodiment, a detailed description will be given below with reference to fig. 6. The overall flow of the serial communication method is shown. In the figure, the issued control instruction is abbreviated as an issued instruction, and the issued serial frame and the uploaded serial frame are abbreviated as serial frames. MS0-1 to MS0-12 and MSn-1 to MSn-12 refer to different kinds of signals in the control instruction, SMn-1 to SMn-12 and SM0-1 to SM0-12 refer to different kinds of signals in the upload status signal.
The control unit firstly judges the issued control instruction according to the preset priority, performs data encoding, then sends an issued serial frame to the slave unit set after protocol frame processing, and receives the serial frame from the slave unit set, and then performs frame processing and data decoding to decode the control instruction sent to each slave unit, wherein signals in the control instruction are represented by MS0-1 to MS0-12 and MSn-1 to MSn-12. Meanwhile, after the slave unit sets encode all the uploading state signals corresponding to the slave units according to the preset priority and the protocol frame format, the uploading state signals are sent to the control unit in a serial data frame mode, protocol decoding is carried out after the control unit receives the serial frame, all the uploading state signals corresponding to the slave units are solved, and the signals are represented through SMn-1 to SMn-12 and SM0-1 to SM0-12, so that real-time control and state monitoring are achieved.
Fig. 7 is a schematic structural diagram of a serial communication device according to a third embodiment of the present invention, as shown in fig. 7, in this embodiment, a control unit and a slave unit set are connected by the same bus, and the slave unit set includes a plurality of slave units. The serial communication device 300 is located at the control unit, and the serial communication device 300 includes:
the obtaining module 301 is configured to obtain a first control instruction to be sent to at least one slave unit. The first control instruction includes a slave unit identification.
The generating module 302 is configured to generate a corresponding serial frame according to the first control instruction.
And the sending module 303 is configured to send the downlink serial frame to the slave unit set through the bus, so that the slave unit set sends the corresponding data in the downlink serial frame to the corresponding slave unit according to the slave unit identifier.
Optionally, in this embodiment, the generating module 302 is specifically configured to:
and carrying out data encoding processing and protocol frame processing on the first control instruction to generate a corresponding issuing serial frame.
Optionally, in this embodiment, the slave unit set further includes: a high-speed signal unit. The acquisition module 301 is further configured to:
and acquiring a second control instruction to be sent to the high-speed signal unit. The second control instruction includes a high speed signal unit identification.
The generating module 302 is specifically configured to, when performing data encoding processing and protocol frame processing on the first control instruction to generate a corresponding issued serial frame:
and determining the preset sending priority corresponding to the first control instruction and the preset sending priority corresponding to the second control instruction according to the slave unit identifier and the high-speed signal unit identifier. The slave unit identifier and the high-speed signal unit identifier have a mapping relation with a preset transmission priority. And encoding the corresponding first control instruction and second control instruction according to a preset protocol and a preset encoding strategy to generate a corresponding issuing serial frame. The preset encoding strategy is to encode the corresponding first control instruction and second control instruction according to the sequence from the highest preset sending priority to the lowest preset sending priority.
Optionally, in this embodiment, issuing the serial frame includes:
a frame header, an identifier, a cyclic redundancy check code, a high speed signal unit overhead, and at least one slave unit overhead. The high speed signal cell overhead is located before the slave cell overhead. The high speed signal unit overhead and the at least one slave unit overhead are constructed in a parity byte interleaving manner.
Optionally, in this embodiment, the serial communication device 300 further includes:
and the uploading processing module is used for acquiring the uploading serial frame sent from the unit set. The uploading serial frame is decoded and processed by protocol frame to generate uploading state signals correspondingly transmitted by each slave unit.
The serial communication device provided in this embodiment may execute the technical scheme of the method embodiment shown in fig. 2, and its implementation principle and technical effects are similar to those of the method embodiment shown in fig. 2, and are not described in detail herein.
Fig. 8 is a schematic structural diagram of a serial communication device according to a fourth embodiment of the present invention, as shown in fig. 8, in this embodiment, a control unit and a slave unit set are connected by the same bus, and the slave unit set includes a plurality of slave units. The serial communication device 400 is located in the slave unit set, and the serial communication device 400 includes:
the obtaining module 401 is configured to obtain an upload status signal of at least one slave unit to be uploaded to the control unit. The upload status signal comprises a slave unit identification.
The generating module 402 is configured to generate a corresponding upload serial frame according to the upload status signal.
And the sending module 403 is configured to send the upload serial frame to the control unit through the bus, so that the control unit determines an upload status signal corresponding to the slave unit according to the slave unit identifier.
Optionally, in this embodiment, the generating module 402 is specifically configured to:
and carrying out data coding processing and protocol frame processing on the uploading state signal to generate a corresponding uploading serial frame.
The serial communication device provided in this embodiment may execute the technical scheme of the method embodiment shown in fig. 3, and its implementation principle and technical effects are similar to those of the method embodiment shown in fig. 3, and are not described in detail herein.
According to an embodiment of the invention, the invention also provides a control unit, a set of slave units, a computer-readable storage medium and a computer program product.
As shown in fig. 9, the control unit and the slave unit sets are intended for various devices that can be used to perform the serial communication method, such as microcomputers, singlechips, and other suitable computers. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 9, the control unit or slave unit includes: a processor 501 and a memory 502. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executed within the integral control device.
Memory 502 is a non-transitory computer readable storage medium provided by the present invention. The non-transitory computer readable storage medium of the present invention stores computer instructions for causing a computer to execute the serial communication method provided by the present invention.
The memory 502 is a non-transitory computer readable storage medium, and may be used to store a non-transitory software program, a non-transitory computer executable program, and modules, such as program instructions/modules (e.g., the acquisition module 301, the generation module 302, and the transmission module 303 shown in fig. 7, or the acquisition module 401, the generation module 402, and the transmission module 402 shown in fig. 8) corresponding to the serial communication method in the embodiment of the present invention. The processor 501 executes various functional applications and data processing by running non-transitory software programs, instructions, and modules stored in the memory 502, i.e., implements the serial communication method in the method embodiments described above.
Meanwhile, this embodiment also provides a board card including: a control unit and a set of slave units. The slave unit set includes a plurality of slave units.
The control unit is connected to the slave unit set through the same bus, and the control unit is configured to execute the serial communication method of the first embodiment, and the slave unit set is configured to execute the serial communication method of the second embodiment.
Meanwhile, the present embodiment also provides a computer product which, when instructions in the computer product are executed by a processor, enables the serial communication method of the first to second embodiments described above to be performed.
Other implementations of the examples of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of embodiments of the invention following, in general, the principles of the embodiments of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the embodiments of the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the embodiments being indicated by the following claims.
It is to be understood that the embodiments of the invention are not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be made without departing from the scope thereof. The scope of embodiments of the invention is limited only by the appended claims.

Claims (7)

CN202210565596.4A2022-05-232022-05-23Serial communication method, device and board cardActiveCN114978798B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210565596.4ACN114978798B (en)2022-05-232022-05-23Serial communication method, device and board card

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210565596.4ACN114978798B (en)2022-05-232022-05-23Serial communication method, device and board card

Publications (2)

Publication NumberPublication Date
CN114978798A CN114978798A (en)2022-08-30
CN114978798Btrue CN114978798B (en)2024-02-27

Family

ID=82985447

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210565596.4AActiveCN114978798B (en)2022-05-232022-05-23Serial communication method, device and board card

Country Status (1)

CountryLink
CN (1)CN114978798B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104780086A (en)*2015-05-082015-07-15中国电子科技集团公司第四十七研究所CAN bus communication method and system for environment monitoring
CN108733604A (en)*2018-05-112018-11-02深圳市脉联电子有限公司A kind of 485 bus intelligent expansion method and devices based on modbus communications protocol
CN109728985A (en)*2017-10-302019-05-07北京精密机电控制设备研究所 A Heterogeneous Real-time Redundant Communication System Based on RS422 and CAN Bus
CN110300040A (en)*2018-03-222019-10-01华为技术有限公司A kind of communication means and relevant device
CN111045851A (en)*2018-10-122020-04-21株洲中车时代电气股份有限公司Communication system
CN112491678A (en)*2020-11-162021-03-12无锡锐科光纤激光技术有限责任公司Digital level transmission circuit and method
CN113051204A (en)*2019-12-272021-06-29中车大连电力牵引研发中心有限公司Serial backplane bus communication method and system
CN114237091A (en)*2021-11-172022-03-25中国人民解放军海军工程大学Power electronic converter state data acquisition device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US9710419B2 (en)*2012-05-312017-07-18Sonova AgSystem and method for master-slave data transmission based on a flexible serial bus for use in hearing devices
CN108270652B (en)*2017-12-292021-03-30北京纳米维景科技有限公司High-speed real-time bus system and data processing method thereof

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104780086A (en)*2015-05-082015-07-15中国电子科技集团公司第四十七研究所CAN bus communication method and system for environment monitoring
CN109728985A (en)*2017-10-302019-05-07北京精密机电控制设备研究所 A Heterogeneous Real-time Redundant Communication System Based on RS422 and CAN Bus
CN110300040A (en)*2018-03-222019-10-01华为技术有限公司A kind of communication means and relevant device
CN108733604A (en)*2018-05-112018-11-02深圳市脉联电子有限公司A kind of 485 bus intelligent expansion method and devices based on modbus communications protocol
CN111045851A (en)*2018-10-122020-04-21株洲中车时代电气股份有限公司Communication system
CN113051204A (en)*2019-12-272021-06-29中车大连电力牵引研发中心有限公司Serial backplane bus communication method and system
CN112491678A (en)*2020-11-162021-03-12无锡锐科光纤激光技术有限责任公司Digital level transmission circuit and method
CN114237091A (en)*2021-11-172022-03-25中国人民解放军海军工程大学Power electronic converter state data acquisition device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于FlexRay总线飞行控制计算机串行接口单元设计与研究;李妍等;《计算机测量与控制》;20160225;第24卷(第02期);94-98*

Also Published As

Publication numberPublication date
CN114978798A (en)2022-08-30

Similar Documents

PublicationPublication DateTitle
CN105760335B (en)A kind of spacecraft general-purpose interface controller
CN102831096B (en)A kind of 1553B bus protocol IP kernel
CN111327603B (en)Data transmission method, device and system
CN114077562B (en)1553B bus controller protocol processing IP core
CN201717878U (en)Vehicle communication network data conversion gateway
CN113645600B (en)Data transmission method, device, terminal and storage medium
CN112988650B (en) Communication method, device, system and storage medium
CN115706661B (en)Synchronous high speed signaling interconnect
CN112003775A (en) A single-level single-wire full-duplex bus communication method and system
CN113051204B (en)Serial backboard bus communication method and system
CN114978798B (en)Serial communication method, device and board card
CN109525363B (en)Data transmission method and device
CN118277311A (en)Single bus communication method and device and computer equipment
CN107342920B (en)Internet of things gateway access equipment and data interaction method thereof
CN114070405B (en)Optical fiber network system based on multi-type test equipment
CN214014269U (en) Train network communication device and system
CN113572629B (en)Message transmission method, terminal and storage medium
CN110381095B (en)System on chip, equipment and communication system
CN115086192A (en)Data processing method, device and system and monitoring card
CN109213710A (en)High-speed serial interface device and data transmission method thereof
CN114138063B (en) A transmission method and device for reducing connector signals based on CPLD
CN221008254U (en)LVDS signal conversion device for parallel backboard bus communication mode
CN120541019B (en) A high-speed interconnection interface system
CN218183434U (en)Video coding and decoding card and video coding and decoding device
CN110059039A (en)Input/output I/O polling method and I/O main website, system, storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
CB03Change of inventor or designer information
CB03Change of inventor or designer information

Inventor after:Lu Qihong

Inventor after:Wang Honglian

Inventor before:Wu Changhao

Inventor before:Lu Qihong

Inventor before:Wang Honglian

GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp