CN113691284A - Communication method and communication device - Google Patents

Communication method and communication device Download PDF

Info

Publication number
CN113691284A
CN113691284A CN202111229983.2A CN202111229983A CN113691284A CN 113691284 A CN113691284 A CN 113691284A CN 202111229983 A CN202111229983 A CN 202111229983A CN 113691284 A CN113691284 A CN 113691284A
Authority
CN
China
Prior art keywords
modulation signal
signal
power line
binary data
master device
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.)
Granted
Application number
CN202111229983.2A
Other languages
Chinese (zh)
Other versions
CN113691284B (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.)
Beijing Unigroup Tsingteng Microsystems Co Ltd
Original Assignee
Beijing Unigroup Tsingteng Microsystems 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 Beijing Unigroup Tsingteng Microsystems Co Ltd filed Critical Beijing Unigroup Tsingteng Microsystems Co Ltd
Priority to CN202111229983.2A priority Critical patent/CN113691284B/en
Publication of CN113691284A publication Critical patent/CN113691284A/en
Application granted granted Critical
Publication of CN113691284B publication Critical patent/CN113691284B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines
    • H04B3/544Setting up communications; Call and signalling arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Dc Digital Transmission (AREA)
  • Cable Transmission Systems, Equalization Of Radio And Reduction Of Echo (AREA)

Abstract

The application discloses a communication method and a communication device. The method comprises the steps that a master device sends a first modulation signal generated based on data to be sent to a slave device through a first power line, wherein the first modulation signal corresponding to binary data 1 and 0 is a square wave signal with different duty ratios; the slave device samples the received first modulation signal, determines binary data corresponding to a sampling result, extracts a clock signal based on the first modulation signal, and sends a second modulation signal to the master device through a second power line in a period when the first modulation signal is in a first level interval according to the extracted clock signal; and the master device samples the second modulation signal on the second power line in the period when the first modulation signal is in the first level interval, and determines binary data corresponding to the sampling result, so that full-duplex communication between the master device and the slave device is realized, and the clock period of communication between the master device and the slave device can be flexibly adjusted.

Description

Communication method and communication device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a communication method and a communication apparatus.
Background
With the rapid development of the internet of things technology, more and more devices need to be accessed into the network. Among them, communication between an external device and a controller and communication between a controller and a controller are more and more frequent, and there is an urgent need for efficient full-duplex communication.
Disclosure of Invention
In view of the above, an object of the present application is to provide a communication method and a communication apparatus, so as to implement efficient full duplex communication between a master device and a slave device.
In order to achieve the above purpose, the present application provides the following technical solutions:
the application provides a communication method, two transmission paths are established between a master device and a slave device through a first power line and a second power line, the communication method is applied to the master device, and the communication method comprises the following steps:
sending a first modulation signal to the slave device through the first power line, wherein the first modulation signal is generated based on data to be sent of the master device, the first modulation signal corresponding to binary data 1 is a first square wave signal, the first modulation signal corresponding to binary data 0 is a second square wave signal, and the duty ratios of the first square wave signal and the second square wave signal are different;
sampling a second modulation signal on the second power line in a period when the first modulation signal is in a first level interval, and determining binary data corresponding to a sampling result, wherein the slave device extracts a clock signal based on the first modulation signal, and according to the clock signal, in the period when the first modulation signal is in the first level interval, the slave device sends a second modulation signal to the master device through the second power line, the second modulation signal is generated by the slave device based on data to be sent, the second modulation signal corresponding to binary data 1 is a first level signal, and the second modulation signal corresponding to binary data 0 is a second level signal.
Optionally, on the basis of the communication method, the method further includes:
detecting a voltage of a second power line in a case where the first modulation signal is not transmitted to the slave device;
if the voltage of the second power line jumps to a first voltage value, sending a third modulation signal to the slave device through the first power line, wherein the third modulation signal is composed of the second square wave signal;
sampling a second modulation signal on the second power line in a period when the third modulation signal is in a first level interval, and determining binary data corresponding to the sampling result, wherein the slave device extracts a clock signal based on the third modulation signal, and according to the clock signal extracted based on the third modulation signal, transmits the second modulation signal to the master device through the second power line in the period when the third modulation signal is in the first level interval, the second modulation signal is generated by the slave device based on data to be transmitted, the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
Optionally, the duty ratio of the first square wave signal is greater than the duty ratio of the second square wave signal;
correspondingly, the first level interval is an interval greater than a first voltage threshold.
Optionally, the duty ratio of the first square wave signal is smaller than the duty ratio of the second square wave signal;
correspondingly, the first level interval is an interval smaller than a first voltage threshold.
The present application also provides a communication method in which two transmission paths are established between a master device and a slave device via a first power line and a second power line, the communication method being applied to the slave device, the communication method including:
sampling a first modulation signal sent by the master device through the first power line, determining binary data corresponding to a sampling result, and extracting a clock signal based on the first modulation signal, wherein the first modulation signal is generated by the master device based on data to be sent, the first modulation signal corresponding to binary data 1 is a first square wave signal, the first modulation signal corresponding to binary data 0 is a second square wave signal, duty ratios of the first square wave signal and the second square wave signal are different, and a clock period is formed between two adjacent rising edges in the first modulation signal;
according to the clock signal, in a period when the first modulation signal is in a first level interval, sending a second modulation signal to the master device through the second power line, where the second modulation signal is generated based on data to be sent of the slave device, the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
Optionally, on the basis of the communication method, the method further includes:
under the condition that a first modulation signal sent by the master device is not received, if data sending is required, the voltage of the second power line is adjusted to a first voltage value so as to trigger the master device to send a third modulation signal to the slave device through the first power line, wherein the third modulation signal is formed by the second square wave signal;
sampling a third modulation signal transmitted by the master device through the first power line, determining binary data corresponding to a sampling result of the third modulation signal, and extracting a clock signal based on the third modulation signal, wherein a clock period is between two adjacent rising edges in the third modulation signal;
according to a clock signal extracted based on the third modulation signal, in a period when the third modulation signal is in the first level interval, sending a second modulation signal to the master device through the second power line, where the second modulation signal is generated based on data to be sent of the slave device, the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
The present application also provides a communication apparatus in which two transmission paths are established between a master device and a slave device via a first power line and a second power line, the communication apparatus being applied to the master device, the communication apparatus including:
the first signal processing unit is configured to send a first modulation signal to the slave device through the first power line, where the first modulation signal is generated based on data to be sent of the master device, the first modulation signal corresponding to binary data 1 is a first square wave signal, the first modulation signal corresponding to binary data 0 is a second square wave signal, and duty ratios of the first square wave signal and the second square wave signal are different;
the second signal processing unit is configured to sample a second modulation signal on the second power line in a period when the first modulation signal is in a first level interval, and determine binary data corresponding to a sampling result, where the slave device extracts a clock signal based on the first modulation signal, and sends a second modulation signal to the master device through the second power line in the period when the first modulation signal is in the first level interval according to the clock signal, the second modulation signal is generated by the slave device based on data to be sent, the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
Optionally, on the basis of the communication device, the method further includes:
a voltage detection unit for detecting a voltage of the second power supply line in a case where a first modulation signal is not transmitted to the slave device;
a third signal processing unit, configured to send a third modulation signal to the slave device through the first power line when it is detected that the voltage of the second power line jumps to a first voltage value, where the third modulation signal is formed by the second square wave signal;
a fourth signal processing unit, configured to sample a second modulation signal on the second power line in a period when the third modulation signal is in a first level interval, and determine binary data corresponding to a sampling result, where the slave device extracts a clock signal based on the third modulation signal, and sends the second modulation signal to the master device through the second power line according to the clock signal extracted based on the third modulation signal in the period when the third modulation signal is in the first level interval, the second modulation signal is generated by the slave device based on data to be sent, the second modulation signal corresponding to the binary data 1 is the first level signal, and the second modulation signal corresponding to the binary data 0 is the second level signal.
The present application also provides a communication apparatus in which two transmission paths are established between a master device and a slave device via a first power line and a second power line, the communication apparatus being applied to the slave device, the communication apparatus including:
the first signal extraction unit is configured to sample a first modulation signal sent by the master device through the first power line, determine binary data corresponding to a sampling result, and extract a clock signal based on the first modulation signal, where the first modulation signal is generated by the master device based on data to be sent, the first modulation signal corresponding to binary data 1 is a first square wave signal, the first modulation signal corresponding to binary data 0 is a second square wave signal, duty ratios of the first square wave signal and the second square wave signal are different, and a clock period is between two adjacent rising edges in the first modulation signal;
and a fifth signal processing unit, configured to send, according to the clock signal, a second modulation signal to the master device through the second power line in a period when the first modulation signal is in a first level interval, where the second modulation signal is generated based on data to be sent of the slave device, the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
Optionally, on the basis of the communication device, the method further includes:
the voltage adjusting unit is used for adjusting the voltage of the second power line to a first voltage value to trigger the master device to send a third modulation signal to the slave device through the first power line under the condition that a first modulation signal sent by the master device is not received and if a data sending requirement exists, wherein the third modulation signal is formed by the second square wave signal;
the second signal extraction unit is configured to sample a third modulation signal sent by the master device through the first power line, determine binary data corresponding to a sampling result of the third modulation signal, and extract a clock signal based on the third modulation signal, where a clock period is between two adjacent rising edges in the third modulation signal;
a sixth signal processing unit, configured to send, according to a clock signal extracted based on the third modulation signal, a second modulation signal to the master device through the second power line in a period where the third modulation signal is in the first level interval, where the second modulation signal is generated based on data to be sent by the slave device, the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
Therefore, the beneficial effects of the application are as follows:
according to the communication method and the communication device, two transmission paths are established between a master device and a slave device through two power lines, the master device generates a first modulation signal based on data to be transmitted, and transmits the first modulation signal to the slave device through a first power line, wherein the first modulation signal corresponding to binary data 1 is a first square wave signal, the first modulation signal corresponding to binary data 0 is a second square wave signal, and the duty ratios of the first square wave signal and the second square wave signal are different; the slave device receives a first modulation signal sent by the master device, samples the first modulation signal, determines binary data corresponding to a sampling result, extracts a clock signal based on a rising edge in the first modulation signal, and sends a second modulation signal to the master device through a second power line in a period when the first modulation signal is in a first level interval according to the extracted clock signal; and the master device samples the second modulation signal on the second power line in the time period when the first modulation signal is in the first level interval, determines binary data corresponding to the sampling result and realizes full-duplex communication between the master device and the slave device. In addition, the clock signal used by the slave device is extracted based on the first modulation signal transmitted by the master device, and when the master device adjusts the clock signal, the clock signal extracted by the slave device also changes accordingly, so that the clock period of the communication between the master device and the slave device can be flexibly adjusted.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a signaling diagram of a communication method disclosed herein;
fig. 2 is a schematic diagram of a first modulation signal corresponding to binary data 1 and 0 sent by a master device disclosed in the present application;
FIG. 3 is a schematic diagram of a time period during which a master device samples a second modulated signal as disclosed herein;
FIG. 4 is another schematic diagram of a time period during which a master device samples a second modulated signal as disclosed herein;
fig. 5 is a signaling diagram of another communication method disclosed herein;
fig. 6 is a schematic structural diagram of a communication apparatus applied to a master device disclosed in the present application;
fig. 7 is a schematic structural diagram of a communication device applied to a slave device disclosed in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The application discloses a communication method and a communication device, which are used for realizing efficient full-duplex communication between master equipment and slave equipment. Two transmission paths are established between the master device and the slave device through the first power line and the second power line. That is, a first transmission path is established between the master device and the slave device through the first power line, and a second transmission path is established between the master device and the slave device through the second power line. In this application, the master device and the slave device are controllers that need to communicate with each other, or are an external device and a controller that need to communicate with each other.
Referring to fig. 1, fig. 1 is a signaling diagram of a communication method disclosed in the present application. The communication method comprises the following steps:
s101: the master device transmits a first modulated signal to the slave device through a first power line.
The master device generates a first modulation signal based on data to be transmitted of the master device. The data to be transmitted of the master device is composed of binary data 1 and binary data 0. The first modulation signal corresponding to the binary data 1 is a first square wave signal, the first modulation signal corresponding to the binary data 0 is a second square wave signal, and the duty ratios of the first square wave signal and the second square wave signal are different.
It should be noted that, the master device encapsulates the data information to be sent based on the specified protocol to obtain the data to be sent. That is, the data to be transmitted generated by the master device satisfies the frame format of the specified protocol, including the frame header and the data information.
It will be appreciated that if there is a large difference in the duty cycle of the first square wave signal and the second square wave signal, the slave device can more accurately distinguish between the first square wave signal and the second square wave signal.
Optionally, the first modulation signal corresponding to binary data 1 is set as a first square wave signal with a duty cycle of 3/4, and the second modulation signal corresponding to binary data 0 is set as a second square wave signal with a duty cycle of 1/4, as shown in fig. 2. In fig. 2, the abscissa is time, the ordinate is voltage amplitude, and T is one clock period. Of course, fig. 2 is only an example of the first modulation signal corresponding to binary data 1 and 0, and the implementation is not limited thereto.
S102: the slave device receives a first modulation signal sent by the master device through a first power line, samples the first modulation signal, determines binary data corresponding to a sampling result, and extracts a clock signal based on the first modulation signal.
The data to be transmitted generated by the master device includes binary data 1 and binary data 0, and the first modulation signals corresponding to the binary data 1 and the binary data 0 are square wave signals with different duty ratios. The slave device receives the first modulated signal, samples the first modulated signal, and determines whether the sampling result corresponds to binary data 1 or binary data 0. In addition, a clock period is formed between two adjacent rising edges in the first modulation signal, so that the slave device can extract the clock signal according to the rising edges in the first modulation signal.
S103: the slave device transmits a second modulation signal to the master device through the second power line during a period in which the first modulation signal is in the first level interval in accordance with the clock signal.
In the process that the master device transmits the first modulation signal to the slave device through the first power line, if the slave device needs to transmit data to the master device, the slave device transmits a second modulation signal to the master device through the second power line during a period in which the first modulation signal is in the first level interval according to the extracted clock signal.
The slave device generates a second modulation signal based on the data to be transmitted of the slave device. The data to be transmitted of the slave device is composed of binary data 1 and binary data 0. The second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
It should be emphasized that the first modulation signal transmitted by the master device to the slave device through the first power line is a square wave signal regardless of whether the first modulation signal corresponds to binary data 1 or the first modulation signal corresponds to binary data 0, so as to ensure that the slave device extracts the clock signal according to the rising edge in the first modulation signal.
And the slave device transmits a second modulation signal to the master device through a second power line, wherein the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal. For example, the second modulation signal corresponding to the binary data 1 is a high level signal (e.g., +5V level signal), and the second modulation signal corresponding to the binary data 0 is a low level signal (e.g., 0V level signal). Of course, it can also be provided that: the second modulation signal corresponding to the binary data 1 is a low level signal, and the second modulation signal corresponding to the binary data 0 is a high level signal.
The process of the slave device sending the second modulation signal to the master device through the second power line needs to be performed according to the clock cycle extracted from the first modulation signal. Also, the slave device transmits the second modulation signal to the master device through the second power line only during a period in which the first modulation signal is in the first level interval.
It should be noted that, the slave device encapsulates the data information to be sent based on the specified protocol to obtain the data to be sent. That is, the data to be transmitted generated by the slave device satisfies the frame format of the specified protocol, including the frame header and the data information.
S104: and the master device samples the second modulation signal on the second power line in the period when the first modulation signal is in the first level interval, and determines binary data corresponding to the sampling result.
In the process that the master device transmits the first modulation signal to the slave device through the first power line, if the slave device needs to transmit data to the master device, the slave device transmits a second modulation signal to the master device through the second power line during a period in which the first modulation signal is in the first level interval in accordance with a clock signal extracted from the first modulation signal. Accordingly, the master device samples the second modulation signal on the second power line during a period in which the first modulation signal is in the first level section, and determines whether the sampling result corresponds to binary data 1 or binary data 0.
It should be noted that, the slave device extracts the clock signal based on the first modulation signal sent by the master device, and then, after the master device adjusts the clock signal, the clock signal extracted by the slave device based on the first modulation signal sent by the master device changes accordingly. That is, the clock period of communication between the master device and the slave device can be flexibly adjusted.
In one possible implementation, the duty cycle of the first square wave signal is greater than the duty cycle of the second square wave signal. Accordingly, the first level interval is an interval greater than the first voltage threshold. That is to say, according to the extracted clock signal, the slave device sends a second modulation signal to the master device through the second power line in a period when the voltage amplitude of the first modulation signal is greater than the first voltage threshold, and correspondingly, the master device samples the second modulation signal on the second power line in a period when the voltage amplitude of the first modulation signal is greater than the first voltage threshold, and determines binary data corresponding to the sampling result.
This is explained in connection with fig. 3.
The method comprises the steps that a master device generates a first modulation signal based on self data to be sent, the first modulation signal is sent to a slave device through a first power line, the first modulation signal corresponding to binary data 1 is a first square wave signal, a second modulation signal corresponding to binary data 0 is a second square wave signal, and the duty ratio of the first square wave signal is larger than that of the second square wave signal.
The slave device extracts a clock signal on the basis of the first modulation signal, according to which the voltage amplitude of the first modulation signal is greater than a first voltage threshold VOHminA second modulation signal is transmitted to the master device through the second power line during the period of time (c). Correspondingly, the voltage amplitude of the main device in the first modulation signal is larger than the first voltage threshold value VOHminIn the time period of (3), sampling a second modulation signal on a second power line, and determining binary data corresponding to the sampling result.
In fig. 3, S1 denotes a first modulation signal, S2 denotes a second modulation signal, the master samples the second modulation signal on the second power line during a period t1-t2 and a period t3-t4, determines binary data corresponding to the sampling result, and does not sample the second modulation signal on the second power line during a period t2-t3 and a period t4-t 5.
In another possible implementation manner, the duty ratio of the first square wave signal is smaller than the duty ratio of the second square wave signal, and accordingly, the first level interval is an interval smaller than the first voltage threshold. That is to say, according to the extracted clock signal, the slave device sends a second modulation signal to the master device through the second power line in a period when the voltage amplitude of the first modulation signal is smaller than the first voltage threshold, and correspondingly, the master device samples the second modulation signal on the second power line in a period when the voltage amplitude of the first modulation signal is smaller than the first voltage threshold, and determines binary data corresponding to the sampling result.
This is explained in connection with fig. 4.
The method comprises the steps that a master device generates a first modulation signal based on self data to be sent, the first modulation signal is sent to a slave device through a first power line, the first modulation signal corresponding to binary data 1 is a first square wave signal, a second modulation signal corresponding to binary data 0 is a second square wave signal, and the duty ratio of the first square wave signal is smaller than that of the second square wave signal.
The slave device extracts a clock signal on the basis of the first modulation signal, according to which the voltage amplitude of the first modulation signal is smaller than a first voltage threshold VOHminA second modulation signal is transmitted to the master device through the second power line during the period of time (c). Correspondingly, the voltage amplitude of the first modulation signal of the main device is smaller than the first voltage threshold value VOHminIn the time period of (3), sampling a second modulation signal on a second power line, and determining binary data corresponding to the sampling result.
In fig. 4, S1 denotes a first modulation signal, S2 denotes a second modulation signal, the master samples the second modulation signal on the second power line during a period t2-t3 and a period t4-t5, determines binary data corresponding to the sampling result, and does not sample the second modulation signal on the second power line during a period t1-t2 and a period t3-t 4.
According to the communication method, two transmission paths are established between a master device and a slave device through two power lines, the master device generates a first modulation signal based on data to be sent, and sends the first modulation signal to the slave device through the first power line, wherein the first modulation signal corresponding to binary data 1 is a first square wave signal, the first modulation signal corresponding to binary data 0 is a second square wave signal, and the duty ratios of the first square wave signal and the second square wave signal are different; the slave device receives a first modulation signal sent by the master device, samples the first modulation signal, determines binary data corresponding to a sampling result, extracts a clock signal based on a rising edge in the first modulation signal, and sends a second modulation signal to the master device through a second power line in a period when the first modulation signal is in a first level interval according to the extracted clock signal; and the master device samples the second modulation signal on the second power line in the time period when the first modulation signal is in the first level interval, determines binary data corresponding to the sampling result and realizes full-duplex communication between the master device and the slave device. In addition, the clock signal used by the slave device is extracted based on the first modulation signal transmitted by the master device, and when the master device adjusts the clock signal, the clock signal extracted by the slave device also changes accordingly, so that the clock period of the communication between the master device and the slave device can be flexibly adjusted.
In the communication method disclosed in the above application, when the master device has a data transmission requirement, a first modulation signal is generated based on data to be transmitted, and the first modulation signal is transmitted to the slave device through the first power line, so that data transmission from the master device to the slave device is realized. In the process, if the slave device needs to transmit data to the master device, the slave device extracts a clock signal based on a rising edge in the first modulation signal, and transmits a second modulation signal to the master device through the second power line in a period when the first modulation signal is in the first level interval according to the extracted clock signal, so that data transmission from the slave device to the master device is realized.
In implementation, the following scenarios exist: the slave device has a need to send data to the master device, but the master device does not have a need to send data to the slave device. That is, when the slave device needs to transmit data to the master device, the master device does not transmit the first modulated signal to the slave device. Based on this, the applicant improves on the communication method shown in fig. 1 to realize that the slave device transmits data to the master device in the above scenario.
Referring to fig. 5, fig. 5 is a signaling diagram of another communication method disclosed in the present application. The communication method comprises the following steps:
s501: under the condition that the slave device does not receive the first modulation signal transmitted by the master device, if the slave device has a data transmission requirement, the voltage of the second power line is adjusted to the first voltage value.
For example, when the first power line and the second power line are idle, both the first power line and the second power line are at a low level, such as 0V. When the slave device has a data transmission requirement but does not receive the first modulation signal transmitted by the master device, the slave device pulls up the voltage of the second power line, for example, the voltage of the second power line is adjusted to 5V, so that the master device knows that the slave device has the data transmission requirement, and executes a corresponding strategy.
It should be noted that the slave device adjusts the voltage of the second power line to 5V, which is merely an example.
S502: the master device detects a voltage of the second power supply line without transmitting the first modulation signal to the slave device.
S503: the master device transmits a third modulation signal to the slave device through the first power line upon detecting a voltage jump of the second power line to the first voltage value.
Wherein the third modulation signal is formed by a second square wave signal.
S504: the slave device receives a third modulation signal sent by the master device through the first power line, samples the third modulation signal, determines binary data corresponding to a sampling result, and extracts a clock signal based on the third modulation signal.
In the case where the slave device has a data transmission demand but the master device has no data transmission demand, the slave device adjusts the voltage of the second power supply line to the first voltage value so that the master device transmits a third modulation signal composed of the second square wave signal to the slave device through the first power supply line, so that the slave device extracts the clock signal based on the third modulation signal.
And a clock period is between two adjacent rising edges in the third modulation signal. The slave device extracts the clock signal based on the rising edge in the third modulated signal.
S505: the slave device transmits a second modulation signal to the master device through the second power line during a period in which the third modulation signal is in the first level interval in accordance with the clock signal.
The second modulation signal is generated based on data to be transmitted of the slave device, the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
S506: and the master device samples the second modulation signal on the second power line in the period when the third modulation signal is in the first level interval, and determines binary data corresponding to the sampling result.
In one possible implementation, the duty cycle of the first square wave signal is greater than the duty cycle of the second square wave signal. Accordingly, the first level interval is an interval greater than the first voltage threshold. That is, the slave device extracts a clock signal based on the third modulation signal, and according to the extracted clock signal, transmits the second modulation signal to the master device through the second power line in a period in which the voltage amplitude of the third modulation signal is greater than the first voltage threshold, and accordingly, the master device samples the second modulation signal on the second power line in a period in which the voltage amplitude of the third modulation signal is greater than the first voltage threshold, and determines binary data corresponding to the sampling result.
In another possible implementation manner, the duty ratio of the first square wave signal is smaller than the duty ratio of the second square wave signal, and accordingly, the first level interval is an interval smaller than the first voltage threshold. That is to say, the slave device extracts a clock signal based on the third modulation signal, and according to the extracted clock signal, transmits the second modulation signal to the master device through the second power line in a period in which the voltage amplitude of the third modulation signal is smaller than the first voltage threshold, and accordingly, the master device samples the second modulation signal on the second power line in a period in which the voltage amplitude of the third modulation signal is smaller than the first voltage threshold, and determines binary data corresponding to the sampling result.
In the communication method shown in fig. 5, when the slave device has a data transmission requirement but the master device does not have the data transmission requirement, the slave device adjusts the voltage of the second power line to the first voltage value, so that the master device knows that the slave device has the data transmission requirement, and transmits a third modulation signal to the slave device through the first power line, where the third modulation signal is formed by a second square wave signal; the slave device extracts a clock signal based on the third modulation signal, and transmits a second modulation signal to the master device through the second power line in a period when the third modulation signal is in the first level interval according to the clock signal; and the master device samples the second modulation signal on the second power line in the period when the third modulation signal is in the first level interval, determines binary data corresponding to the sampling result and realizes data transmission from the slave device to the master device.
In the present application, a modulated signal generated based on data to be transmitted and transmitted from the master device to the slave device is referred to as a first modulated signal, and a modulated signal composed only of a second square wave signal and transmitted from the master device to the slave device when there is no data transmission need is referred to as a third modulated signal.
In the case where the slave device has a data transmission demand but the master device has no data transmission demand, the slave device adjusts the voltage of the second power line to the first voltage value so that the master device transmits a third modulation signal consisting of only the second square wave signal to the slave device through the first power line. And then, when the master equipment has a data transmission requirement, generating data to be transmitted, and transmitting a first modulation signal generated based on the data to be transmitted to the slave equipment through the first power line. It can be seen that, after the slave device adjusts the voltage of the second power line to the first voltage value, it cannot be known in advance when the master device starts to transmit the first modulation signal generated based on the data to be transmitted, therefore, no matter whether the master device transmits the first modulation signal or the third modulation signal, the slave device needs to sample the received modulation signal, determine binary data corresponding to the sampling result, extract a clock signal according to a rising edge in the received modulation signal under the condition of a requirement of transmitting data to the master device, and transmit the second modulation signal to the master device through the second power line in a period when the modulation signal is in the first level interval.
The application discloses a communication method applied to a master device and a slave device, and correspondingly, the application also discloses a communication device applied to the master device and the slave device. Two transmission paths are established between the master device and the slave device through the first power line and the second power line. That is, a first transmission path is established between the master device and the slave device through the first power line, and a second transmission path is established between the master device and the slave device through the second power line.
Referring to fig. 6, fig. 6 is a schematic structural diagram of the communication apparatus applied to the master device disclosed in the present application. The communication device includes:
a first signal processing unit 100 for transmitting a first modulated signal to the slave device through a first power line. The first modulation signal is generated based on data to be transmitted of the master device, the first modulation signal corresponding to the binary data 1 is a first square wave signal, the first modulation signal corresponding to the binary data 0 is a second square wave signal, and duty ratios of the first square wave signal and the second square wave signal are different.
The second signal processing unit 200 is configured to sample the second modulation signal on the second power line in a period when the first modulation signal is in the first level interval, and determine binary data corresponding to a sampling result. The slave device extracts a clock signal based on the first modulation signal, and sends a second modulation signal to the master device through a second power line in a period when the first modulation signal is in a first level interval according to the clock signal, wherein the second modulation signal is generated based on data to be sent of the slave device, the second modulation signal corresponding to binary data 1 is the first level signal, and the second modulation signal corresponding to binary data 0 is the second level signal.
Optionally, on the basis of the communication device shown in fig. 6, further setting:
a voltage detection unit for detecting a voltage of the second power line in a case where the first modulation signal is not transmitted to the slave device.
And the third signal processing unit is used for sending a third modulation signal to the slave equipment through the first power line when the voltage jump of the second power line is detected to reach the first voltage value, wherein the third modulation signal is formed by a second square wave signal.
And the fourth signal processing unit is used for sampling the second modulation signal on the second power line in a period when the third modulation signal is in the first level interval and determining binary data corresponding to the sampling result. The slave device extracts a clock signal based on the third modulation signal, and sends a second modulation signal to the master device through the second power line in a period of time when the third modulation signal is in the first level interval according to the clock signal extracted based on the third modulation signal, the second modulation signal is generated by the slave device based on data to be sent, the second modulation signal corresponding to the binary data 1 is the first level signal, and the second modulation signal corresponding to the binary data 0 is the second level signal.
In one possible implementation, the duty cycle of the first square wave signal is greater than the duty cycle of the second square wave signal. Accordingly, the first level interval is an interval greater than the first voltage threshold. That is to say, according to the extracted clock signal, the slave device sends a second modulation signal to the master device through the second power line in a period when the voltage amplitude of the first modulation signal is greater than the first voltage threshold, and correspondingly, the master device samples the second modulation signal on the second power line in a period when the voltage amplitude of the first modulation signal is greater than the first voltage threshold, and determines binary data corresponding to the sampling result.
In another possible implementation manner, the duty ratio of the first square wave signal is smaller than the duty ratio of the second square wave signal, and accordingly, the first level interval is an interval smaller than the first voltage threshold. That is to say, according to the extracted clock signal, the slave device sends a second modulation signal to the master device through the second power line in a period when the voltage amplitude of the first modulation signal is smaller than the first voltage threshold, and correspondingly, the master device samples the second modulation signal on the second power line in a period when the voltage amplitude of the first modulation signal is smaller than the first voltage threshold, and determines binary data corresponding to the sampling result.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a communication apparatus applied to a slave device disclosed in the present application. The communication device includes:
the first signal extraction unit 300 is configured to sample a first modulation signal transmitted by the master device through the first power line, determine binary data corresponding to a sampling result, and extract a clock signal based on the first modulation signal. The first modulation signal is generated by the master device based on data to be transmitted, the first modulation signal corresponding to binary data 1 is a first square wave signal, the first modulation signal corresponding to binary data 0 is a second square wave signal, duty ratios of the first square wave signal and the second square wave signal are different, and a clock period is formed between two adjacent rising edges in the first modulation signal.
A fifth signal processing unit 400 for transmitting the second modulation signal to the master device through the second power line during a period in which the first modulation signal is in the first level section according to the extracted clock signal. The second modulation signal is generated based on data to be transmitted of the slave device, the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
Optionally, on the basis of the communication device shown in fig. 7, further setting:
and the voltage adjusting unit is used for adjusting the voltage of the second power line to the first voltage value to trigger the master device to send a third modulation signal to the slave device through the first power line if the first modulation signal sent by the master device is not received and data sending requirements exist, wherein the third modulation signal is formed by a second square wave signal.
And the second signal extraction unit is used for sampling a third modulation signal transmitted by the master device through the first power line, determining binary data corresponding to a sampling result of the third modulation signal, and extracting a clock signal based on the third modulation signal, wherein a clock period is formed between two adjacent rising edges in the third modulation signal.
And a sixth signal processing unit, configured to send, according to a clock signal extracted based on the third modulation signal, a second modulation signal to the master device through the second power line in a period when the third modulation signal is in the first level interval, where the second modulation signal is generated based on data to be sent of the slave device, the second modulation signal corresponding to binary data 1 is the first level signal, and the second modulation signal corresponding to binary data 0 is the second level signal.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The communication device disclosed by the embodiment corresponds to the communication method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A communication method in which two transmission paths are established between a master device and a slave device via a first power line and a second power line, the communication method being applied to the master device, the communication method comprising:
sending a first modulation signal to the slave device through the first power line, wherein the first modulation signal is generated based on data to be sent of the master device, the first modulation signal corresponding to binary data 1 is a first square wave signal, the first modulation signal corresponding to binary data 0 is a second square wave signal, and the duty ratios of the first square wave signal and the second square wave signal are different;
sampling a second modulation signal on the second power line in a period when the first modulation signal is in a first level interval, and determining binary data corresponding to a sampling result, wherein the slave device extracts a clock signal based on the first modulation signal, and according to the clock signal, in the period when the first modulation signal is in the first level interval, the slave device sends a second modulation signal to the master device through the second power line, the second modulation signal is generated by the slave device based on data to be sent, the second modulation signal corresponding to binary data 1 is a first level signal, and the second modulation signal corresponding to binary data 0 is a second level signal.
2. The communication method according to claim 1, further comprising:
detecting a voltage of a second power line in a case where the first modulation signal is not transmitted to the slave device;
if the voltage of the second power line jumps to a first voltage value, sending a third modulation signal to the slave device through the first power line, wherein the third modulation signal is composed of the second square wave signal;
sampling a second modulation signal on the second power line in a period when the third modulation signal is in a first level interval, and determining binary data corresponding to the sampling result, wherein the slave device extracts a clock signal based on the third modulation signal, and according to the clock signal extracted based on the third modulation signal, transmits the second modulation signal to the master device through the second power line in the period when the third modulation signal is in the first level interval, the second modulation signal is generated by the slave device based on data to be transmitted, the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
3. The communication method according to claim 1 or 2, wherein a duty ratio of the first square wave signal is larger than a duty ratio of the second square wave signal;
correspondingly, the first level interval is an interval greater than a first voltage threshold.
4. The communication method according to claim 1 or 2, wherein a duty ratio of the first square wave signal is smaller than a duty ratio of the second square wave signal;
correspondingly, the first level interval is an interval smaller than a first voltage threshold.
5. A communication method in which two transmission paths are established between a master device and a slave device via a first power line and a second power line, the communication method being applied to the slave device, the communication method comprising:
sampling a first modulation signal sent by the master device through the first power line, determining binary data corresponding to a sampling result, and extracting a clock signal based on the first modulation signal, wherein the first modulation signal is generated by the master device based on data to be sent, the first modulation signal corresponding to binary data 1 is a first square wave signal, the first modulation signal corresponding to binary data 0 is a second square wave signal, duty ratios of the first square wave signal and the second square wave signal are different, and a clock period is formed between two adjacent rising edges in the first modulation signal;
according to the clock signal, in a period when the first modulation signal is in a first level interval, sending a second modulation signal to the master device through the second power line, where the second modulation signal is generated based on data to be sent of the slave device, the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
6. The communication method according to claim 5, further comprising:
under the condition that a first modulation signal sent by the master device is not received, if data sending is required, the voltage of the second power line is adjusted to a first voltage value so as to trigger the master device to send a third modulation signal to the slave device through the first power line, wherein the third modulation signal is formed by the second square wave signal;
sampling a third modulation signal transmitted by the master device through the first power line, determining binary data corresponding to a sampling result of the third modulation signal, and extracting a clock signal based on the third modulation signal, wherein a clock period is between two adjacent rising edges in the third modulation signal;
according to a clock signal extracted based on the third modulation signal, in a period when the third modulation signal is in the first level interval, sending a second modulation signal to the master device through the second power line, where the second modulation signal is generated based on data to be sent of the slave device, the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
7. A communication apparatus, wherein two transmission paths are established between a master device and a slave device via a first power line and a second power line, the communication apparatus being applied to the master device, the communication apparatus comprising:
the first signal processing unit is configured to send a first modulation signal to the slave device through the first power line, where the first modulation signal is generated based on data to be sent of the master device, the first modulation signal corresponding to binary data 1 is a first square wave signal, the first modulation signal corresponding to binary data 0 is a second square wave signal, and duty ratios of the first square wave signal and the second square wave signal are different;
the second signal processing unit is configured to sample a second modulation signal on the second power line in a period when the first modulation signal is in a first level interval, and determine binary data corresponding to a sampling result, where the slave device extracts a clock signal based on the first modulation signal, and sends a second modulation signal to the master device through the second power line in the period when the first modulation signal is in the first level interval according to the clock signal, the second modulation signal is generated by the slave device based on data to be sent, the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
8. The communications device of claim 7, further comprising:
a voltage detection unit for detecting a voltage of the second power supply line in a case where a first modulation signal is not transmitted to the slave device;
a third signal processing unit, configured to send a third modulation signal to the slave device through the first power line when it is detected that the voltage of the second power line jumps to a first voltage value, where the third modulation signal is formed by the second square wave signal;
a fourth signal processing unit, configured to sample a second modulation signal on the second power line in a period when the third modulation signal is in a first level interval, and determine binary data corresponding to a sampling result, where the slave device extracts a clock signal based on the third modulation signal, and sends the second modulation signal to the master device through the second power line according to the clock signal extracted based on the third modulation signal in the period when the third modulation signal is in the first level interval, the second modulation signal is generated by the slave device based on data to be sent, the second modulation signal corresponding to the binary data 1 is the first level signal, and the second modulation signal corresponding to the binary data 0 is the second level signal.
9. A communication apparatus, wherein two transmission paths are established between a master device and a slave device via a first power line and a second power line, the communication apparatus being applied to the slave device, the communication apparatus comprising:
the first signal extraction unit is configured to sample a first modulation signal sent by the master device through the first power line, determine binary data corresponding to a sampling result, and extract a clock signal based on the first modulation signal, where the first modulation signal is generated by the master device based on data to be sent, the first modulation signal corresponding to binary data 1 is a first square wave signal, the first modulation signal corresponding to binary data 0 is a second square wave signal, duty ratios of the first square wave signal and the second square wave signal are different, and a clock period is between two adjacent rising edges in the first modulation signal;
and a fifth signal processing unit, configured to send, according to the clock signal, a second modulation signal to the master device through the second power line in a period when the first modulation signal is in a first level interval, where the second modulation signal is generated based on data to be sent of the slave device, the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
10. The communications device of claim 9, further comprising:
the voltage adjusting unit is used for adjusting the voltage of the second power line to a first voltage value to trigger the master device to send a third modulation signal to the slave device through the first power line under the condition that a first modulation signal sent by the master device is not received and if a data sending requirement exists, wherein the third modulation signal is formed by the second square wave signal;
the second signal extraction unit is configured to sample a third modulation signal sent by the master device through the first power line, determine binary data corresponding to a sampling result of the third modulation signal, and extract a clock signal based on the third modulation signal, where a clock period is between two adjacent rising edges in the third modulation signal;
a sixth signal processing unit, configured to send, according to a clock signal extracted based on the third modulation signal, a second modulation signal to the master device through the second power line in a period where the third modulation signal is in the first level interval, where the second modulation signal is generated based on data to be sent by the slave device, the second modulation signal corresponding to the binary data 1 is a first level signal, and the second modulation signal corresponding to the binary data 0 is a second level signal.
CN202111229983.2A 2021-10-22 2021-10-22 Communication method and communication device Active CN113691284B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111229983.2A CN113691284B (en) 2021-10-22 2021-10-22 Communication method and communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111229983.2A CN113691284B (en) 2021-10-22 2021-10-22 Communication method and communication device

