CN117706196A - Frequency measurement method and device, electronic equipment and storage medium - Google Patents
Frequency measurement method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN117706196A CN117706196A CN202311722154.7A CN202311722154A CN117706196A CN 117706196 A CN117706196 A CN 117706196A CN 202311722154 A CN202311722154 A CN 202311722154A CN 117706196 A CN117706196 A CN 117706196A
- Authority
- CN
- China
- Prior art keywords
- measurement
- square wave
- pulse square
- pwm pulse
- frequency
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000691 measurement method Methods 0.000 title claims abstract description 26
- 238000005259 measurement Methods 0.000 claims abstract description 125
- 238000000034 method Methods 0.000 claims abstract description 16
- 238000012360 testing method Methods 0.000 claims description 17
- 238000004458 analytical method Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 8
- 230000003287 optical effect Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 239000000523 sample Substances 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000000737 periodic effect Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Measuring Frequencies, Analyzing Spectra (AREA)
Abstract
The application discloses a frequency measurement method, a frequency measurement device, electronic equipment and a storage medium; the method comprises the following steps: receiving a measurement instruction sent by a measurement person; responding to the measuring instruction, and acquiring a Pulse Width Modulation (PWM) pulse square wave of a product to be measured in a preset sufficient measuring time period through a clock chip; and analyzing the PWM pulse square wave to obtain a frequency measurement result of the product to be measured. The frequency measurement accuracy can be effectively improved, and whether the product to be measured is qualified or not can be accurately judged.
Description
Technical Field
The embodiment of the application relates to the technical field of electronic circuits, in particular to a frequency measurement method, a frequency measurement device, electronic equipment and a storage medium.
Background
The frequency is the basis for the proper operation of the electronic product. By measuring the frequency of the electronic product, it can be determined whether the operating frequency meets the design requirements. If the frequency deviates from the set range, it may cause degradation or even damage to the electronic product.
In the prior art, because the frequency has the change of duty ratio when temperature compensation is performed, the previous testing method counts the number of high levels of the frequency to be tested through a faster reference frequency, so that the working frequency of the article to be tested is measured, and the testing method has the condition of inaccurate testing result.
Disclosure of Invention
The frequency measurement method, the frequency measurement device, the electronic equipment and the storage medium can effectively improve the accuracy of frequency measurement, and therefore whether a product to be measured is qualified or not can be accurately judged.
In a first aspect, an embodiment of the present application provides a frequency measurement method, where the method includes:
receiving a measurement instruction sent by a measurement person;
responding to the measurement instruction, and acquiring a Pulse Width Modulation (PWM) pulse square wave of the product to be measured in a preset sufficient measurement time period through a clock chip;
and analyzing the PWM pulse square wave to obtain a frequency measurement result of the product to be measured.
In a second aspect, embodiments of the present application further provide a frequency measurement device, where the device includes: the device comprises a receiving module, an acquisition module and an analysis module; wherein,
the receiving module is used for receiving a measurement instruction sent by a measurement person;
the acquisition module is used for responding to the measurement instruction and acquiring PWM pulse square waves of the product to be measured in a preset sufficient measurement time period through a clock chip;
and the analysis module is used for analyzing the PWM pulse square wave to obtain a frequency measurement result of the product to be measured.
In a third aspect, an embodiment of the present application provides an electronic device, including:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the frequency measurement method described in any of the embodiments of the present application.
In a fourth aspect, embodiments of the present application provide a storage medium having stored thereon a computer program which, when executed by a processor, implements the frequency measurement method described in any of the embodiments of the present application.
The embodiment of the application provides a frequency measurement method, a frequency measurement device, electronic equipment and a storage medium, wherein measurement instructions sent by measurement personnel are received firstly; then, responding to the measuring instruction, and acquiring PWM pulse square waves of the product to be measured in a preset sufficient measuring time period through a clock chip; and then analyzing the PWM pulse square wave to obtain a frequency measurement result of the product to be measured. That is, in the technical scheme of the application, PWM pulse square waves of the product to be measured in a sufficient measurement time period can be obtained, so that the accuracy of frequency measurement can be improved. In the prior art, because the frequency has the change of duty ratio when temperature compensation is performed, the previous testing method counts the high level number of the frequency to be tested through a faster reference frequency, so that the working frequency of the article to be tested is measured, and the testing method has the condition of inaccurate testing result. Therefore, compared with the prior art, the frequency measurement method, the frequency measurement device, the electronic equipment and the storage medium provided by the embodiment of the application are used for effectively improving the accuracy of frequency measurement, so that whether the product to be measured is qualified or not can be accurately judged; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Drawings
Fig. 1 is a schematic flow chart of a frequency measurement method according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a second flow chart of the frequency measurement method according to the embodiment of the present application;
fig. 3 is a schematic flow chart of a PWM pulse square wave analysis method according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a PWM pulse square wave provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a frequency measurement device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The present application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings.
Example 1
Fig. 1 is a schematic flow chart of a first procedure of a frequency measurement method provided in an embodiment of the present application, where the method may be performed by a frequency measurement device or an electronic device, and the device or the electronic device may be implemented by software and/or hardware, and the device or the electronic device may be integrated into any intelligent device having a network communication function. As shown in fig. 1, the frequency measurement method may include the steps of:
s101, receiving a measurement instruction sent by a measurement person.
In the specific embodiment of the present application, a digital oscilloscope and a measurement probe that meets the specifications of the clock chip being measured are required. The ground of the oscilloscope is connected to the ground of the clock chip. The probe of the measurement probe is connected to the clock output pin of the clock chip. The oscilloscope is turned on and its settings are adjusted to accommodate the measurement requirements. The correct time reference, trigger settings, vertical and horizontal scaling, etc. may be selected. The trigger settings are adjusted to ensure that the oscilloscope is able to capture the clock signal.
S102, responding to the measurement instruction, and acquiring PWM pulse square waves of the product to be measured within a preset sufficient measurement time period through a clock chip.
In this step, the obtaining of the PWM pulse square wave of the product to be measured within a preset sufficient measurement time period may be performed according to the following steps: 1) First, an adapted clock chip is selected, which needs to have timing and measurement functions. Such as a timer/counter in an 8051 series chip. 2) And configuring timing parameters of a clock chip according to the frequency of the PWM signal of the product to be detected and the requirement of the measurement duration. For example, the count bit number of the timer, the clock source, the timing mode, and the like are set. 3) PWM signals connected with the product to be tested are input to a timing input pin of the clock chip. 4) A timer is started and a measurement duration is set. The timer interrupt function provided by the clock chip may be used to trigger an interrupt when the timer is complete. 5) In the interrupt service routine, the count value of the timer is read. The count value is converted into a corresponding time unit, such as microseconds or milliseconds, according to the count parameter and frequency of the timer. 6) And comparing the time obtained by the timer with a preset measurement duration. If the measured duration has reached or exceeded a preset value, the timer is stopped and the measurement result is saved.
The interval of the sufficient measurement time length in the embodiment of the present application is [ center time length minus first fluctuation time length, center time length plus second fluctuation time length ]; wherein the central duration is 10 seconds.
S103, analyzing the PWM pulse square wave to obtain a frequency measurement result of the product to be measured.
In this step, the electronic device may analyze the PWM pulse square wave to obtain a frequency measurement result of the product to be measured. Specifically, the electronic device may first calculate a duty cycle of the PWM pulse square wave within a sufficient measurement period according to a predetermined reference frequency; and then obtaining a frequency measurement result of the product to be measured according to the duty ratio of the PWM pulse square wave in a sufficient measurement time period.
The frequency measurement method provided by the embodiment of the application firstly receives a measurement instruction sent by a measurement person; then, responding to the measuring instruction, and acquiring PWM pulse square waves of the product to be measured in a preset sufficient measuring time period through a clock chip; and then analyzing the PWM pulse square wave to obtain a frequency measurement result of the product to be measured. That is, in the technical scheme of the application, PWM pulse square waves of the product to be measured in a sufficient measurement time period can be obtained, so that the accuracy of frequency measurement can be improved. In the prior art, because the frequency has the change of duty ratio when temperature compensation is performed, the previous testing method counts the high level number of the frequency to be tested through a faster reference frequency, so that the working frequency of the article to be tested is measured, and the testing method has the condition of inaccurate testing result. Therefore, compared with the prior art, the frequency measurement method provided by the embodiment of the application effectively improves the accuracy of frequency measurement, and can accurately judge whether the product to be measured is qualified; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example two
Fig. 2 is a second flow chart of the frequency measurement method according to the embodiment of the present application. Further optimization and expansion based on the above technical solution can be combined with the above various alternative embodiments. As shown in fig. 2, the frequency measurement method may include the steps of:
s201, receiving a measurement instruction sent by a measurement person.
S202, responding to a measurement instruction, and acquiring PWM pulse square waves of a product to be measured within a preset sufficient measurement time period through a clock chip.
S203, calculating the duty ratio of the PWM pulse square wave in a sufficient measurement duration according to a predetermined reference frequency.
In this step, the electronics can calculate the duty cycle of the PWM pulse square wave for a sufficient measurement period from a predetermined reference frequency. Specifically, the electronic device may first calculate the number of normal high/low levels of the PWM pulse square wave within a sufficient measurement period from the reference frequency; the duty cycle of the PWM pulse square wave is then calculated for a sufficient measurement period based on the number of normal high/low levels and the predetermined duration of normal high/low levels.
S204, multiplying the duty ratio of the PWM pulse square wave in the sufficient measurement time period by the sufficient measurement time period to obtain the cycle time of the PWM pulse square wave in the sufficient measurement time period.
S205, obtaining a frequency measurement result of the product to be measured according to the period time of the PWM pulse square wave in a sufficient measurement duration.
The frequency in the embodiments of the present application refers to the number of periodic changes of a signal in a unit time, typically expressed in hertz (Hz), and the duty cycle refers to the ratio of the time when a high level exists in a periodic signal to the period. Specifically, the frequency is calculated from the duty cycle of the PWM pulse square wave, and the following formula can be used: frequency=1/(measurement period×duty cycle); the measurement duration refers to the time length of measuring the PWM pulse square wave, and is generally expressed in seconds. The duty cycle refers to the ratio of the duration of the high level of the PWM pulse square wave to the entire period during the measurement period. For example, if the period of the PWM pulse square wave is 10 ms and the high level lasts for 5 ms, the duty ratio is 50%. By substituting the measurement duration and the duty cycle into the above formula, the frequency can be calculated.
The frequency measurement method provided by the embodiment of the application firstly receives a measurement instruction sent by a measurement person; then, responding to the measuring instruction, and acquiring PWM pulse square waves of the product to be measured in a preset sufficient measuring time period through a clock chip; and then analyzing the PWM pulse square wave to obtain a frequency measurement result of the product to be measured. That is, in the technical scheme of the application, PWM pulse square waves of the product to be measured in a sufficient measurement time period can be obtained, so that the accuracy of frequency measurement can be improved. In the prior art, because the frequency has the change of duty ratio when temperature compensation is performed, the previous testing method counts the high level number of the frequency to be tested through a faster reference frequency, so that the working frequency of the article to be tested is measured, and the testing method has the condition of inaccurate testing result. Therefore, compared with the prior art, the frequency measurement method provided by the embodiment of the application effectively improves the accuracy of frequency measurement, and can accurately judge whether the product to be measured is qualified; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example III
Fig. 3 is a flowchart of a PWM pulse square wave analysis method according to an embodiment of the present application. Further optimization and expansion based on the above technical solution can be combined with the above various alternative embodiments.
As shown in fig. 3, the PWM pulse square wave analysis method may include the steps of:
s301, extracting a high level/low level from the PWM pulse square wave as a current level to be measured.
S302, if the duration of the current level to be measured is equal to the predetermined normal duration, judging that the current level to be measured is normal high level/low level, and adding 1 to the number of normal high level/low level; the above operation is repeatedly performed until the number of normal high/low levels of the PWM pulse square wave for a sufficient measurement period is calculated.
Fig. 4 is a schematic diagram of a PWM pulse square wave according to an embodiment of the present application. As shown in fig. 4, the PWM signal is generally composed of a high level and a low level, and their time lengths determine the duty ratio. For example, a 50% duty cycle means that the high level and low level are equal in length of time. The PWM signal has a fixed frequency and a variable duty cycle. When the duty ratio is larger, the time of the high level is longer, and the output level is higher; when the duty ratio is small, the time of the high level is short and the output level is low. This approach may be used to control, for example, the rotational speed of the motor, the brightness of the LEDs, etc. The embodiment of the application can predetermine a duration of normal high level/low level, namely a normal duration. For example, the normal duration is 3 time units, and is shown as 3 arrows in fig. 4, and then the high/low level with the duration of 2 time units is the abnormal duration.
S303, calculating the duty ratio of the PWM pulse square wave in a sufficient measurement duration according to the number of normal high levels/low levels and the predetermined duration of the normal high levels/low levels.
In this step, the electronic device may calculate the duty cycle of the PWM pulse square wave for a sufficient measurement period based on the number of normal high/low levels and the predetermined duration of normal high/low levels. For example, assuming that the number of normal high/low levels is M and the predetermined duration of normal high/low levels is T in a measurement period T, the duty ratio in the measurement period is: (M×t)/T.
S304, obtaining a frequency measurement result of the product to be measured according to the duty ratio of the PWM pulse square wave in a sufficient measurement time period.
In the specific embodiment of the application, the electronic equipment can also detect the temperature of the environment where the product to be detected is located at the current moment; if the temperature of the environment where the product to be measured is located at the current moment is out of the preset temperature range, the electronic equipment can also perform temperature compensation on the clock chip, so that the PWM pulse square wave is kept in the preset frequency range.
The frequency measurement method provided by the embodiment of the application firstly receives a measurement instruction sent by a measurement person; then, responding to the measuring instruction, and acquiring PWM pulse square waves of the product to be measured in a preset sufficient measuring time period through a clock chip; and then analyzing the PWM pulse square wave to obtain a frequency measurement result of the product to be measured. That is, in the technical scheme of the application, PWM pulse square waves of the product to be measured in a sufficient measurement time period can be obtained, so that the accuracy of frequency measurement can be improved. In the prior art, because the frequency has the change of duty ratio when temperature compensation is performed, the previous testing method counts the high level number of the frequency to be tested through a faster reference frequency, so that the working frequency of the article to be tested is measured, and the testing method has the condition of inaccurate testing result. Therefore, compared with the prior art, the frequency measurement method provided by the embodiment of the application effectively improves the accuracy of frequency measurement, and can accurately judge whether the product to be measured is qualified; in addition, the technical scheme of the embodiment of the application is simple and convenient to realize, convenient to popularize and wider in application range.
Example IV
Fig. 5 is a schematic structural diagram of a frequency measurement device according to an embodiment of the present application. As shown in fig. 5, the frequency measuring device includes: a receiving module 501, an acquiring module 502 and an analyzing module 503; wherein,
the receiving module 501 is configured to receive a measurement instruction sent by a measurement person;
the obtaining module 502 is configured to obtain, by using a clock chip, a PWM pulse square wave of the product to be tested within a preset sufficient measurement duration in response to the measurement instruction;
the analysis module 503 is configured to analyze the PWM pulse square wave to obtain a frequency measurement result of the product to be measured.
The frequency measuring device can execute the method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of executing the method. Technical details not described in detail in this embodiment may be found in the frequency measurement method provided in any embodiment of the present application.
Example five
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Fig. 6 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present application. The electronic device 12 shown in fig. 6 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in fig. 6, the electronic device 12 is in the form of a general purpose computing device. Components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard disk drive"). Although not shown in fig. 6, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the present application.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods in the embodiments described herein.
The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 over the bus 18. It should be appreciated that although not shown in fig. 6, other hardware and/or software modules may be used in connection with electronic device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing the frequency measurement method provided in the embodiment of the present application.
Example six
Embodiments of the present application provide a computer storage medium.
Any combination of one or more computer readable media may be employed in the computer readable storage media of the embodiments herein. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present application may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present application and the technical principle applied. Those skilled in the art will appreciate that the present application is not limited to the particular embodiments described herein, but is capable of numerous obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the present application. Therefore, while the present application has been described in connection with the above embodiments, the present application is not limited to the above embodiments, but may include many other equivalent embodiments without departing from the spirit of the present application, the scope of which is defined by the scope of the appended claims.
Claims (10)
1. A method of frequency measurement, the method comprising:
receiving a measurement instruction sent by a measurement person;
responding to the measurement instruction, and acquiring a Pulse Width Modulation (PWM) pulse square wave of the product to be measured in a preset sufficient measurement time period through a clock chip;
and analyzing the PWM pulse square wave to obtain a frequency measurement result of the product to be measured.
2. The method of claim 1, wherein the interval of the sufficient measurement duration is [ center duration minus first fluctuation duration, the center duration plus second fluctuation duration ]; wherein the central duration is 10 seconds.
3. The method of claim 1, wherein analyzing the PWM pulse square wave to obtain a frequency measurement of the product under test comprises:
calculating the duty cycle of the PWM pulse square wave in the sufficient measurement duration according to a predetermined reference frequency;
and obtaining a frequency measurement result of the product to be measured according to the duty ratio of the PWM pulse square wave in the sufficient measurement duration.
4. A method according to claim 3, wherein calculating the duty cycle of the PWM pulse square wave for the sufficient measurement period from a predetermined reference frequency comprises:
calculating the number of normal high/low levels of the PWM pulse square wave within the sufficient measurement period according to the reference frequency;
the duty cycle of the PWM pulse square wave in the sufficient measurement duration is calculated according to the number of the normal high levels/low levels and the predetermined duration of the normal high levels/low levels.
5. The method of claim 4, wherein calculating the number of normal high/low levels of the PWM pulse square wave over the sufficient measurement period from the reference frequency comprises:
extracting a high level/low level from the PWM pulse square wave as a current level to be measured;
if the duration of the current level to be measured is equal to the predetermined normal duration, judging that the current level to be measured is normal high level/low level, and adding 1 to the number of normal high level/low level; the above operation is repeatedly performed until the number of normal high/low levels of the PWM pulse square wave within the sufficient measurement period is calculated.
6. A method according to claim 3, wherein obtaining a frequency measurement of the product under test from the duty cycle of the PWM pulse square wave over the sufficient measurement period comprises:
multiplying the duty ratio of the PWM pulse square wave in the sufficient measurement time period by the sufficient measurement time period to obtain the cycle time of the PWM pulse square wave in the sufficient measurement time period;
and obtaining a frequency measurement result of the product to be measured according to the period time of the PWM pulse square wave in the sufficient measurement duration.
7. The method according to claim 1, wherein the method further comprises:
detecting the temperature of the environment where the product to be detected is located at the current moment;
and if the temperature of the environment where the product to be detected is located at the current moment is out of the preset temperature range, carrying out temperature compensation on the clock chip, so that the PWM pulse square wave is kept in the preset frequency range.
8. A frequency measurement device, the device comprising: the device comprises a receiving module, an acquisition module and an analysis module; wherein,
the receiving module is used for receiving a measurement instruction sent by a measurement person;
the acquisition module is used for responding to the measurement instruction and acquiring the Pulse Width Modulation (PWM) pulse square wave of the product to be measured in a preset sufficient measurement time period through a clock chip;
and the analysis module is used for analyzing the PWM pulse square wave to obtain a frequency measurement result of the product to be measured.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the frequency measurement method of any of claims 1 to 7.
10. A storage medium having stored thereon a computer program, which when executed by a processor implements the frequency measurement method according to any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311722154.7A CN117706196A (en) | 2023-12-14 | 2023-12-14 | Frequency measurement method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311722154.7A CN117706196A (en) | 2023-12-14 | 2023-12-14 | Frequency measurement method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117706196A true CN117706196A (en) | 2024-03-15 |
Family
ID=90152899
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311722154.7A Pending CN117706196A (en) | 2023-12-14 | 2023-12-14 | Frequency measurement method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117706196A (en) |
-
2023
- 2023-12-14 CN CN202311722154.7A patent/CN117706196A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20100306592A1 (en) | Computer system on and off test apparatus and method | |
US8996928B2 (en) | Devices for indicating a physical layer error | |
CN108664372A (en) | Monitoring device, method and the computer readable storage medium of test process | |
US20110057643A1 (en) | Oscillograph and signal integrity test method using the oscillograph | |
CN114167132B (en) | Power consumption detection method and device of wireless terminal, electronic equipment and storage medium | |
JP6483368B2 (en) | Switching cycle display method and test measurement apparatus | |
CN103532550A (en) | Current frequency converter test method based on virtual instrument | |
CN117706196A (en) | Frequency measurement method and device, electronic equipment and storage medium | |
US20110130989A1 (en) | System and method for identifying a peripheral component interconnect express signal | |
CN104270632B (en) | Measuring instrument and method for screen parameters of television set | |
CN115733543A (en) | Optical module firmware time sequence test platform and test method | |
CN103076494B (en) | Power consumption measuring device and method | |
CN101430348B (en) | State detection apparatus and state detection method | |
CN113156208A (en) | Automatic detection equipment | |
CN110361043B (en) | Vehicle-mounted instrument fault detection system and fault detection method thereof | |
CN102591734A (en) | Method and device for detecting reset type of system | |
CN112131098A (en) | Method and system for testing electric energy meter software | |
CN114114725A (en) | Method for testing LCM response time and related equipment | |
CN106685606B (en) | Device and method for testing remote signaling anti-shake time and remote control output holding time | |
CN110888045B (en) | Jitter determination method and apparatus, storage medium, and electronic device | |
CN109101380B (en) | Method and equipment for detecting I2C signal quality | |
CN102645564B (en) | Automatic adjusting method for output stable time of multifunctional output source | |
CN117491784A (en) | Module aging test method, device, equipment and storage medium | |
US20120250527A1 (en) | Determining Connectivity Of A High Speed Link That Includes An AC-Coupling Capacitor | |
CN117826048A (en) | Method, system and equipment for diagnosing faults of aging box |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |