Signal interval measuring module and measuring device
By combining multi-channel measurement and clock cycle, the accuracy problem of pulse time interval measurement between signal sources is solved, realizing fast and flexible signal interval measurement, which is suitable for various electronic devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN WINGTECH INFORMATION TECH CO LTD
- Filing Date
- 2023-02-27
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies have low accuracy when measuring the pulse time interval between different signal sources in a circuit, and usually require measuring each capacitor individually, resulting in a small number of measurement channels and an inability to accurately obtain the time interval.
A multi-channel measurement method is adopted, combining the reference clock period and the standard clock period. The time measurement module records the pulse clock index and pulse number of the signal source, and the processor module calculates the pulse time interval, thereby improving the measurement accuracy.
It enables rapid and accurate measurement of the pulse time interval between signal sources, improving the flexibility and accuracy of measurement, and is suitable for signal source detection in various electronic devices.
Smart Images

Figure CN116300376B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of signal processing technology, and in particular to a signal interval measurement module and measuring device. Background Technology
[0002] With the rapid development of science and technology, all kinds of circuits have been applied in electronic devices. In particular, multiple different signal sources can often exist in the same circuit.
[0003] For example, when two capacitors exist in a circuit, these two capacitors can be considered as two signal sources, operating in different conduction states. To measure the pulse time interval between these two signal sources, each capacitor is often measured individually. For instance, when both capacitors are discharging, the timing of the pulses emitted by each capacitor is measured separately, and the two times are subtracted to obtain the time interval between the pulses emitted by each capacitor. In this measurement process, the frequency used is usually fixed, and only the recorded pulse times are used, resulting in low accuracy of the measured time interval. Summary of the Invention
[0004] This application provides a signal interval measurement module and a measurement device, which can improve the accuracy of the signal interval measurement module in measuring the pulse time interval between different signal sources.
[0005] In one aspect, embodiments of this application provide a signal interval measurement module, the signal interval measurement module comprising: a time measurement module and a processor module; the time measurement module is electrically connected to the processor module;
[0006] The time measurement module is also electrically connected to at least two signal sources. The time measurement module is used to record a first reference clock index and a first pulse number according to a reference clock period when a first pulse sent by a first signal source among the at least two signal sources arrives. The first pulse number is the number of standard clock periods from the first reference clock index to the first pulse, recorded according to a standard clock period. The standard clock period is less than the reference clock period.
[0007] The time measurement module is used to record a second reference clock index and a second pulse number according to the reference clock cycle when the second pulse sent by the second signal source in the at least two signal sources arrives. The second pulse number is the number of standard clock cycles from the second reference clock index to the second pulse, recorded according to the standard clock cycle.
[0008] The processor module is configured to calculate the pulse time interval between the first signal source and the second signal source based on the first reference clock index, the first pulse count, the second reference clock index, the second pulse count, and the standard clock period.
[0009] As an optional implementation of this application, the processor module is further configured to calculate the first transmission time of the first pulse relative to the reference clock period based on the first reference clock index, the first pulse number, and the standard clock period.
[0010] The processor module is further configured to calculate the second transmission time of the second pulse relative to the reference clock period based on the second reference clock index, the second pulse number, and the standard clock period;
[0011] The processor module is further configured to calculate the pulse time interval between the first signal source and the second signal source based on the first transmission time and the second transmission time.
[0012] As an optional implementation of this application, the signal interval measurement module further includes a function control module, which is electrically connected to the processor module;
[0013] The function control module is used to send the identifier of the signal source to be detected to the processor module;
[0014] The processor module is also configured to receive the identifier of the signal source to be detected and control the time measurement module to be connected to each signal source corresponding to the identifier of the signal source to be detected.
[0015] As an optional implementation of this application, the function control module includes selection controls for each signal source;
[0016] The function control module is also used to trigger the selection control of each signal source and obtain the identifier corresponding to the selected signal source as the identifier of the signal source to be detected.
[0017] As an optional implementation of this application, the function control module further includes a count setting control;
[0018] The function control module is used to receive the number of calculations N set by the number setting control, and send the number of calculations N to the processor module, where N is a positive integer;
[0019] The processor module is further configured to control the time measurement module to acquire N measurement data, and to calculate N pulse time intervals between the first signal source and the second signal source, and to obtain an average value based on the N pulse time intervals between the first signal source and the second signal source.
[0020] As an optional implementation of this application, the signal interval measurement module further includes a display module; the display module is electrically connected to the processor module;
[0021] The display module is used to display the data sent to the processor module by the time measurement module, and to display the pulse time interval between the first signal source and the second signal source.
[0022] As an optional implementation of this application, the time measurement module is further connected to an external crystal oscillator circuit;
[0023] The time measurement module is also used to obtain the crystal oscillator value of the crystal oscillator circuit, determine the frequency division coefficient based on the crystal oscillator value, and determine the standard clock period based on the reference clock period and the frequency division coefficient.
[0024] As an optional implementation of this application, the processor module is further configured to receive a circuit switching signal, which is used to switch between different crystal oscillator circuits.
[0025] The processor module is also configured to control the time measurement module to be electrically connected to the switched crystal oscillator circuit according to the circuit switching signal.
[0026] As an optional implementation of this application, the power supply for the time measurement module is a DC power supply.
[0027] In another aspect, embodiments of this application provide a measuring device, which includes at least one signal interval measuring module as described in one of the preceding aspects.
[0028] The technical solutions provided in this application embodiment may include at least the following beneficial effects:
[0029] The signal interval measurement module of this application includes: a time measurement module and a processor module; the time measurement module is electrically connected to the processor module; the time measurement module is also electrically connected to at least two signal sources, and is used to record a first reference clock index and a first pulse number according to a reference clock period when a first pulse sent by a first signal source among the at least two signal sources arrives, the first pulse number being the number of standard clock periods from the first reference clock index to the first pulse recorded according to a standard clock period; the standard clock period is less than the reference clock period; the time measurement module is used to record a second reference clock index and a second pulse number according to a reference clock period when a second pulse sent by a second signal source among the at least two signal sources arrives, the second pulse number being the number of standard clock periods from the second reference clock index to the second pulse recorded according to a standard clock period; the processor module is used to calculate the pulse time interval between the first signal source and the second signal source based on the first reference clock index, the first pulse number, the second reference clock index, the second pulse number, and the standard clock period. The signal interval measurement module of this application simultaneously detects the first signal source and the second signal source. When the first pulse arrives, the first reference clock index is recorded according to the reference clock cycle, and the first pulse count is obtained. When the second pulse arrives, the second reference clock index is recorded according to the reference clock cycle, and the second pulse count is obtained. By combining the two different clock cycles, the pulse time interval between the first signal source and the second signal source is calculated, which improves the accuracy of the signal interval measurement module in obtaining the pulse time interval. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a schematic diagram of a circuit structure according to an exemplary embodiment of this application;
[0032] Figure 2 This is a schematic diagram of the structure of a signal interval measurement module provided in an exemplary embodiment of this application;
[0033] Figure 3 This is a schematic diagram of the structure of a signal interval measurement module provided in an exemplary embodiment of this application;
[0034] Figure 4 This is a schematic diagram of the structure of time data acquired by a time measurement module according to an exemplary embodiment of this application;
[0035] Figure 5This is a circuit structure diagram of a crystal oscillator circuit according to an exemplary embodiment of this application;
[0036] Figure 6 This is a schematic diagram of the structure of a time measurement module according to an exemplary embodiment of this application;
[0037] Figure 7 This is a schematic diagram of a pulse time interval according to an exemplary embodiment of this application;
[0038] Figure 8 This is a schematic diagram of the structure of a measuring device provided in an exemplary embodiment of this application. Detailed Implementation
[0039] To better understand the above-mentioned objectives, features, and advantages of this application, the solution of this application will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0040] Many specific details are set forth in the following description in order to provide a full understanding of this application, but this application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some embodiments of this application, and not all embodiments.
[0041] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first camera" and "second camera" are used to distinguish different cameras, not to describe a specific order of cameras.
[0042] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner. Furthermore, in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0043] The solution provided in this application can be used in electronic devices used in people's daily lives to detect pulses from different signal sources. To facilitate understanding, some terms and application architectures involved in the embodiments of this application will be briefly introduced below.
[0044] With the continuous advancement of technology, various electronic devices are being used more and more frequently in daily life, enabling people to use them for learning, entertainment, work, and other purposes. Among these devices, integrated circuits have become an indispensable hardware component.
[0045] Optionally, the electronic device can be a terminal device with integrated circuits. For example, the terminal device can include, but is not limited to, wearable devices (such as wristbands, smartwatches, smart glasses, etc.), mobile phones, tablets, laptops, smart glasses, smartwatches, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), desktop computers, laptop computers, smart home devices, and other terminal devices with database storage functions.
[0046] Currently, the electronic devices mentioned above incorporate an increasing number of circuits, and multiple signal sources often provide signals between different circuits. Please refer to... Figure 1 This illustrates a schematic diagram of a circuit structure according to an exemplary embodiment of this application. Figure 1 As shown, the circuit includes a first power supply VDD1 101, a second power supply VDD2 102, a first resistor 103, and a second resistor 104. The first power supply VDD1 101 can supply power to the first resistor 103 and provide signals to subsequent circuits by outputting an electrical signal. The second power supply VDD2 102 can supply power to the first resistor 104 and provide signals to subsequent circuits by outputting an electrical signal. Optionally, both the first power supply 101 and the second power supply 102 can be capacitors.
[0047] Among them, the above Figure 1 The first and second power supplies in the circuit can be considered as two signal sources. When it is necessary to obtain the pulse time interval of the pulse signals output by the first and second power supplies, each power supply is usually measured individually using a measuring device. For example, when the two power supplies are discharging, the timing of the pulses emitted by each power supply is measured separately, and the two times are subtracted to obtain the time interval between the pulses emitted by the two power supplies. In this measurement process, the frequency used is usually fixed, and only the timing of the measured pulses is used. In addition, this measurement process is also carried out through a single channel measurement. For the two power supplies mentioned above, two measurements are required, the number of measurement channels is small, and the accuracy of the measured time interval is low.
[0048] To improve the accuracy of signal interval measurement modules in measuring the pulse time interval between different signal sources, this application provides a solution that uses multi-channel simultaneous measurement and obtains time records based on multiple clock cycles to calculate the pulse time interval between two signal sources, thus completing the measurement quickly and accurately.
[0049] Please refer to Figure 2 This illustration shows a schematic diagram of the structure of a signal interval measurement module provided in an exemplary embodiment of this application. Figure 2 As shown, the signal interval measurement module 200 includes: a time measurement module 201 and a processor module 202; the time measurement module 201 and the processor module 202 are electrically connected.
[0050] The time measurement module 201 is also electrically connected to at least two signal sources. Optionally, in Figure 2 In this embodiment, the time measurement module 201 includes multiple signal source interfaces 201a. During measurement, the time measurement module 201 can be electrically connected to the signal source to be measured through these signal source interfaces. Taking the time measurement module 201 electrically connected to a first signal source through one of the signal source interfaces and electrically connected to a second signal source through another signal source interface as an example, the time measurement module 201 can measure the pulse time interval between the two signal sources.
[0051] The time measurement module 201 is configured to record a first reference clock index and a first pulse count according to a reference clock cycle when a first pulse from a first signal source (one of at least two signal sources) arrives. The first pulse count is the number of standard clock cycles from the first reference clock index to the first pulse, recorded according to a standard clock cycle. The time measurement module 201 is also configured to record a second reference clock index and a second pulse count according to a reference clock cycle when a second pulse from a second signal source (one of at least two signal sources) arrives. The second pulse count is the number of standard clock cycles from the second reference clock index to the second pulse, recorded according to a standard clock cycle.
[0052] Optionally, the standard clock period is shorter than the reference clock period. Optionally, the reference clock period is a default clock maintained by the time measurement module 201 itself. For example, the time measurement module 201 can be integrated into a measurement chip, and the default reference clock period within this chip is the reference clock period. In this application, to improve measurement accuracy, a standard clock period is introduced for further measurement, and this standard clock period is shorter than the reference clock period.
[0053] That is, when the time measurement module 201 receives the arrival of the first pulse sent by the first signal source, it records the arrival time of the first pulse based on a larger reference clock period to obtain the first reference clock index, and simultaneously records the arrival time of the first pulse based on a smaller standard clock period to obtain the first pulse count. Similarly, the time measurement module 201 records the same data for the second signal source and sends the recorded data to the processor module 202.
[0054] The processor module 202 is used to calculate the pulse time interval between the first signal source and the second signal source based on the first reference clock index, the first pulse count, the second reference clock index, the second pulse count, and the standard clock period. Optionally, the processor module 202 can receive the data recorded and collected by the time measurement module 201, and perform calculations by the processor module 202 to obtain the pulse time interval between the first signal source and the second signal source.
[0055] In summary, the signal interval measurement module of this application includes: a time measurement module and a processor module; the time measurement module is electrically connected to the processor module; the time measurement module is also electrically connected to at least two signal sources, and is used to record a first reference clock index and a first pulse number according to a reference clock period when a first pulse sent by a first signal source among the at least two signal sources arrives, the first pulse number being the number of standard clock periods from the first reference clock index to the first pulse recorded according to a standard clock period; the standard clock period is less than the reference clock period; the time measurement module is used to record a second reference clock index and a second pulse number according to a reference clock period when a second pulse sent by a second signal source among the at least two signal sources arrives, the second pulse number being the number of standard clock periods from the second reference clock index to the second pulse recorded according to a standard clock period; the processor module is used to calculate the pulse time interval between the first signal source and the second signal source based on the first reference clock index, the first pulse number, the second reference clock index, the second pulse number, and the standard clock period. The signal interval measurement module of this application simultaneously detects the first signal source and the second signal source. When the first pulse arrives, the first reference clock index is recorded according to the reference clock cycle, and the first pulse count is obtained. When the second pulse arrives, the second reference clock index is recorded according to the reference clock cycle, and the second pulse count is obtained. By combining the two different clock cycles, the pulse time interval between the first signal source and the second signal source is calculated, which improves the accuracy of the signal interval measurement module in obtaining the pulse time interval.
[0056] In one possible implementation, the signal interval measurement module provided in this application also includes a function control module. The function control module provides selective functions, which can realize flexible detection of different signal sources connected to the time measurement module, thereby improving the flexibility of the signal interval measurement module in obtaining pulse time intervals.
[0057] Please refer to Figure 3 This illustration shows a schematic diagram of the structure of a signal interval measurement module provided in an exemplary embodiment of this application. Figure 3 As shown, the signal interval measurement module 300 includes: a time measurement module 301, a processor module 302, a function control module 303, and a display module 304. Figure 3 As shown, the time measurement module 301 is electrically connected to the processor module 302, the function control module 303 is electrically connected to the processor module 302, and the display module 304 is electrically connected to the processor module 302.
[0058] The time measurement module 301 is also electrically connected to at least two signal sources. In this application, the time measurement module 301 can provide multiple signal input terminals, and the signal source to be measured can be directly electrically connected to the signal input terminals provided by the time measurement module 301.
[0059] In one possible implementation, each signal input terminal provided by the time measurement module 301 corresponds to a signal source identifier to be detected. Before measuring the signal interval time, the user can send the signal source identifier to the processor module 302 through the function control module 303. After receiving the signal source identifier, the processor module 302 controls the time measurement module 301 to turn on each signal source corresponding to the signal source identifier.
[0060] Optionally, the function control module 303 includes selection controls for each signal source; the function control module 303 is also used to trigger the selection controls for each signal source and obtain the identifier corresponding to the selected signal source as the identifier of the signal source to be detected. The function control module 303 is used to send the identifier of the signal source to be detected to the processor module 302; the processor module 302 is also used to receive the identifier of the signal source to be detected and control the time measurement module 301 to be connected to each signal source corresponding to the identifier of the signal source to be detected.
[0061] For example, the four signal input terminals provided by the time measurement module 301 correspond to four signal source identifiers to be detected, namely Channel 1, Channel 2, Channel 3 and Channel 4. These four signal source identifiers to be detected have selection controls on the function control module 303 side. The user can manually select any two or more signal sources to be measured. The function control module 303 obtains the signal source identifiers to be detected selected by the user and sends the selected signal source identifiers to the processor module 302.
[0062] For example, when the functional control module provided in this application is applied in a real-world scenario, the functional control module can provide selection controls that enable physical control. Corresponding to the four signal source identifiers to be detected, namely Channel 1, Channel 2, Channel 3, and Channel 4, each has a selection control one, a selection control two, a selection control three, and a selection control four. The user triggers selection control one or selection control two by clicking, pressing, or other means. The functional control module 303 obtains the signal source identifiers to be detected (Channel 1 and Channel 2) corresponding to the selection control one and selection control two triggered by the user. The functional control module 303 sends the selected signal source identifiers to the processor module 302, thereby controlling the time measurement module 301 to conduct with each signal source of Channel 1 and Channel 2.
[0063] Optionally, the selection controls provided by the aforementioned function control module can also be represented in the form of virtual controls. For example, the selection controls provided by the function control module can be virtual controls that can be triggered by a touchscreen. The user triggers the corresponding selection controls on the touchscreen, allowing the function control module 303 to obtain the various selection controls triggered by the user. This solution does not limit the specific form of the selection controls.
[0064] Taking the example of measuring the pulse time interval between two signal sources selected by the user using the signal interval measurement module provided in this solution, the time measurement module 301 is used to record a first reference clock index and a first pulse number according to a reference clock cycle when the first pulse sent by the first signal source among the at least two signal sources arrives. The first pulse number is the number of standard clock cycles from the first reference clock index to the first pulse, recorded according to a standard clock cycle. The time measurement module 301 is also used to record a second reference clock index and a second pulse number according to a reference clock cycle when the second pulse sent by the second signal source among the at least two signal sources arrives. The second pulse number is the number of standard clock cycles from the second reference clock index to the second pulse, recorded according to a standard clock cycle.
[0065] For example, after selecting two signal sources (channel 1 and channel 2, where channel 1 can be the output channel of the first signal source and channel 2 can be the output channel of the second signal source) through the function control module, the signal input terminal provided by the time measurement module 301 is connected to these two signal sources. When the first pulse sent by the first signal source arrives, the time measurement module 301 records the first reference clock index according to the reference clock cycle. The first reference clock index is the index corresponding to the current reference clock cycle at the time of the arrival of the first pulse. For example, for the time measurement module, its default reference clock cycle is represented by REFID, and it is recorded starting from REFID = 1, 2...N. When the first pulse arrives, if the index corresponding to the current reference clock cycle at the time of the arrival of the first pulse is within the second reference clock cycle, the first reference clock index recorded by the time measurement module 301 is 2.
[0066] The time measurement module 301 can also acquire the first pulse count, i.e., the number of standard clock cycles from the recorded first reference clock index to the first pulse, when the first pulse arrives. Please refer to [reference needed]. Figure 4 This illustrates a schematic diagram of the structure of time data acquired by a time measurement module according to an exemplary embodiment of this application. Figure 4 As shown, this includes a pulse diagram 401 for the reference clock, a pulse diagram 402 for channel 1, and a first time period 403. Figure 4 In this process, the time measurement module records the first reference clock index as X based on the reference clock cycle. The time measurement module also records the number of standard clock cycles contained within the first time period 403. The first time period 403 is the time period from the first reference clock index to the actual arrival time of the first pulse. For example, Figure 4 It can contain 5 standard clock cycles.
[0067] Optionally, the time measurement module 301 records the same time data for the second pulse sent by the second signal source among at least two signal sources according to the above process, which will not be elaborated here.
[0068] The aforementioned reference clock period is a default clock maintained by the time measurement module 201 itself. For example, the time measurement module 201 can be integrated into a measurement chip, and the default reference clock period within this chip is the reference clock period. In this application, to improve measurement accuracy, a standard clock period is introduced for further measurement. This standard clock period is shorter than the reference clock period, allowing for finer-grained monitoring and recording of the pulse arrival time of the signal source, resulting in recording results for different periods. In one possible implementation, the standard clock period can be determined based on a frequency division coefficient S. When the reference clock period needs to be divided into 500 parts, the frequency division coefficient S = 500; when the reference clock period needs to be divided into 1000 parts, the frequency division coefficient S = 1000. That is, the frequency division coefficient S equals the number of parts to be divided, and each divided clock period is the standard clock period.
[0069] For example, the time measurement module 201 also includes a frequency divider for dividing the reference clock. The division value can be determined by a set division factor S, which can be the default value of the frequency divider or manually set by the measurement operator.
[0070] For example, the frequency division factor S can be set through the aforementioned function control module 303. For example, the aforementioned function control module 303 provides a setting control for the frequency division factor S, allowing the user to independently select the corresponding frequency division factor S. The function control module 303 sends the determined frequency division factor S to the processor module 302, and the processor module 302 sends the frequency division factor S to the time measurement module 301, so that the time measurement module 301 can divide the reference clock period based on the frequency division factor S to obtain the standard clock period, and then record it.
[0071] Optionally, the reference clock period in the time measurement module 301 described above is determined by the crystal oscillator amplitude of the external crystal oscillator circuit. For example, the time measurement module 301 is also connected to an external crystal oscillator circuit; the crystal oscillator amplitude of this circuit can determine the reference clock period of the time measurement module 301. For example, please refer to... Figure 5 This illustrates a circuit structure diagram of a crystal oscillator circuit according to an exemplary embodiment of this application. Figure 5 As shown, it includes a first capacitor 501, a second capacitor 502, a crystal oscillator 503, and a first resistor 504. This crystal oscillator circuit is exemplary; other combinations of crystal oscillator circuits can also be used in practical applications. Figure 5 The crystal oscillator circuit shown is electrically connected to the crystal oscillator input terminal of the time measurement module 301. If Figure 5 If the value of the crystal oscillator 503 is 5MHz, then the reference clock frequency CLK of the time measurement module 301 is 5MHz.
[0072] Optionally, in practical applications, the time measurement module can be integrated into a single TDCGPX2 chip as an example. Please refer to [reference needed]. Figure 6 This illustrates a schematic diagram of the structure of a time measurement module according to an exemplary embodiment of this application. Figure 6 As shown, it includes a first signal input terminal 601, a second signal input terminal 602, a third signal input terminal 603, a fourth signal input terminal 604, and a crystal oscillator circuit 605. Figure 6 In this system, each signal input port can be connected to a signal source, achieving electrical connection with at least two signal sources. The crystal oscillator circuit 605 determines its own CLK, thereby determining the reference clock period. When the first pulse from the first signal source arrives, the register records the first reference clock index and the number of the first pulse according to the reference clock period. When the second pulse from the second signal source arrives, the register records the second reference clock index and the number of the second pulse according to the reference clock period. The time data stored in the register (including the first reference clock index, the number of the first pulse, the second reference clock index, and the number of the second pulse) is sent to the processor module 302.
[0073] Optionally, in the above Figure 6 In the circuit, resistors R11, R3, R1, R4, R5, R6, R7, R12, R13, R8, R14, R9, R10, R2, R25, and R26 are each 100KΩ; resistors R15, R16, R17, R19, R21, R20, R18, and R24 are each 10Ω; and R23 is 1MΩ. Capacitors C1, C2, C3, C4, C6, C7, C9, C11, C12, C13, C14, and C15 are each 100nF; and capacitors C5 and C8 are each 15pF. The connection method for each component can be found in [reference needed]. Figure 6 .
[0074] Optional, as described above Figure 6As shown, the time measurement module is implemented using the TDC-GPX2 chip. This chip is small in size (9mm × 9mm), has 64 external input / output pins in a Quad Flat No-lead Package (QFN), and integrates 17 registers internally. It operates stably and is less affected by external environmental factors. It does not have any phase-locked loop circuitry; it uses an externally input clock as a reference to process channel pulses, resulting in fast processing speed and low latency. It has differential input / output pins, supporting Complementary Metal Oxide Semiconductor (CMOS) inputs and Serial Peripheral Interface (SPI) communication.
[0075] In one possible implementation, the aforementioned crystal oscillator circuit can be flexibly electrically connected to the time measurement module 301 via an external connection; that is, the time measurement module 301 can also be externally connected to the crystal oscillator circuit. The processor module 302 is further configured to receive a circuit switching signal, which is used to switch between different crystal oscillator circuits; the processor module 302 is also configured to control the time measurement module 301 to be electrically connected to the switched crystal oscillator circuit according to the circuit switching signal. The time measurement module 301 is also configured to obtain the crystal oscillator magnitude of the crystal oscillator circuit, determine the frequency division coefficient based on the crystal oscillator magnitude, and determine the standard clock period based on the reference clock period and the frequency division coefficient. That is, in this application, the frequency division coefficient can also be determined by the crystal oscillator magnitude; the time measurement module 301 can determine the corresponding standard clock period by obtaining the crystal oscillator magnitude of the crystal oscillator circuit and determining the frequency division coefficient based on the crystal oscillator magnitude.
[0076] Optionally, the circuit switching signal received by the processor module 302 can be sent by the function control module 303. For example, in practical applications, the processor module 302 can control the first switch port of the time measurement module 301 to be electrically connected to different external crystal oscillator circuits. The circuit switching signal can be sent to the processor module 302 through the function control module 303. For example, the first switch port of the time measurement module 301 can be electrically connected to a first crystal oscillator circuit or a second crystal oscillator circuit. The user selects to connect the time measurement module 301 to the second crystal oscillator circuit through the function control module 303 and sends the circuit switching signal to the processor module 302. The processor module 302 controls the time measurement module 301 to be electrically connected to the second crystal oscillator circuit according to the circuit switching signal.
[0077] Optionally, in the above method, the time measurement module 301 obtains the standard clock cycle as follows: A register in the time measurement module 301 stores the division coefficients corresponding to different crystal oscillator sizes. The time measurement module 301 can find the division coefficient corresponding to the crystal oscillator size to obtain the corresponding standard clock cycle. For example, the division coefficient for a 5MHz crystal oscillator is 1000, and the division coefficient for a 10MHz crystal oscillator is 500. This correspondence can be preset in the time measurement module 301 by the developers.
[0078] Optionally, in this application, the power supply for the time measurement module 301 can be a DC power supply. That is, when the time measurement module 301 is working, the measurement personnel can connect the time measurement module 301 to a DC power supply, which will supply power to the time measurement module 301.
[0079] Optionally, after the time measurement module 301 sends the time data obtained above to the processor module 302, the processor module 302 is used to calculate the pulse time interval between the first signal source and the second signal source based on the first reference clock index, the first pulse number, the second reference clock index, the second pulse number, and the standard clock period.
[0080] In one possible implementation, the processor module 302 calculates the pulse time interval as follows: the processor module 302 is further configured to calculate a first transmission time of the first pulse relative to the reference clock period based on a first reference clock index, a first pulse number, and a standard clock period; the processor module 302 is further configured to calculate a second transmission time of the second pulse relative to the reference clock period based on a second reference clock index, a second pulse number, and a standard clock period; and the processor module 302 is further configured to calculate the pulse time interval between the first signal source and the second signal source based on the first transmission time and the second transmission time.
[0081] That is, in this application, the reference clock period is used as a "coarse" count, and the standard clock period after frequency division is used as a "fine" count. Given that the crystal oscillator frequency of the aforementioned crystal circuit is 5MHz, the first reference clock index obtained by the processor module 302 is N. RFID The first pulse number is t stop1 Second reference clock index N RFID +1, second pulse number t stop2 For example, the processor module 302 can calculate the pulse time interval between the first signal source and the second signal source according to the following formula.
[0082] T1 = N RFID / F+t stop1 / (5×10 6 ×S);
[0083] T2=(N RFID +1) / F+t stop2 / (5×10 6 ×S);
[0084] ΔT = T2 - T1;
[0085] In the above formula, F is the reference clock frequency, S is the frequency division factor, and 1 / F is the reference clock period (5×10). 6 ×S) is the standard clock cycle. The processor module 302 determines the clock cycle based on the first reference clock index N. RFID The first pulse number t stop1 And the standard clock period, calculate the first transmission time T1 of the first pulse relative to the reference clock period; according to the second reference clock index N RFID +1, second pulse number t stop2 And the standard clock period, calculate the second transmission time T2 of the second pulse relative to the reference clock period; and calculate the pulse time interval ΔT between the first signal source and the second signal source based on the first transmission time T1 and the second transmission time T2.
[0086] Please refer to Figure 7 This illustrates a schematic diagram of a pulse time interval according to an exemplary embodiment of this application. Figure 7 As shown, it includes a pulse diagram 701 for the reference clock, a pulse diagram 702 for channel 1, a pulse diagram 703 for channel 2, a first transmission time T1 704, a second transmission time T2 705, and a pulse time interval ΔT 706. Taking the pulse time interval between channel 1 and channel 2 as an example, the processor module 302 calculates the pulse time interval ΔT between the first signal source and the second signal source.
[0087] In one possible implementation, the function control module 303 further includes a count setting control; the function control module 303 is used to receive the count G set by the count setting control, and send the count G to the processor module 302, where G is a positive integer; the processor module 302 is also used to control the time measurement module 301 to acquire G times of measurement data, and to calculate G times the pulse time interval between the first signal source and the second signal source, and to obtain the average value based on the G times the pulse time interval between the first signal source and the second signal source.
[0088] For example, the function control module 303 provides a count setting control, which allows the user to set the number of calculations G (e.g., 3). The function control module 303 sends the count G = 3 to the processor module 302. After receiving the count of 3, the processor module 302 controls the time measurement module 301 to acquire three measurement data points and calculates the pulse time interval between the first and second signal sources three times. The average value is then obtained based on these three pulse time intervals and used as the final pulse time interval between the first and second signal sources, thereby reducing calculation errors and improving measurement accuracy. Optionally, averaging is one example of error processing; in practical applications, other methods (such as variance) can also be used to reduce errors, which is not limited here.
[0089] Optionally, the signal interval measurement module further includes a display module 304; the display module 304 is electrically connected to the processor module 302; the display module 304 is used to display the data sent to the processor module 302 by the time measurement module 301, and to display the pulse time interval between the first signal source and the second signal source. That is, the signal interval measurement module 300 can display the finally acquired pulse time interval through its own display module 304. Optionally, the display module 304 can also display various parameters sent to the processor module 302 by the aforementioned function control module 303. For example, the number of calculations G, which crystal oscillator circuit, the crystal oscillator value, and the identifiers of the signal sources to be detected, etc.
[0090] Optionally, the display module 304 primarily displays measurement data, allowing measurement personnel to view the results more intuitively. The display module 304 can display data via an LCD12864 screen. The LCD12864 has an internal Chinese character library, which can display dot-matrix text images. The screen has a resolution of 128×64 and supports 18 American Standard Code for Information Interchange (ASCII) character sets, making it easy to operate and meeting the display requirements of this system.
[0091] Optionally, the processor module 302 described above can use a minimum system constructed from the STM32F103C8T6 chip in the STM32F103 series. The STM32F103C8T6 is a 32-bit microcontroller with a Cortex-M3 core using the ARM (Acorn RISC Machine) architecture. It operates within a voltage range of 2–3.6V and can function in an ambient temperature range of 40–85°C. It has 65kb of program memory. A capacitor and a pull-up equivalent resistor constitute the reset circuit of the processor module 302. Its crystal oscillator section consists of an 8MHz quartz crystal, a 1M resistor, and two capacitors.
[0092] Optionally, the function control module 303 is primarily responsible for receiving user commands. The function control module 303 can be implemented as a five-key layout, with one end of each switch connected to a general-purpose input / output (GPIO) port of the processor module 302 (STM32F103). Control commands issued by the function control module 303 are transmitted to the processor module 302 through the voltage levels of the pins connected to each switch.
[0093] It should be noted that when the user selects more than two signal source identifiers to be detected (for example, the user selects channel 1, channel 2, and channel 3), the processor module 302 and the actual measurement module 301 perform the above measurement process in pairs. For example, channel 1 and channel 2 are grouped together, channel 1 and channel 3 are grouped together, and channel 2 and channel 3 are grouped together, ultimately measuring the pulse time interval between each pair of signal sources.
[0094] Optionally, the above-mentioned pulse time interval measurement process can be applied to practical scenarios such as laser ranging, digital switching instrument transmission of digital communication, and rapid signal processing, and this application does not limit it in this regard.
[0095] Optionally, the signal interval measurement module can use a four-layer board in the circuit board design, and impedance matching can be met in the wiring. The chip mentioned above is also an example. In actual applications, more reliable power chips can be selected to ensure measurement accuracy.
[0096] In summary, the signal interval measurement module of this application includes: a time measurement module and a processor module; the time measurement module is electrically connected to the processor module; the time measurement module is also electrically connected to at least two signal sources, and is used to record a first reference clock index and a first pulse number according to a reference clock period when a first pulse sent by a first signal source among the at least two signal sources arrives, the first pulse number being the number of standard clock periods from the first reference clock index to the first pulse recorded according to a standard clock period; the standard clock period is less than the reference clock period; the time measurement module is used to record a second reference clock index and a second pulse number according to a reference clock period when a second pulse sent by a second signal source among the at least two signal sources arrives, the second pulse number being the number of standard clock periods from the second reference clock index to the second pulse recorded according to a standard clock period; the processor module is used to calculate the pulse time interval between the first signal source and the second signal source based on the first reference clock index, the first pulse number, the second reference clock index, the second pulse number, and the standard clock period. The signal interval measurement module of this application simultaneously detects the first signal source and the second signal source. When the first pulse arrives, the first reference clock index is recorded according to the reference clock cycle, and the first pulse count is obtained. When the second pulse arrives, the second reference clock index is recorded according to the reference clock cycle, and the second pulse count is obtained. By combining the two different clock cycles, the pulse time interval between the first signal source and the second signal source is calculated, which improves the accuracy of the signal interval measurement module in obtaining the pulse time interval.
[0097] In addition, this application can realize the measurement of pulse time interval between multiple channels, and can measure more channels. The measurement frequency is based on multiple methods such as reference clock period and standard clock period. Furthermore, the external crystal oscillator circuit can flexibly determine the standard clock period, which provides greater flexibility in measurement.
[0098] Figure 8 This is a schematic diagram of the structure of a measuring device provided in an exemplary embodiment of this application. Figure 8As shown, the measuring device 800 includes a central processing unit (CPU) 801, a system memory 804 including random access memory (RAM) 802 and read-only memory (ROM) 803, and a system bus 805 connecting the system memory 804 and the CPU 801. The measuring device 800 also includes a basic input / output system (I / O system) 806 that facilitates information transfer between various devices within the computer, and a mass storage device 807 configured to store an operating system 812, application programs 813, and other program modules 814.
[0099] The basic transmission / output system 806 includes a display 806 configured to display information and a transmission device 809 configured to transmit information to a user, such as a mouse or keyboard. Both the display 806 and the transmission device 809 are connected to the central processing unit 801 via a transmission output controller 810 connected to the system bus 805. The basic transmission / output system 806 may also include a transmission output controller 810 configured to receive and process transmissions from multiple other devices such as a keyboard, mouse, or electronic stylus. Similarly, the transmission output controller 810 also provides output to a display screen, printer, or other types of output devices.
[0100] The mass storage device 807 is connected to the central processing unit 801 via a mass storage controller (not shown) connected to the system bus 805. The mass storage device 807 and its associated computer-readable media provide non-volatile storage for the measuring device 800. That is, the mass storage device 807 may include computer-readable media (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.
[0101] The computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology configured to store information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include RAM, ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage media are not limited to the above-mentioned types. The system memory 804 and mass storage device 807 described above can be collectively referred to as memory.
[0102] The measuring device 800 can be connected to the Internet or other network devices via a network interface unit 811 connected to the system bus 805. The memory also includes one or more programs stored in the memory.
[0103] Optionally, the measuring device provided in this application may include at least one as described above. Figure 2 or Figure 3 The signal interval measurement module shown in the embodiment. Optionally, the above measurement device can be a mobile phone, television, tablet computer, laptop computer, smart glasses, smartwatch, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, smart wearable device, or other device with a display.
[0104] Optionally, in this application, the signal interval measurement module in the measuring device can be mounted on a flexible printed circuit board (FPC) or a glass substrate.
[0105] The above provides an example of a signal interval measurement module and measurement device disclosed in the embodiments of this application. The specific examples used in this document illustrate the principles and implementation methods of this application. The description of the above embodiments is only configured to help understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A signal interval measurement module, characterized in that, The signal interval measurement module includes: a time measurement module and a processor module; the time measurement module is electrically connected to the processor module. The time measurement module is also electrically connected to at least two signal sources. The time measurement module is used to record a first reference clock index and a first pulse number according to a reference clock period when a first pulse sent by a first signal source among the at least two signal sources arrives. The first pulse number is the number of standard clock periods from the first reference clock index to the first pulse, recorded according to a standard clock period. The standard clock period is less than the reference clock period. The time measurement module is used to record a second reference clock index and a second pulse number according to the reference clock cycle when the second pulse sent by the second signal source in the at least two signal sources arrives. The second pulse number is the number of standard clock cycles from the second reference clock index to the second pulse, recorded according to the standard clock cycle. The processor module is configured to calculate the pulse time interval between the first signal source and the second signal source based on the first reference clock index, the first pulse count, the second reference clock index, the second pulse count, and the standard clock period. The time measurement module is also connected to an external crystal oscillator circuit; The time measurement module is also used to obtain the crystal oscillator value of the crystal oscillator circuit, determine the frequency division coefficient based on the crystal oscillator value, and determine the standard clock period based on the reference clock period and the frequency division coefficient.
2. The signal interval measurement module according to claim 1, characterized in that, The processor module is further configured to calculate the first transmission time of the first pulse relative to the reference clock period based on the first reference clock index, the first pulse number, and the standard clock period. The processor module is further configured to calculate the second transmission time of the second pulse relative to the reference clock period based on the second reference clock index, the second pulse number, and the standard clock period; The processor module is further configured to calculate the pulse time interval between the first signal source and the second signal source based on the first transmission time and the second transmission time.
3. The signal interval measurement module according to claim 1, characterized in that, The signal interval measurement module also includes a function control module, which is electrically connected to the processor module; The function control module is used to send the identifier of the signal source to be detected to the processor module; The processor module is also configured to receive the identifier of the signal source to be detected and control the time measurement module to be connected to each signal source corresponding to the identifier of the signal source to be detected.
4. The signal interval measurement module according to claim 3, characterized in that, The functional control module includes selection controls for each signal source; The function control module is also used to trigger the selection control of each signal source and obtain the identifier corresponding to the selected signal source as the identifier of the signal source to be detected.
5. The signal interval measurement module according to claim 3, characterized in that, The function control module also includes a count setting control; The function control module is used to receive the number of calculations G set by the number setting control, and send the number of calculations G to the processor module, where G is a positive integer; The processor module is further configured to control the time measurement module to acquire G measurement data, and to calculate G pulse time intervals between the first signal source and the second signal source, and to obtain an average value based on the G pulse time intervals between the first signal source and the second signal source.
6. The signal interval measurement module according to claim 1, characterized in that, The signal interval measurement module also includes a display module; the display module is electrically connected to the processor module. The display module is used to display the data sent to the processor module by the time measurement module, and to display the pulse time interval between the first signal source and the second signal source.
7. The signal interval measurement module according to claim 1, characterized in that, The processor module is also configured to receive a circuit switching signal, which is used to switch between different crystal oscillator circuits; The processor module is also configured to control the time measurement module to be electrically connected to the switched crystal oscillator circuit according to the circuit switching signal.
8. The signal interval measurement module according to any one of claims 1 to 7, characterized in that, The time measurement module is powered by a DC power supply.
9. A measuring device, characterized in that, The measuring device includes at least one signal interval measuring module as described in any one of claims 1 to 8.