Publications (2)

Publication Number Publication Date
CN113691284A true CN113691284A (en) 2021-11-23
CN113691284B CN113691284B (en) 2022-03-01

Family

ID=78587663

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111229983.2A Active CN113691284B (en) 2021-10-22 2021-10-22 Communication method and communication device

Country Status (1)

Country Link
CN (1) CN113691284B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6462679B1 (en) * 2000-07-19 2002-10-08 Vdv Media Technologies, Inc. Method and apparatus for modulating a signal
CN102625541A (en) * 2012-04-11 2012-08-01 深圳市明微电子股份有限公司 Pulse modulation control method and device for driving LED
CN102857220A (en) * 2011-12-27 2013-01-02 龙迅半导体科技(合肥)有限公司 Serial clock restoring circuit in universal serial bus (USB) 2.0 high-speed mode
CN103347332A (en) * 2013-06-25 2013-10-09 矽力杰半导体技术(杭州)有限公司 Signal processing method and circuit and LED dimming circuit with circuit
CN107005085A (en) * 2014-11-19 2017-08-01 佩朗股份有限公司 System and method for two-way simultaneous communication
CN109245842A (en) * 2017-07-10 2019-01-18 中兴通讯股份有限公司 Method, equipment and the computer readable storage medium of synchronizing clock time
CN113297109A (en) * 2020-02-24 2021-08-24 上海复控华龙微系统技术有限公司 Bus communication method and device and bus communication system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6462679B1 (en) * 2000-07-19 2002-10-08 Vdv Media Technologies, Inc. Method and apparatus for modulating a signal
CN102857220A (en) * 2011-12-27 2013-01-02 龙迅半导体科技(合肥)有限公司 Serial clock restoring circuit in universal serial bus (USB) 2.0 high-speed mode
CN102625541A (en) * 2012-04-11 2012-08-01 深圳市明微电子股份有限公司 Pulse modulation control method and device for driving LED
CN103347332A (en) * 2013-06-25 2013-10-09 矽力杰半导体技术(杭州)有限公司 Signal processing method and circuit and LED dimming circuit with circuit
CN107005085A (en) * 2014-11-19 2017-08-01 佩朗股份有限公司 System and method for two-way simultaneous communication
CN109245842A (en) * 2017-07-10 2019-01-18 中兴通讯股份有限公司 Method, equipment and the computer readable storage medium of synchronizing clock time
CN113297109A (en) * 2020-02-24 2021-08-24 上海复控华龙微系统技术有限公司 Bus communication method and device and bus communication system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
毛京丽: "《数据通信原理》", 31 May 2015 *

