A pulse counting system for rapid full-range measurement and its working method
By combining period measurement and pulse measurement methods and dynamically adjusting the pulse acquisition window time, the problem of full-range pulse signal measurement in existing technologies is solved, and high-precision and fast pulse frequency measurement is achieved.
Patent Information
- Application Number
- CN202210473948.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-29
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2042-04-29
AI Technical Summary
Existing technologies cannot achieve full-range measurement of low-speed and high-speed pulse signals, and improper pulse acquisition window time settings affect measurement accuracy and response speed.
By combining two frequency measurement methods—period measurement and pulse measurement—the most suitable frequency measurement unit is dynamically selected through the arbitration control unit. By combining low-frequency, medium-frequency, and high-frequency measurement units, the pulse acquisition window time is dynamically adjusted to achieve full-range pulse frequency measurement.
It enables full-range measurement of pulse signals, improves measurement accuracy and response speed, expands the frequency measurement range of the equipment, and avoids the slow response and accuracy loss caused by fixed window time.
Smart Images

Figure CN114866073B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial measurement technology, and in particular to a high-speed pulse counting scheme and system design based on CPLD for rapid full-range measurement. Background Technology
[0002] In existing industrial settings, applications such as speed acquisition and product counting require the acquisition of the number and period of random pulse signals output by sensors. For example, an encoder can be used to generate pulse signals from the number of rotations of a motor, and then the pulse signals can be converted into frequency and speed.
[0003] Pulse signals involve both low-speed and high-speed pulses. To ensure accurate pulse measurement, different measurement methods are required for pulse signals of different speeds. When measuring low-speed pulses, a period-counting method is used to measure the pulse frequency, while a pulse-counting method is used to measure the pulse frequency when measuring high-speed pulses. Due to the differences between these two measurement methods, existing products only measure the frequency, period, and other parameters of pulse signals using one of these methods, resulting in a limited measurement frequency range that cannot meet the full range of measurement requirements from low to high frequencies.
[0004] Meanwhile, it is difficult to achieve a good balance between the pulse acquisition window time and the pulse acquisition response speed for high-frequency pulse signals. Setting the pulse acquisition window time too large will slow down the pulse acquisition response time, while setting it too small will affect the acquisition accuracy and pulse measurement range.
[0005] Therefore, how to combine the two frequency measurement methods of period measurement and pulse measurement to address the two pulse measurement problems mentioned above, and how to dynamically modify the pulse acquisition window time to maximize the response speed of pulse measurement while ensuring measurement accuracy; ultimately, to achieve full-range measurement of pulse signals, has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] To address the above problems, this invention proposes a rapid, full-range pulse counting system and its operating method. It combines two frequency measurement methods—period measurement and pulse measurement—to achieve full-range measurement of pulse signals. Simultaneously, it dynamically modifies the pulse acquisition window time based on the current pulse frequency, maximizing the pulse measurement response speed while ensuring measurement accuracy. This results in a high-speed pulse counting scheme and system design for rapid, full-range measurement, improving the versatility of PLC controllers in applications such as speed acquisition and product counting.
[0007] The technical solution of the present invention is as follows: the pulse counting system includes an MCU and a CPLD. The MCU and the CPLD interact through an SPI serial communication interface. The MCU is responsible for data interaction and command issuance between the CPLD and the PLC controller. The CPLD is responsible for acquiring external pulse signals and receiving control commands from the MCU.
[0008] The CPLD includes a low-frequency measurement unit, a medium-frequency measurement unit, a high-frequency measurement unit, an arbitration control unit, and an SPI communication unit. An external pulse signal is simultaneously measured by the low-frequency, medium-frequency, and high-frequency measurement units, and the measured pulse count data is transmitted to the arbitration control unit. The arbitration control unit, based on the currently input pulse count data, selects the measurement result from the measurement unit with higher accuracy and sends it to the SPI communication unit. Simultaneously, it controls the start, stop, and reset of each measurement unit. The SPI communication unit receives control commands and data commands from the MCU, uploads the pulse count data sent by the arbitration control unit to the MCU, and simultaneously sends control commands to the MCU for frequency calculation and conversion.
[0009] The arbitration control unit divides the pulse counting data. Since the pulse counting data corresponds to the frequency value under a fixed base frequency, the actual pulse count value is expressed by the frequency value. F0-F5 is recorded as low frequency, F5-F6 as medium frequency, and above F6 as high frequency. F1 and F2 are set within the range of F5±20Hz, and F3 and F4 are set within the range of F6±200Hz. The low frequency measurement unit outputs a normal value within the range of F0-F2, the medium frequency measurement unit outputs a normal value within the range of F1-F4, and the high frequency measurement unit outputs a normal value above F3.
[0010] After receiving the frequency F corresponding to the external pulse count value input by the low-frequency frequency measurement unit, the medium-frequency frequency measurement unit, and the high-frequency frequency measurement unit, if F0≤F<F2, the arbitration control unit selects the output value of the low-frequency frequency measurement unit.
[0011] If F2≤F<F4, the arbitration control unit selects the output value of the intermediate frequency measurement unit;
[0012] If F4≤F, the arbitration control unit selects the output value of the high-frequency measurement unit;
[0013] After that,
[0014] If the frequency measurement is for a continuous pulse, first determine whether F is gradually increasing or gradually decreasing:
[0015] If the frequency is gradually increased, when F < F2, the arbitration control unit selects the output value of the low-frequency measurement unit; when F2 ≤ F < F4, the arbitration control unit selects the output value of the medium-frequency measurement unit; and when F4 ≤ F, the arbitration control unit selects the output value of the high-frequency measurement unit.
[0016] If the frequency gradually decreases, when F < F1, the arbitration control unit selects the output value of the low-frequency measurement unit; when F1 ≤ F < F3, the arbitration control unit selects the output value of the medium-frequency measurement unit; and when F3 ≤ F, the arbitration control unit selects the output value of the high-frequency measurement unit.
[0017] If the frequency measurement is for a non-continuous pulse, the arbitration control unit selects the output value of the low-frequency measurement unit when F < F2, selects the output value of the medium-frequency measurement unit when F2 ≤ F < F4, and selects the output value of the high-frequency measurement unit when F4 ≤ F.
[0018] Furthermore, the low-frequency measurement unit uses the rising edges of two consecutive input pulses as the start and stop signals for counting the 10MHz base frequency. By calculating the count value of the 10MHz base frequency between the two consecutive rising edge signals, the frequency of the current input pulse is calculated after being input to the MCU.
[0019] Furthermore, to improve frequency measurement accuracy, the intermediate frequency measurement unit adopts a combination of period measurement and pulse measurement to measure the frequency of the input pulse signal;
[0020] The intermediate frequency measurement unit also uses a 10MHz base frequency as the measurement base frequency, and adds a 1kHz base frequency signal as the base frequency for the window time length. The window time length can be modified by specifying the count value of the 1kHz base frequency signal, in ms. Finally, by measuring the external input pulse count value and the 10MHz base frequency pulse count value within a specified time period, the frequency of the external input pulse is calculated. The specified time period length can be dynamically adjusted according to the current input pulse frequency, ensuring the accuracy of frequency measurement while improving the frequency measurement response speed.
[0021] Furthermore, given a time window t, if the external pulse count is m and the 10MHz base frequency count is n, then the MCU calculates the external pulse frequency using the following formula: F = (m * 10MHz) / n;
[0022] The time window t is more than twice the period of the external pulse. At the same time, the time window t can dynamically follow the periodic change of the external pulse frequency according to the formula t = 2 / F. The minimum limit of t is 10ms.
[0023] Furthermore, the high-frequency measurement unit measures the frequency of the input pulse signal by measuring the pulse within a specified time. The high-frequency measurement unit uses a 10MHz base frequency as the sampling frequency and can be configured with different hardware filtering levels to filter the input pulse signal. Only when the level signals acquired n times are all high / low level will the external pulse signal value be counted once, so that the frequency of the current input pulse can be calculated after input to the MCU.
[0024] The beneficial effects of this invention are as follows:
[0025] I. This invention integrates two commonly used frequency measurement methods: period measurement and pulse measurement. Combining the advantages of both methods, it proposes to measure the external pulse and fundamental frequency pulse count values within a specified window time, thereby calculating the external pulse frequency and improving the frequency measurement accuracy. Theoretically, increasing the fundamental frequency can further improve the frequency measurement accuracy. At the same time, it integrates these three frequency measurement methods for different frequency ranges to achieve full-range pulse frequency measurement, making the frequency measurement range of the same device wider.
[0026] Second, regarding the aforementioned window time, this invention proposes to dynamically follow the changes in the external frequency period based on the current external frequency period. This effectively avoids the contradiction between slow frequency measurement response and minimum frequency measurement range caused by a fixed window time length, and can significantly improve the frequency measurement response without affecting the minimum frequency measurement range.
[0027] Third, combining the commonly used frequency measurement methods of measuring period and pulse, we propose to measure the external pulse and fundamental frequency pulse count values within a specified window time, thereby calculating the external pulse frequency and improving the frequency measurement accuracy. At the same time, for different frequency ranges, we integrate these three frequency measurement methods to achieve full-range pulse frequency measurement, making the frequency measurement range of the equipment wider.
[0028] Fourth, this invention avoids the contradiction between slow frequency measurement response and minimum frequency measurement range caused by fixed window time length, and proposes a dynamic window time following method, which can significantly improve frequency measurement response without affecting the minimum frequency measurement range. Attached Figure Description
[0029] Figure 1 This is a structural diagram of the case.
[0030] Figure 2 This is the schematic diagram of the low-frequency measurement unit in this case.
[0031] Figure 3 This is the schematic diagram of the intermediate frequency measurement unit in this case.
[0032] Figure 4 This is the schematic diagram of the high-frequency measurement unit in this case.
[0033] Figure 5This is the schematic diagram of the arbitration control unit.
[0034] Figure 6 This is the overall system design block diagram on the MCU side. Detailed Implementation
[0035] To clearly illustrate the technical features of this patent, the following detailed description is provided through specific embodiments and in conjunction with the accompanying drawings.
[0036] The present invention is as follows Figure 1-6 As shown, the pulse counting system includes an MCU and a CPLD. The MCU and CPLD interact through an SPI serial communication interface. The MCU is responsible for data interaction and command issuance between the CPLD and the PLC controller, while the CPLD is responsible for acquiring external pulse signals and receiving control commands from the MCU.
[0037] The CPLD includes a low-frequency measurement unit, a medium-frequency measurement unit, a high-frequency measurement unit, an arbitration control unit, and an SPI communication unit. An external pulse signal is simultaneously measured by the low-frequency, medium-frequency, and high-frequency measurement units, and the measured pulse count data is transmitted to the arbitration control unit. The arbitration control unit, based on the currently input pulse count data, selects the measurement result from the measurement unit with higher accuracy and sends it to the SPI communication unit. Simultaneously, it controls the start, stop, and reset of each measurement unit. The SPI communication unit receives control commands and data commands from the MCU, uploads the pulse count data sent by the arbitration control unit to the MCU, and simultaneously sends control commands to the MCU for frequency calculation and conversion.
[0038] like Figure 5 As shown, the actual output of the arbitration control unit is pulse count data. For ease of description in this case, it is described by frequency. The actual pulse count data corresponds to the frequency value. For example, with a base frequency of 10MHz, F5 = 200Hz corresponds to a pulse count value of 50000. Different base frequencies result in different pulse count values. The arbitration control unit divides the pulse count data. Since the pulse count data corresponds to the frequency value under a fixed base frequency, the actual pulse count value is expressed by the frequency value. F0-F5 is recorded as low frequency, F5- F6 is designated as the intermediate frequency (IF), and values above F6 are designated as the high frequency (HF). For example, F0 = 0Hz, F5 = 200Hz, and F6 = 2kHz. F1 and F2 are set within the range of F5 ± 20Hz, and F3 and F4 are set within the range of F6 ± 200Hz. For example, F1 = 180Hz, F2 = 220Hz, F3 = 1800Hz, and F4 = 2200Hz. The low-frequency measurement unit outputs a normal value within the range of F0-F2, the intermediate-frequency measurement unit outputs a normal value within the range of F1-F4, and the high-frequency measurement unit outputs a normal value above F3.
[0039] After the arbitration control unit receives the frequency F corresponding to the external pulse count value input by the low-frequency measurement unit, the medium-frequency measurement unit, and the high-frequency measurement unit, if F0≤F<F2, the low-frequency measurement unit outputs a normal value, the medium-frequency measurement unit outputs a normal value or an error value, and the high-frequency measurement unit outputs an error value. However, at this time, the arbitration control unit selects the output value of the low-frequency measurement unit.
[0040] If F2≤F<F4, the low-frequency measurement unit outputs an error value, the intermediate-frequency measurement unit outputs a normal value, and the high-frequency measurement unit outputs a normal / error value. However, the arbitration control unit prioritizes finding a normal value from the low-frequency measurement unit. If the low-frequency measurement unit outputs an error value, the arbitration control unit selects the output value of the intermediate-frequency measurement unit.
[0041] If F4≤F, the low-frequency and intermediate-frequency measurement units will output incorrect values, while the high-frequency measurement unit will output normal values. However, the arbitration control unit will prioritize finding normal values from the low-frequency and intermediate-frequency measurement units. If the low-frequency and intermediate-frequency measurement units output incorrect values, the arbitration control unit will select the output value of the high-frequency measurement unit.
[0042] After that,
[0043] If the frequency measurement is for a continuous pulse, first determine whether F is gradually increasing or gradually decreasing:
[0044] If the frequency is gradually increased, when F < F2, the arbitration control unit selects the output value of the low-frequency measurement unit; when F2 ≤ F < F4, the arbitration control unit selects the output value of the medium-frequency measurement unit; and when F4 ≤ F, the arbitration control unit selects the output value of the high-frequency measurement unit.
[0045] If the frequency gradually decreases, when F < F1, the arbitration control unit selects the output value of the low-frequency measurement unit; when F1 ≤ F < F3, the arbitration control unit selects the output value of the medium-frequency measurement unit; and when F3 ≤ F, the arbitration control unit selects the output value of the high-frequency measurement unit.
[0046] The arbitration control unit primarily arbitrates and judges the frequency measurement values output by each frequency measurement unit, and finally sends the output to the MCU. External pulse signals are simultaneously input to the low-frequency, intermediate-frequency, and high-frequency measurement units. Each measurement unit outputs its measured frequency, and the arbitration control unit switches between different measurement units. A hysteresis switching method is used to avoid inaccurate or fluctuating frequency measurements in the critical measurement region. For example, F1-F2 is the overlapping region of low-frequency and intermediate-frequency measurements. When the frequency corresponding to the input pulse rises from F1 to F2, the arbitration control unit switches from the low-frequency measurement unit to the intermediate-frequency measurement unit; conversely, when it falls from F2 to F1, it switches from the intermediate-frequency measurement unit to the low-frequency measurement unit. This effectively avoids frequency fluctuations caused by switching between different measurement units.
[0047] If the frequency measurement is for a non-continuous pulse, the arbitration control unit selects the output value of the low-frequency measurement unit when F < F2, selects the output value of the medium-frequency measurement unit when F2 ≤ F < F4, and selects the output value of the high-frequency measurement unit when F4 ≤ F.
[0048] The low-frequency measurement unit measures the input pulse by measuring the period. The CPLD uses a high-precision external crystal oscillator and outputs a 10MHz base frequency through an internal PLL phase-locked loop, which is used as the base frequency for the low-frequency measurement unit.
[0049] The low-frequency measurement unit uses the rising edges of two consecutive input pulses as the start and stop signals for counting the 10MHz base frequency. By calculating the count value of the 10MHz base frequency between the two consecutive rising edge signals, the frequency of the current input pulse is calculated after being input to the MCU.
[0050] Because the counting is based on a 10MHz baseband frequency, the frequency measurement granularity can reach 100ns, and based on a 32-bit baseband counter, the maximum frequency measurement period reaches 2. 32 *100ns, that is, the minimum frequency measurement frequency is 1 / (2 32 *100ns), assuming the 10MHz baseband has n counts, then the frequency measurement frequency F = 10MHz / n. Figure 2 This is based on the principle of low-frequency frequency measurement.
[0051] To improve frequency measurement accuracy, the intermediate frequency measurement unit uses a combination of period measurement and pulse measurement to measure the frequency of the input pulse signal.
[0052] The intermediate frequency measurement unit also uses a 10MHz base frequency as the measurement base frequency, and adds a 1kHz base frequency signal as the base frequency for the window time length. The window time length can be modified by specifying the count value of the 1kHz base frequency signal, in ms. Finally, by measuring the external input pulse count value and the 10MHz base frequency pulse count value within a specified time period, the frequency of the external input pulse is calculated. The specified time period length can be dynamically adjusted according to the current input pulse frequency, ensuring the accuracy of frequency measurement while improving the frequency measurement response speed.
[0053] like Figure 3 The intermediate frequency measurement principle in the MCU is as follows: given a time window t, if the external pulse count is m and the 10M base frequency count is n, then the MCU calculates the external pulse frequency according to the following formula: F=(m*10M) / n;
[0054] Increasing the size of the time window t can increase the frequency measurement accuracy of F, and conversely, decreasing it will reduce the accuracy. The time window t must be more than twice the period of the external pulse to ensure that the frequency measurement can be completed at least once. At the same time, the time window t can dynamically follow the periodic change of the external pulse frequency according to the formula t = 2 / F to ensure the real-time performance of the external pulse frequency measurement. As F increases, t continuously decreases, with a minimum limit of 10ms, which meets the real-time requirements of frequency measurement in most applications.
[0055] The high-frequency measurement unit measures the frequency of the input pulse signal by measuring pulses within a specified time period. This measurement method is only suitable for measuring high-frequency signals. To ensure accuracy during high-frequency measurement and avoid high-frequency interference affecting the measurement accuracy, the high-frequency measurement unit uses a 10MHz base frequency as the sampling frequency. Different hardware filtering levels can be configured to filter the input pulse signal. Only when the acquired level signals are all high / low levels n times consecutively will the external pulse signal value be counted once, thus calculating the frequency of the current input pulse after input to the MCU. Figure 4 Pulse 3 will not be counted and will be filtered out. The following diagram illustrates the principle of high-frequency measurement.
[0056] The SPI communication unit is responsible for receiving control commands and data exchange from the MCU. The serial SPI interface supports full-duplex communication, which is fast and simple, facilitating data exchange between the MCU and the CPLD. For different frequency measurement channels and register read / write operations, read / write flags and register addresses are specified to enable read / write operations on the relevant registers of different channels, thus supporting multi-channel external pulse frequency measurement. Furthermore, each channel can be processed in parallel without interference.
[0057] The MCU is primarily responsible for communication with the CPLD and PLC controller, and also handles CPLD data processing. This mainly includes CPLD communication and data processing, PLC controller communication processing, and other processing. The MCU continuously reads the base frequency count values and external pulse capture values from each channel of the CPLD via serial SPI. The actual outputs of each frequency measurement unit of the CPLD are the base frequency count values and external pulse capture values; the actual frequency calculation and conversion occur on the MCU side. Each frequency measurement unit of the CPLD is only responsible for pulse counting. There is a one-to-one correspondence between the actual pulse count values of each CPLD channel and the measured frequency; the term "frequency" is used for convenience in the preceding description. The actual pulse frequency is calculated from the base frequency count values and external pulse capture values. Simultaneously, commands from the PLC controller are received, and the actual pulse frequency is uploaded to the PLC controller. Figure 6 This is a block diagram of the overall system design for the MCU side.
[0058] In CPLD communication and data processing, after the CPLD completes a data acquisition, the CPLD will set the corresponding status bit in the control status register and report an external interrupt to the MCU. The MCU reads the control status register and the captured data value through the external interrupt service function, and hands the data over to the data processing thread to complete the frequency data conversion calculation. At the same time, it issues control commands and related registers according to the decision.
[0059] The PLC communication processing mainly maintains communication with the PLC. When the PLC is powered on, it organizes configuration messages according to the configuration information and sends the configuration information to the MCU through the HIN internal bus. The MCU parses the configuration information and writes the configuration to the CPLD, realizing the initial configuration of the CPLD by the PLC. After the configuration is completed, the PLC obtains the frequency value of each channel and the actual status information of each channel through data messages.
[0060] Other processing mainly includes fault reset, real-time status display, etc., to prevent the software program from crashing and to facilitate users to observe the real-time status.
[0061] There are many specific ways to implement this invention. The above description is only a preferred embodiment of this invention. It should be noted that for those skilled in the art, several improvements can be made without departing from the principle of this invention, and these improvements should also be considered within the scope of protection of this invention.
Claims
1. A method for operating a pulse counting system for rapid full-range measurement, characterized in that, The pulse counting system includes an MCU and a CPLD. The MCU and CPLD interact through an SPI serial communication interface. The MCU is responsible for data interaction and command issuance between the CPLD and the PLC controller, while the CPLD is responsible for acquiring external pulse signals and receiving control commands from the MCU. The CPLD includes a low-frequency measurement unit, a medium-frequency measurement unit, a high-frequency measurement unit, an arbitration control unit, and an SPI communication unit. After the external pulse signal is measured by the low-frequency measurement unit, the medium-frequency measurement unit, and the high-frequency measurement unit, the measured pulse count data is transmitted to the arbitration control unit. The arbitration control unit selects the frequency measurement result of the frequency measurement unit with higher frequency measurement accuracy based on the currently input pulse count data and sends it to the SPI communication unit. At the same time, it controls the start, stop, and reset of each frequency measurement unit. The SPI communication unit receives the control commands and data commands from the MCU, uploads the pulse count data sent by the arbitration control unit to the MCU, and sends the control commands from the MCU to perform frequency calculation and conversion through the MCU. The arbitration control unit divides the pulse counting data. Since the pulse counting data corresponds to the frequency value under a fixed base frequency, the actual pulse count value is expressed by the frequency value. F0-F5 is recorded as low frequency, F5-F6 as medium frequency, and above F6 as high frequency. F1 and F2 are set within the range of F5±20Hz, and F3 and F4 are set within the range of F6±200Hz. The low frequency measurement unit outputs a normal value within the range of F0-F2, the medium frequency measurement unit outputs a normal value within the range of F1-F4, and the high frequency measurement unit outputs a normal value above F3. After receiving the frequency F corresponding to the external pulse count value input by the low-frequency frequency measurement unit, the medium-frequency frequency measurement unit, and the high-frequency frequency measurement unit, if F0≤F<F2, the arbitration control unit selects the output value of the low-frequency frequency measurement unit. If F2≤F<F4, the arbitration control unit selects the output value of the intermediate frequency measurement unit; If F4≤F, the arbitration control unit selects the output value of the high-frequency measurement unit; After that, If the frequency measurement is for a continuous pulse, first determine whether F is gradually increasing or gradually decreasing: If the frequency is gradually increased, when F < F2, the arbitration control unit selects the output value of the low-frequency measurement unit; when F2 ≤ F < F4, the arbitration control unit selects the output value of the medium-frequency measurement unit; and when F4 ≤ F, the arbitration control unit selects the output value of the high-frequency measurement unit. If the frequency gradually decreases, when F < F1, the arbitration control unit selects the output value of the low-frequency measurement unit; when F1 ≤ F < F3, the arbitration control unit selects the output value of the medium-frequency measurement unit; and when F3 ≤ F, the arbitration control unit selects the output value of the high-frequency measurement unit. If the frequency measurement is for a non-continuous pulse, the arbitration control unit selects the output value of the low-frequency measurement unit when F < F2, selects the output value of the medium-frequency measurement unit when F2 ≤ F < F4, and selects the output value of the high-frequency measurement unit when F4 ≤ F.
2. The operating method of the pulse counting system for rapid full-range measurement according to claim 1, characterized in that, The low-frequency measurement unit uses the rising edges of two consecutive input pulses as the start and stop signals for counting the 10MHz base frequency. By calculating the count value of the 10MHz base frequency between the two consecutive rising edge signals, the frequency of the current input pulse is calculated after being input to the MCU.
3. The operating method of the pulse counting system for rapid full-range measurement according to claim 1, characterized in that, To improve frequency measurement accuracy, the intermediate frequency measurement unit uses a combination of period measurement and pulse measurement to measure the frequency of the input pulse signal. The intermediate frequency measurement unit also uses a 10MHz base frequency as the measurement base frequency, and adds a 1kHz base frequency signal as the base frequency for the window time length. The window time length can be modified by specifying the count value of the 1kHz base frequency signal, in ms. Finally, by measuring the external input pulse count value and the 10MHz base frequency pulse count value within a specified time period, the frequency of the external input pulse is calculated. The specified time period length can be dynamically adjusted according to the current input pulse frequency, ensuring the accuracy of frequency measurement while improving the frequency measurement response speed.
4. The operating method of the pulse counting system for rapid full-range measurement according to claim 3, characterized in that, Given a time window t, if the external pulse count is m and the 10MHz base frequency count is n, then the MCU calculates the external pulse frequency using the following formula: F = (m * 10MHz) / n; The time window t is more than twice the period of the external pulse. At the same time, the time window t can dynamically follow the periodic change of the external pulse frequency according to the formula t = 2 / F. The minimum limit of t is 10ms.
5. The operating method of the pulse counting system for rapid full-range measurement according to claim 1, characterized in that, The high-frequency measurement unit measures the frequency of the input pulse signal by measuring the pulse within a specified time. The high-frequency measurement unit uses a 10MHz base frequency as the sampling frequency and can be configured with different hardware filtering levels to filter the input pulse signal. Only when the level signal acquired n times is high level / low level will the external pulse signal value be counted once, so that the frequency of the current input pulse can be calculated after input to the MCU.
Citation Information
Patent Citations
Pulse counting frequency measurement method and device
CN111722012A