Electronic devices and electronic products
By using wireless communication modules, counters and processing circuits in electronic devices to process count value packets and generate output signals that are the same as the original signals, the impact of environmental factors on frequency signals is solved and the accuracy and real-time performance of electronic product signal measurement are achieved. .
Patent Information
- Application Number
- CN202110062306.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-02-25
- Filing Date
- 2021-01-18
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-01-18
AI Technical Summary
During the testing of electronic products, due to the influence of environmental factors on frequency signals, measurement errors and signal delays occur, making it impossible to accurately receive and judge the correctness and accuracy of the internal signals of electronic products.
An electronic device is designed, including a wireless communication module, a counter and a processing circuit. By receiving and processing count value packets, an output signal is generated that is substantially the same as the original signal, thereby reducing the impact of frequency signal errors.
It achieves accurate reconstruction and judgment of internal signals of electronic products under the influence of environmental factors, reduces measurement errors, and ensures the accuracy and real-time performance of signal measurement.
Smart Images

Figure CN113376454B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an electronic device and an electronic product with wireless communication function. Background Art
[0002] Generally, electronic products are tested in the factory before shipment to ensure that their functions and operations are normal. However, for some electronic products that cannot be tested by physical connection, such as wireless meters, it is necessary to test whether the signals in the electronic products are normal and accurate enough by wireless transmission. Specifically, during the testing phase, the electronic product needs to transmit the relevant information of one or more internal signals to the measuring device via wireless transmission so that the measuring device can determine the correctness and accuracy of the internal signals of the electronic product. However, since the frequency of the frequency signal in the electronic system is easily affected by environmental factors (for example, ambient temperature), the above test process will cause measurement errors due to the difference in the frequency signal between the electronic product and the measuring device, and the signal delay of the wireless transmission will also be affected by environmental factors, resulting in the measurement device being unable to receive the signal-related information from the electronic product in real time, resulting in errors in signal measurement. Summary of the invention
[0003] Therefore, one of the objectives of the present invention is to provide an electronic device that can be used in a measuring device to accurately generate an output signal that is identical to an internal signal of an electronic product for signal measurement and judgment, thereby solving the problems described in the prior art.
[0004] In one embodiment of the present invention, an electronic device is disclosed, comprising a wireless communication module, a counter, and a processing circuit. The wireless communication module is used to receive a first packet and a second packet from another electronic device, wherein the first packet comprises a first count value, the second packet comprises a second count value, and the first count value and the second count value correspond to two adjacent edges of an original signal of the other electronic device, respectively; the counter is used to continuously count according to a frequency signal; and the processing circuit is used to obtain a third count value from the counter when the first packet is received, and obtain a fourth count value from the counter when the second packet is received; and the processing circuit also generates an output signal substantially identical to the original signal according to the first count value, the second count value, the third count value, and the fourth count value.
[0005] In another embodiment of the present invention, an electronic product is disclosed, which includes a counter, a detection circuit, and a wireless communication module. The counter is used to continuously count according to a frequency signal; the detection circuit is used to detect an original signal in real time, and obtain a first count value from the counter when the rising edge of the original signal appears, and obtain a second count value from the counter when the falling edge of the original signal appears; and the wireless communication module is used to transmit the first count value to an electronic device through a first packet after the detection circuit obtains the first count value, and transmit the second count value to the electronic device through a second packet after the detection circuit obtains the first count value.
[0006] In another embodiment of the present invention, an electronic device is disclosed, which includes a wireless communication module, a counter and a processing circuit. The wireless communication module is used to receive a first packet, a second packet, a third packet and a fourth packet from another electronic device, wherein the first packet at least includes a first count value, the second packet at least includes a second count value, the third packet at least includes a third count value, and the fourth packet at least includes a fourth count value, and the first count value and the second count value correspond to two adjacent edges of an original signal of the other electronic device, respectively, and the third count value and the fourth count value are generated according to two packets transmitted from the wireless communication module to the other electronic device. The counter is used to continuously count according to a frequency signal. The processing circuit is coupled to the wireless communication module and the counter, and is used to generate an output signal substantially identical to the original signal according to the first count value, the second count value, the third count value and the fourth count value. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 FIG. 4 is a schematic diagram of an electronic product and an electronic device according to an embodiment of the present invention.
[0008] Figure 2 Schematic diagram of generating a packet including a first count value and a second count value for an electronic product.
[0009] Figure 3 A schematic diagram of generating a third count value and a fourth count value for an electronic device and generating an output signal accordingly.
[0010] Figure 4 FIG. 4 is a schematic diagram of an electronic product and an electronic device according to another embodiment of the present invention.
[0011] Figure 5 for Figure 4 A schematic diagram of an electronic product generating a packet including a first count value and a second count value.
[0012] Figure 6 for Figure 4 A schematic diagram of an electronic device generating a third count value and a fourth count value and generating an output signal accordingly.
[0013] Figure 7 FIG. 4 is a schematic diagram of an electronic product and an electronic device according to another embodiment of the present invention.
[0014] Figure 8 Schematic diagram of generating a first count value, a second count value, a third count value and a fourth count value for an electronic product.
[0015] Fig. 9 Schematic diagram of generating output signals for electronic devices. DETAILED DESCRIPTION
[0016] Figure 1 1 is a schematic diagram of an electronic product 110 and an electronic device 120 according to an embodiment of the present invention, wherein the electronic device 120 may be disposed in a measuring device to determine the signal state of an original signal Din in the electronic product 110. Figure 1 As shown, the electronic product 110 includes a wireless communication module 112, a detection circuit 114 and a counter 116, and the electronic device 120 includes a wireless communication module 122, a processing circuit 124 and a counter 126. In this embodiment, the electronic product 110 can be a wireless meter (Watt hour meter), which can be installed in any environment where electricity is used and record the amount of electricity used in the environment, and the original signal Din is used to represent the power consumption of the environment; the electronic device 120 is used to internally reconstruct an output signal Dout that is substantially the same as the original signal Din, so as to determine the quality of the original signal Din.
[0017] When the electronic product 110 is in a testing phase, the electronic product 110 receives an original signal Din from the outside, wherein the original signal Din is used to simulate a digital signal generated by the electronic product 110 in actual application, and the original signal Din may come from a measuring device including the electronic device 120 (for example, transmitted through other interfaces). In addition, the counter 116 may be a free-run counter, which may continuously generate a count value CV1 according to the frequency signal CLK1. Next, the detection circuit 114 continuously detects the original signal Din to determine whether the original signal Din has a change in level, that is, to determine whether an edge appears on the waveform of the original signal Din, so as to generate a detection result D_res. Specifically, when the detection circuit 114 detects that the original signal Din changes from a low level to a high level, the detection circuit 114 will obtain the current count value CV1 from the counter 116 to obtain a first count value for generating a detection result D_res and transmitting it to the electronic device 120 through the wireless communication module 112, wherein the detection result D_res at this time includes the first count value corresponding to the rising edge of the original signal Din. On the other hand, when the detection circuit 114 detects that the original signal Din changes from a high level to a low level, the detection circuit 114 will obtain the current count value CV1 from the counter 116 to obtain a second count value for generating a detection result D_res and transmitting it to the electronic device 120 through the wireless communication module 112, wherein the detection result D_res at this time includes the second count value corresponding to the falling edge of the original signal Din. In summary, whenever the detection circuit 114 detects that the original signal Din has a rising edge or a falling edge, the count value CV1 of the counter 116 is obtained in real time, and a detection result D_res is generated to transmit the rising edge or falling edge information and the corresponding count value to the electronic device 120. In the present embodiment, since the detection circuit 114 immediately transmits the corresponding detection result D_res to the electronic device 120 when it detects that the original signal Din has a rising edge or a falling edge, no matter how close the distance between the rising edge and the falling edge of the original signal Din is, a packet will only include the count value of one edge of the original signal Din, however, the present invention is not limited thereto.
[0018] In the operation of the electronic device 120, the wireless communication module 122 continuously receives a plurality of packets from the electronic product 110, wherein some of the plurality of packets include the detection result D_res generated by the electronic product 110. In addition, the counter 126 may be a free-running counter, which may continuously generate a count value CV2 according to the frequency signal CLK2. When the processing circuit 124 receives a signal having the detection result D_res through the wireless communication module 122, the processing circuit 124 obtains the count value CV2 from the counter 126 in real time for subsequent calculations. Specifically, when the processing circuit 124 receives the rising edge information including the original signal Din and the corresponding first count value through the wireless communication module 122, the processing circuit 124 obtains the current count value CV2 from the counter 126 to obtain a third count value; and when the processing circuit 124 receives the falling edge information including the original signal Din and the corresponding second count value through the wireless communication module 122, the processing circuit 124 obtains the current count value CV2 from the counter 126 to obtain a fourth count value. Finally, the processing circuit 124 generates an output signal Dout that is the same as the original signal Din according to the first count value and the second count value from the electronic product 110, the third count value and the fourth count value obtained by the electronic device 120 itself, and the time interval between the two received signals (packets) containing the detection result D_res.
[0019] by Figure 2 , Figure 3 Take this as an example to illustrate, Figure 2 A schematic diagram of generating a packet including a first count value and a second count value for the electronic product 110, and Figure 3 Schematic diagram of generating a third count value and a fourth count value for the electronic device 120 and generating an output signal Dout accordingly. In the following description, it is assumed that both the electronic product 110 and the electronic device 120 support the Bluetooth Low Energy (BLE) specification, and the wireless communication module 112 in the electronic product 110 transmits a Bluetooth packet to the wireless communication module 122 of the electronic device 120. Figure 2, the first count value obtained when the detection circuit 114 detects the rising edge of the original signal Din is "21200", and the electronic product 110 will immediately transmit the packet containing the first count value to the electronic device 120. If the packet transmission fails (for example, the electronic product 110 does not receive the confirmation information (ACK)), the electronic product 110 will retransmit the packet containing the first count value to the electronic device 120 after a fixed time interval. It should be noted that in this embodiment, the packet transmission interval is 7.5 milliseconds (ms), but this is only an example and not a limitation of the present invention. The packet transmission interval can be determined by the electronic product 110 and the electronic device 120 during online connection negotiation. Next, the second count value obtained when the detection circuit 114 detects the falling edge of the original signal Din is "1221231", and the electronic product 110 will immediately transmit the packet containing the second count value to the electronic device 120.
[0020] Next, refer to Figure 3 , assuming that the electronic device 120 successfully receives the packet containing the first count value when the electronic product 110 transmits it for the first time, the processing circuit 124 will obtain the count value of the current counter 126 to obtain the third count value "1024"; in addition, when the processing circuit 124 receives the packet containing the second count value transmitted from the electronic product 110, the processing circuit 124 will obtain the fourth count value "1201087" currently obtained from the counter 126. Next, assuming that the frequencies of the frequency signal CLK1 and the frequency signal CLK2 are both 40MHz, the width of each frequency cycle is 25 nanoseconds (ns), the first packet containing the first count value sent by the electronic product 110 is the first packet, the packet containing the second count value sent by the electronic product 110 is the fifth packet, and the transmission interval between each packet is 7.5 milliseconds, then the width W of the waveform of the output signal Dout having a high level can be calculated as follows:
[0021] W=[(1201087-1024)*25ns / (7.5ms*4)]*(1221231-21200)=1200094…………(1);
[0022] Wherein "(1221231-21200)*25ns" represents the width of the waveform of the original signal Din having a high level, and the calculated width W represents the width of the waveform of the original signal Din having a high level when the frequency signal CLK2 is used for counting. Therefore, after determining the width W of the output signal Dout, the processing circuit 124 can accurately establish the output signal Dout that is the same as the original signal Din according to the count value CV2 of the counter 126, for example Figure 3As shown, when the count value CV2 is "352000", the output signal Dout is controlled to change from a low level to a high level, and when the count value CV2 is "1552094", the output signal Dout is controlled to change from a high level to a low level.
[0023] It should be noted that in Figure 3 In the example shown, it is assumed that the electronic device 120 successfully receives the packet containing the first count value when the electronic product 110 transmits the packet containing the first count value for the first time. If the electronic device 120 successfully receives the packet containing the first count value when the electronic product 110 transmits the packet for the second time, then the "7.5ms*4" in the above formula (1) should be modified to "7.5ms*3", and the third count value "1024" should also be modified to the count value when the second packet is received. Since a person with ordinary knowledge in the art should be able to understand how to modify the content of formula (1) to apply to the case of packet retransmission after reading the above content, the details are not repeated here.
[0024] In this embodiment, when the electronic product 110 is a wireless meter, the width of the high level of the original signal Din represents the power consumption of the environment. Therefore, through the contents described in the above embodiment, even if the actual frequencies of the frequency signal CLK1 and the frequency signal CLK2 have errors due to process or environmental factors, the electronic device 120 can still accurately reproduce the original signal Din for subsequent applications.
[0025] On the other hand, during the testing phase of the electronic product 110, since the original signal Din of the electronic product is a known signal input from the outside, and the output signal Dout generated by the electronic device 120 can be completely identical to the original signal Din, the electronic device 120 itself can also determine whether the internal operation of the electronic product 110 is flawed by comparing the output signal Dout with the above-mentioned known signal, so as to detect the internal signal quality of the electronic product 110.
[0026] Figure 4 FIG. 4 is a schematic diagram of an electronic product 410 and an electronic device 420 according to an embodiment of the present invention, wherein the electronic device 420 may be disposed in a measuring device and used to determine the signal state of an original signal Din in the electronic product 410. Figure 4As shown, the electronic product 410 includes a wireless communication module 412, a detection circuit 414 and a counter 416, and the electronic device 420 includes a wireless communication module 422, a processing circuit 424 and a counter 426. In this embodiment, the electronic product 410 can be a wireless meter, which can be installed in any environment where electricity is used and record the amount of electricity used in the environment, and the original signal Din is used to represent the amount of electricity consumed in the environment; the electronic device 420 is used to internally reconstruct an output signal Dout that is the same as the original signal Din, so as to determine the quality of the original signal Din.
[0027] When the electronic product 410 is in a testing phase, the electronic product 410 receives an original signal Din from the outside, wherein the original signal Din is used to simulate a digital signal generated by the electronic product 410 in actual application, and the original signal Din may come from a measuring device including the electronic device 420 (for example, transmitted through other interfaces). In addition, the counter 416 may be a free-running counter, which may continuously generate a count value CV1 according to the frequency signal CLK1. Next, the detection circuit 414 continuously detects the original signal Din to determine whether the original signal Din has a change in level, that is, to determine whether an edge appears on the waveform of the original signal Din, so as to generate a detection result D_res. In detail, when the detection circuit 414 detects that the original signal Din changes from a low level to a high level, the detection circuit 414 will obtain the current count value CV1 from the counter 416 to obtain a first count value, so as to generate the detection result D_res and transmit it to the electronic device 420 through the wireless communication module 412, wherein the detection result D_res at this time includes the first count value corresponding to the rising edge of the original signal Din. In this embodiment, if the packet transmission of the electronic product 410 fails, before the packet is retransmitted, the detection circuit 414 will additionally obtain the current count value CV1 from the counter 416 to obtain an updated first count value, and transmit the updated first count value together with the previous first count value to the electronic device 420 through a new packet. On the other hand, when the detection circuit 414 detects that the original signal Din changes from a high level to a low level, the detection circuit 414 will obtain the current count value CV1 from the counter 416 to obtain a second count value for generating a detection result D_res and transmit it to the electronic device 420 through the wireless communication module 412, wherein the detection result D_res at this time includes the second count value corresponding to the falling edge of the original signal Din. In this embodiment, if the packet transmission of the electronic product 410 fails, before the packet is retransmitted, the detection circuit 414 will additionally obtain the current count value CV1 from the counter 416 to obtain an updated second count value, and transmit the updated second count value together with the previous second count value to the electronic device 420 through a new packet. In summary, whenever the detection circuit 414 detects that the original signal Din has a rising edge or a falling edge, the count value CV1 of the counter 416 is obtained in real time, and a detection result D_res is generated to transmit the rising edge information or the falling edge information and the corresponding count value to the electronic device 420. In this embodiment, since the detection circuit 414 immediately transmits the corresponding detection result D_res to the electronic device 420 when it detects that the original signal Din has a rising edge or a falling edge, no matter how close the distance between the rising edge and the falling edge of the original signal Din is, one packet only includes the count value of one edge of the original signal Din.
[0028] In the operation of the electronic device 420, the wireless communication module 422 continuously receives a plurality of packets from the electronic product 410, wherein some of the plurality of packets include the detection result D_res generated by the electronic product 410. In addition, the counter 426 may be a free-running counter, which may continuously generate a count value CV2 according to the frequency signal CLK2. When the processing circuit 424 receives a signal having the detection result D_res through the wireless communication module 422, the processing circuit 424 obtains the count value CV2 from the counter 426 in real time for subsequent calculations. Specifically, when the processing circuit 424 receives the rising edge information including the original signal Din and the corresponding first count value through the wireless communication module 422, the processing circuit 424 obtains the current count value CV2 from the counter 426 to obtain a third count value; and when the processing circuit 424 receives the falling edge information including the original signal Din and the corresponding second count value through the wireless communication module 422, the processing circuit 424 obtains the current count value CV2 from the counter 426 to obtain a fourth count value. Finally, the processing circuit 424 generates an output signal Dout that is the same as the original signal Din according to the first count value and the second count value from the electronic product 410, the updated first count value or the updated second count value (if any) from the electronic product 410, and the third count value and the fourth count value obtained by the electronic device 420 itself.
[0029] by Figure 5 , Figure 6 Take this as an example to illustrate, Figure 5 A schematic diagram of generating a packet including a first count value and a second count value for the electronic product 410, and Figure 6 A schematic diagram of generating a third count value and a fourth count value for the electronic device 420 and generating an output signal Dout accordingly. In the following description, it is assumed that the electronic product 410 and the electronic device 420 do not have a fixed packet transmission interval, that is, the electronic product 410 can transmit packets to the electronic device 420 at any time without setting a fixed packet transmission interval as in the low-power Bluetooth specification. In one embodiment, the electronic product 410 and the electronic device 420 support the Nordic 2.4 GHz specification. First refer to Figure 5 , the first count value obtained when the detection circuit 414 detects the rising edge of the original signal Din is "21200", and the electronic product 410 immediately transmits the packet containing the first count value to the electronic device 420. If the packet transmission fails (for example, the electronic product 410 does not receive the confirmation information (ACK)), the detection circuit 414 obtains the current count value CV1 from the counter 416 as the updated first count value (for example, Figure 5), and immediately transmits the first count value "21200" and the updated first count value "36200" to the electronic device, that is, the updated first count value "36200" can be regarded as corresponding to the time point of the retransmitted packet. Then, the second count value obtained when the detection circuit 414 detects the falling edge of the original signal Din is "1221231", and the electronic product 410 immediately transmits the packet containing the second count value to the electronic device 420.
[0030] Next, refer to Figure 6 , since the electronic device 420 succeeds only when the electronic product 410 transmits the packet containing the first count value for the second time, the processing circuit 424 obtains the count value of the current counter 126 to obtain the third count value "15028"; in addition, when the processing circuit 424 receives the packet containing the second count value transmitted from the electronic product 410, the processing circuit 424 currently obtains the fourth count value "1201087" from the counter 426. Then, the width W of the waveform of the output signal Dout having a high level can be calculated as follows:
[0031] W=[(1221231-36200) / (1201087-15028)]*(1221231-21200)=1185031……(2);
[0032] The calculated width W represents the width of the waveform of the original signal Din having a high level when the frequency signal CLK2 is used for counting. Therefore, after determining the width W of the output signal Dout, the processing circuit 124 can accurately establish the output signal Dout that is the same as the original signal Din according to the count value CV2 of the counter 126, for example Figure 3 As shown, when the count value CV2 is "42000", the output signal Dout is controlled to change from a low level to a high level, and when the count value CV2 is "1227031", the output signal Dout is controlled to change from a high level to a low level.
[0033] It should be noted that in Figure 5 , Figure 6In the example shown, it is assumed that the electronic device 420 successfully receives the packet containing the first count value when the electronic product 410 transmits the packet for the second time. If the electronic device 420 successfully receives the packet containing the first count value when the electronic product 410 transmits the packet for the first time, the updated first count value "36200" in the above formula (2) should be modified to the first count value "21200", and the third count value "15028" should also be modified to the count value "1024" when the first packet is received. Since a person with ordinary knowledge in the art should be able to understand how to modify the content of formula (2) to apply to the situation where the first packet transmission is successful after reading the above content, the details are not repeated here.
[0034] Figure 7 Schematic diagram of an electronic product 710 and an electronic device 720 according to another embodiment of the present invention, wherein the electronic device 720 can be set in a measuring device to determine the signal state of an original signal Din in the electronic product 710. Figure 7 As shown, the electronic product 710 includes a wireless communication module 712, a detection circuit 714 and a counter 716, and the electronic device 720 includes a wireless communication module 722, a processing circuit 724 and a counter 726. In this embodiment, the electronic product 710 can be a wireless meter, which can be installed in any environment where electricity is used and record the amount of electricity used in the environment, and the original signal Din is used to represent the power consumption of the environment; the electronic device 720 is used to internally reconstruct an output signal Dout that is substantially the same as the original signal Din, so as to determine the quality of the original signal Din.
[0035] When the electronic product 710 is in a testing phase, the electronic product 710 receives an original signal Din from the outside, wherein the original signal Din is used to simulate a digital signal generated by the electronic product 710 in actual application, and the original signal Din may come from a measuring device including the electronic device 720 (for example, transmitted through other interfaces). In addition, the counter 716 may be a free-running counter, which may continuously generate a count value CV1 according to the frequency signal CLK1. Next, the detection circuit 714 continuously detects the original signal Din to determine whether the original signal Din has a change in level, that is, to determine whether an edge appears on the waveform of the original signal Din, so as to generate a detection result D_res. In detail, when the detection circuit 714 detects that the original signal Din changes from a low level to a high level, the detection circuit 714 will obtain the current count value CV1 from the counter 716 to obtain a first count value, so as to generate the detection result D_res and transmit it to the electronic device 720 through the wireless communication module 712, wherein the detection result D_res at this time includes the first count value corresponding to the rising edge of the original signal Din. On the other hand, when the detection circuit 714 detects that the original signal Din changes from a high level to a low level, the detection circuit 714 will obtain the current count value CV1 from the counter 716 to obtain a second count value for generating a detection result D_res and transmitting it to the electronic device 720 through the wireless communication module 712, wherein the detection result D_res at this time includes the second count value corresponding to the falling edge of the original signal Din. In summary, whenever the detection circuit 714 detects that the original signal Din has an upward or downward edge, the count value CV1 of the counter 716 will be obtained in real time, and the detection result D_res will be generated to transmit the upward or downward edge information and the corresponding count value to the electronic device 720.
[0036] In the operation of the electronic device 720, the wireless communication module 722 generates a packet to the electronic product 710 so that the electronic product 710 generates a third count value and a fourth count value. Specifically, it is assumed that both the electronic product 710 and the electronic device 720 support the Bluetooth low energy (BLE) specification, and the electronic device 720 can transmit multiple Bluetooth packets to the wireless communication module of the electronic product 710. When the electronic product 710 receives a packet from the electronic device 720, the detection circuit 714 obtains the current count value CV1 from the counter 716 to obtain the third count value for generating a detection result D_res and transmitting it to the electronic device 720 through the wireless communication module 712; and when the electronic product 710 receives another packet from the electronic device 720, the detection circuit 714 obtains the current count value CV1 from the counter 716 to obtain the fourth count value for generating a detection result D_res and transmitting it to the electronic device 720 through the wireless communication module 712. It should be noted that when the electronic product 710 transmits the third count value and the fourth count value to the electronic device 720 , the corresponding Bluetooth packet information of the electronic device 720 (eg, the first Bluetooth packet and the fifth Bluetooth packet in this embodiment) is also transmitted.
[0037] Next, the processing circuit 724 generates an output signal Dout that is the same as the original signal Din according to the first count value, the second count value, the third count value and the fourth count value from the electronic product 710 and the time interval of the Bluetooth packets corresponding to the third count value and the fourth count value.
[0038] by Figure 8 , Fig. 9 Take this as an example to illustrate, Figure 8 A schematic diagram of generating a first count value, a second count value, a third count value and a fourth count value for the electronic product 710, and Fig. 9 FIG. 7 is a schematic diagram of an electronic device 720 generating an output signal Dout. Figure 8 , the first count value obtained when the detection circuit 714 detects the rising edge of the original signal Din is "21200", and the second count value obtained when the detection circuit 714 detects the falling edge of the original signal Din is "1221231". In addition, the third count value obtained when the detection circuit 714 receives the first Bluetooth packet from the electronic device 720 is "1024", and the fourth count value obtained when the detection circuit 714 receives the fifth Bluetooth packet from the electronic device 720 is "1201087". Next, refer to Fig. 9Assuming that the frequencies of the clock signal CLK1 and the clock signal CLK2 are both 40 MHz, the width of each clock cycle is 25 nanoseconds (ns), and the transmission interval between each packet is 7.5 milliseconds, the width W of the high level of the waveform of the output signal Dout can be calculated as follows:
[0039] W=(7.5ms*4)*(1221231-21200) / [(1201087-1024)*25ns]……(3);
[0040] Therefore, after determining the width W of the output signal Dout, the processing circuit 724 can accurately establish the output signal Dout that is the same as the original signal Din according to the count value CV2 of the counter 726. Fig. 9 As shown, when the count value CV2 is "352000", the output signal Dout is controlled to change from a low level to a high level, and when the count value CV2 is "1551968", the output signal Dout is controlled to change from a high level to a low level.
[0041] To briefly summarize the present invention, in the electronic device and electronic product of the present invention, the electronic product obtains a first count value from the counter when the rising edge of the original signal appears, and obtains a second count value from the counter when the falling edge of the original signal appears, and transmits the first count value and the second count value to the electronic device through different first packets and second packets respectively; and the electronic device obtains a third count value from the internal counter when receiving the first packet, and obtains a fourth count value from the internal counter when receiving the second packet, and by using the first count value, the second count value, the third count value, the fourth count value and / or other time information for calculation, the waveform of the original signal can be accurately reproduced without being affected by the error of the frequency signal inside the electronic device and the electronic product. In another embodiment, the above-mentioned first count value, second count value, third count value, and fourth count value can also be all generated by the electronic product, and then the first count value, the second count value, the third count value, and the fourth count value are transmitted to the electronic device to reconstruct the waveform of the original signal.
[0042] The above descriptions are only preferred embodiments of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should fall within the scope of the present invention.
[0043]
Explanation of symbols
[0044] 110, 410, 710: Electronic products
[0045] 112, 412, 712: Wireless communication module
[0046] 114, 414, 714: Detection circuit
[0047] 116, 416, 716: Counter
[0048] 120, 420, 720: Electronic devices
[0049] 122, 422, 722: Wireless communication module
[0050] 124, 424, 724: Processing circuit
[0051] 126, 426, 726: Counter
[0052] CLK1, CLK2: frequency signal
[0053] CV1, CV2: count value
[0054] Din: original signal
[0055] D_res: test result
[0056] Dout: output signal.
Claims
1. An electronic device comprising: A wireless communication module, configured to receive a first packet and a second packet from another electronic device, wherein the first packet at least includes a first count value, the second packet at least includes a second count value, and the first count value and the second count value respectively correspond to two adjacent edges of an original signal of the other electronic device; a counter for continuously counting according to a frequency signal; as well as A processing circuit is coupled to the wireless communication module and the counter, and is used to obtain a third count value from the counter when the first packet is received, and to obtain a fourth count value from the counter when the second packet is received; and the processing circuit also calculates the time interval between two adjacent edges of the output signal that is the same as the original signal according to the difference between the first count value and the second count value, and the difference between the third count value and the fourth count value, and generates the output signal accordingly.
2. The electronic device according to claim 1, wherein: The processing circuit calculates the time interval between two adjacent edges of the output signal according to the difference between the first count value and the second count value, the difference between the third count value and the fourth count value, the width of one cycle of the frequency signal, and the time interval between the processing circuit receiving the first packet and the second packet.
3. The electronic device according to claim 1, wherein: The first packet includes the first count value and an updated first count value. The first packet is a retransmission packet of a previous packet. The previous packet includes the first count value, and the updated first count value corresponds to the transmission time of the first packet.
4. The electronic device according to claim 3, wherein: The processing circuit also generates the output signal which is the same as the original signal according to the first count value, the updated first count value, the second count value, the third count value and the fourth count value.
5. According to the electronic device according to claim 4, the processing circuit calculates the time interval between two adjacent edges of the output signal according to the difference between the first count value and the second count value, the difference between the third count value and the fourth count value, and the difference between the second count value and the updated first count value, and generates the output signal accordingly.
6. An electronic product comprising: a counter for continuously counting according to a frequency signal; a detection circuit for detecting an original signal in real time, and obtaining a first count value from the counter when a rising edge of the original signal appears, and obtaining a second count value from the counter when a falling edge of the original signal appears; and a wireless communication module, for transmitting the first count value to an electronic device through a first packet after the detection circuit obtains the first count value, and for transmitting the second count value to the electronic device through a second packet after the detection circuit obtains the second count value, wherein: The electronic device calculates the time interval between two adjacent edges of the output signal based on the difference between the first count value and the second count value, and the difference between the third count value obtained by the first counter of the electronic device when the first packet is received and the fourth count value obtained by the first counter of the electronic device when the second packet is received, and generates the output signal accordingly.
7. The electronic product according to claim 6, wherein: When the first packet fails to be transmitted, the detection circuit obtains an updated first count value from the counter, and transmits the first count value and the updated first count value to the electronic device via another packet.
8. An electronic device comprising: A wireless communication module, for receiving a first packet, a second packet, a third packet and a fourth packet from another electronic device, wherein the first packet at least includes a first count value, the second packet at least includes a second count value, the third packet at least includes a third count value, and the fourth packet at least includes a fourth count value, and the first count value and the second count value respectively correspond to two adjacent edges of an original signal of the other electronic device, and the third count value and the fourth count value are respectively generated according to two packets transmitted by the wireless communication module to the other electronic device; a counter for continuously counting according to a frequency signal; as well as A processing circuit is coupled to the wireless communication module and the counter, wherein the processing circuit calculates the time interval between two adjacent edges of the output signal according to the difference between the first count value and the second count value, and the difference between the third count value and the fourth count value, and generates the output signal accordingly.
Citation Information
Patent Citations
Radio ammeter
CN101086659A
System for detecting synchronized edge between different clocks
JP1998303874A
Device for generating chattering
JP2001133526A
Communication method and communication apparatus
JP2002026884A
Signal processor and communication device
JP2017085347A