Also Published As

Publication number Publication date
CN113691284B (en) 2022-03-01

Similar Documents

Publication Publication Date Title
CN100502324C (en) Method for obtaining chain circuit evaluating parameter
EP1959627A3 (en) Method and apparatus for transmitting and receiving control information in a single carrier FDMA system
US11955818B2 (en) Method and devices for providing operational feedback during power transfer in a wireless power transfer system
RU2015148138A (en) METHOD AND DEVICE OF WIRELESS COMMUNICATION INTENDED FOR PROVIDING COMMUNICATION OF TYPE "DEVICE-C-DEVICE"
ATE455423T1 (en) METHOD FOR MINIMIZING COMPATIBILITY ERRORS IN HIERARCHICAL MODULATION
CN102090036A (en) Methods and apparatuses for estimating time delay and frequency offset in single frequency networks
CN101083648A (en) OFDM receiver, interference wave discernment method, window control apparatus and window control method
EP1655960A3 (en) Apparatus and method for transmitting/receiving image data in mobile communication system
BR9908123B1 (en) PROCESS AND APPARATUS FOR DETECTING A TRANSMITTED TRANSMITTER FREQUENCY SYNCHRONIZATION SIGNAL TO THE RECEIVER WITH OTHER SIGNS
CN102122970B (en) Code length adaptive spread spectrum modulating method and equipment in power line carrier meter reading system
CN113691284B (en) Communication method and communication device
EP1768333A4 (en) Message transfer system and message transfer method
KR100202385B1 (en) Receiver for semi-doule communication in using hdlc
CN114337724B (en) Wireless communication method, device and equipment based on dual-channel technology
JP2019520754A (en) Method and apparatus for transmission
CN102118185A (en) Bimodule low-voltage carrier wave modulation method and device used for electric centralized meter reading
CN104735042A (en) Webpage cross-screen transmission self-adaptive adjustment method, device and system
EP3244652A1 (en) Channel sending method, and receiving method and device
WO2023197443A1 (en) Signal transmission method, apparatus and device based on drilling device, and medium
US9843438B2 (en) Transmission device, reception device, and transceiver system
DE60109034D1 (en) INFORMATION TRANSMISSION PROCEDURE, ESPECIALLY ADVERTISING INFORMATION TO A USER TERMINAL
CN110446198A (en) The more base station communication methods of electronic label
CN103873174B (en) A kind of hidden acoustical signal broadcast transmission receiving terminal electricity-saving control method
US20220103204A1 (en) Method and device for transmitting data by using power line, and method and device for receiving data by using power line
US20230412208A1 (en) Transceiver

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant