CN103901270A - Method for testing frequency based on DSP digital frequency meter - Google Patents
Method for testing frequency based on DSP digital frequency meter Download PDFInfo
- Publication number
- CN103901270A CN103901270A CN201410164360.5A CN201410164360A CN103901270A CN 103901270 A CN103901270 A CN 103901270A CN 201410164360 A CN201410164360 A CN 201410164360A CN 103901270 A CN103901270 A CN 103901270A
- Authority
- CN
- China
- Prior art keywords
- timer
- comparison match
- frequency
- capturing unit
- frequency meter
- 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
Images
Landscapes
- Measuring Frequencies, Analyzing Spectra (AREA)
Abstract
The invention discloses a method for testing the frequency based on a DSP digital frequency meter. The method comprises the steps that the digital frequency meter starts to work and a timer T1, a timer T2 and a capturing unit 1 are started; a comparison match interrupt identification flag of the timer T1 is read, so that whether a comparison match event of the timer T1 occurs or not is checked, if yes, the value of the timer T2 at this time is captured by the capturing unit 1 simultaneously, whether the comparison match event occurs for the first time or not is judged, if yes, the frequency of overflow of the timer T2 is reset at zero, the value of the timer T2 and the frequency of overflow of the timer T2 are captured again by the capturing unit 1 when a comparison match event occurs next time, the pulse count between the two comparison match events of the timer T2 is calculated, and therefore the frequency and the period are calculated. The method d for testing the frequency based on the DSP digital frequency meter has the advantages of being simple in principle, easy to implement, practical and high in testing accuracy.
Description
Technical field
The present invention relates to a kind of method of testing of digital frequency meter, particularly a kind of based on dsp chip digital frequency meter test frequency method.
Background technology
Digital frequency meter is to adopt the instrument of realizing of being made into of digital circuit to the measurement of cyclical variation signal frequency.Frequency meter is mainly used in measuring the frequency values of the periodic signals such as sine wave, square wave, triangular wave and spike pulse.Its expanded function can measuring-signal cycle and pulse width.Conventionally say, digital frequency meter refers to electronic counter type frequency meter.
Digital frequency meter is the indispensable surveying instruments in research and production field such as computing machine, communication apparatus, audio frequency and video.It is decimally numeral of one, shows the digital measurement instrument of measured signal frequency.Its basic function is to measure sinusoidal signal, the physical quantity changing in square-wave signal and other various unit interval.Simulating, in the design of digital circuit, installation, debug process, because using decimal number, it shows, and measure rapidly, precision is high, and intuitive display, so often will use digital frequency meter.
Summary of the invention
The technical problem to be solved in the present invention is: provide a kind of principle simple, be easy to realize, practical, measuring accuracy is high based on dsp chip digital frequency meter test frequency method.
The technical solution adopted for the present invention to solve the technical problems is: a kind of test frequency method based on DSP digital frequency meter, and specific works process is: digital frequency meter is started working, and starts timer 1,2 and capturing unit 1; Check by reading the comparison match interrupt flag bit of timer 1 the comparison match event whether timer T1 has occurred, if, capturing unit T1 catches the value of this moment timer T2 simultaneously, and judge whether it is that comparison match occurs for the first time, if, timer T2 overflowed to number of times zero clearing, in upper value of catching again timer T2 by capturing unit 1 while once there is comparison match, and timer T2 overflow number of times, calculate the umber of pulse of timer T2 between twice comparison match, thereby calculate frequency, cycle.
As preferred version, when judging whether it is that comparison match occurs for the first time, if not, represent coupling has occurred twice, directly read two values that capturing unit 1 is caught, and timer T2 overflow number of times, thereby calculate frequency, cycle.
As preferred version, described dsp chip can be selected TMS320F2812 chip.
The invention has the beneficial effects as follows: principle is simple, be easy to realize, practical, measuring accuracy is high based on dsp chip digital frequency meter test frequency method.
Brief description of the drawings
For the clearer explanation embodiment of the present invention, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the circuit diagram of method of testing application of the present invention.
Fig. 2 is the structural representation of the inventive method.
Embodiment
Now by reference to the accompanying drawings and specific embodiment, the present invention is further detailed explanation.These accompanying drawings are the schematic diagram of simplification, and basic structure of the present invention is only described in a schematic way, and therefore it only shows the formation relevant with the present invention.These embodiment are interpreted as only need not limiting the scope of the invention for the present invention is described.After having read content of the present invention, those skilled in the art can do various amendments to the present invention, and the variation of these equivalences and modification fall into the protection domain that the present invention limits equally.
One-piece construction schematic diagram of the present invention as shown in Figure 1, based on the digital frequency meter of dsp chip, comprise: dsp chip, power management module, shaping circuit, clock circuit, reset circuit, jtag interface, communication module, described dsp chip is connected with power management module, shaping circuit, clock circuit, reset circuit, jtag interface, communication module respectively, and described dsp chip, clock circuit, reset circuit, jtag interface form DSP minimum system.Dsp chip in minimum system can be selected TMS320F2812 chip, signal processing module is taking dsp chip TMS320F2812 as core, TMS320F2812 contains abundant On-Chip peripheral resource, as ADC, task manager, PIE, house dog, SCI, SPI etc., without extending out ROM, in minimum system, TMS320F2812 coordinates orderly work and the signal processing tasks of the each module of whole system.Reset circuit adopts resistance-capacitance type circuit, carries out hand-reset to facilitate, and JTAG mouth facilitates debugging and the programming of program.
The test frequency method based on DSP digital frequency meter as shown in Figure 2, specific works process is: digital frequency meter is started working, and starts timer 1,2 and capturing unit 1; Check by reading the comparison match interrupt flag bit of timer 1 the comparison match event whether timer T1 has occurred, if, capturing unit T1 catches the value of this moment timer T2 simultaneously, and judge whether it is that comparison match occurs for the first time, if, timer T2 overflowed to number of times zero clearing, in upper value of catching again timer T2 by capturing unit 1 while once there is comparison match, and timer T2 overflow number of times, calculate the umber of pulse of timer T2 between twice comparison match, thereby calculate frequency, cycle.When judging whether it is that comparison match occurs for the first time, if not, represent coupling has occurred twice, directly read two values that capturing unit 1 is caught, and timer T2 overflow number of times, thereby calculate frequency, cycle.
More than show and only described principal character of the present invention and inventive point.Those skilled in the art should understand, and the present invention is not restricted to the described embodiments.Do not departing under the prerequisite of point of the present invention and protection domain, the present invention also has various variations, and these changes and improvements all will fall in the scope of protection of present invention.The scope of protection of present invention is limited by appending claims and equivalent thereof.
Claims (3)
1. the test frequency method based on DSP digital frequency meter, is characterized in that: digital frequency meter is started working, and starts timer 1,2 and capturing unit 1; Check by reading the comparison match interrupt flag bit of timer 1 the comparison match event whether timer T1 has occurred, if, capturing unit T1 catches the value of this moment timer T2 simultaneously, and judge whether it is that comparison match occurs for the first time, if, timer T2 overflowed to number of times zero clearing, in upper value of catching again timer T2 by capturing unit 1 while once there is comparison match, and timer T2 overflow number of times, calculate the umber of pulse of timer T2 between twice comparison match, thereby calculate frequency, cycle.
2. test frequency method according to claim 1, it is characterized in that: when judging whether it is that comparison match occurs for the first time, if not, represent to have occurred twice coupling, directly read two values that capturing unit 1 is caught, and timer T2 overflow number of times, thereby calculate frequency, cycle.
3. test frequency method according to claim 1, is characterized in that: described dsp chip can be selected TMS320F2812 chip.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410164360.5A CN103901270A (en) | 2014-04-20 | 2014-04-20 | Method for testing frequency based on DSP digital frequency meter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410164360.5A CN103901270A (en) | 2014-04-20 | 2014-04-20 | Method for testing frequency based on DSP digital frequency meter |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103901270A true CN103901270A (en) | 2014-07-02 |
Family
ID=50992724
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410164360.5A Pending CN103901270A (en) | 2014-04-20 | 2014-04-20 | Method for testing frequency based on DSP digital frequency meter |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103901270A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103901272A (en) * | 2014-04-20 | 2014-07-02 | 苏州蓝萃电子科技有限公司 | Digital frequency meter |
CN108761201A (en) * | 2018-04-04 | 2018-11-06 | 何晓龙 | bit stream frequency measuring device and method |
CN117007933A (en) * | 2022-04-29 | 2023-11-07 | 象帝先计算技术(重庆)有限公司 | Chip testing method and device, electronic equipment and readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101881796A (en) * | 2010-06-30 | 2010-11-10 | 天津市德力电子仪器有限公司 | Frequency counting module and counting method and application |
KR101052031B1 (en) * | 2011-04-12 | 2011-07-26 | 삼성탈레스 주식회사 | Digital frequency measurement apparatus amending frequncy using field programmable gate array and method thereof |
CN202362380U (en) * | 2011-12-14 | 2012-08-01 | 浙江大学 | Multifunctional high-precision digital frequency meter |
CN103048538A (en) * | 2012-11-29 | 2013-04-17 | 焦作市神盾科技有限公司 | Method for testing collective frequency of radio frequency card and tester for realizing method |
CN103323037A (en) * | 2012-03-23 | 2013-09-25 | 财团法人交大思源基金会 | Digital readout module and digital sensing device |
-
2014
- 2014-04-20 CN CN201410164360.5A patent/CN103901270A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101881796A (en) * | 2010-06-30 | 2010-11-10 | 天津市德力电子仪器有限公司 | Frequency counting module and counting method and application |
KR101052031B1 (en) * | 2011-04-12 | 2011-07-26 | 삼성탈레스 주식회사 | Digital frequency measurement apparatus amending frequncy using field programmable gate array and method thereof |
CN202362380U (en) * | 2011-12-14 | 2012-08-01 | 浙江大学 | Multifunctional high-precision digital frequency meter |
CN103323037A (en) * | 2012-03-23 | 2013-09-25 | 财团法人交大思源基金会 | Digital readout module and digital sensing device |
CN103048538A (en) * | 2012-11-29 | 2013-04-17 | 焦作市神盾科技有限公司 | Method for testing collective frequency of radio frequency card and tester for realizing method |
Non-Patent Citations (2)
Title |
---|
史洪玮等: "基于DSP的数字复合频率计设计", 《计算机与数字工程》 * |
姜鹏等: "基于DSP的简易数字频率计", 《电子产品世界》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103901272A (en) * | 2014-04-20 | 2014-07-02 | 苏州蓝萃电子科技有限公司 | Digital frequency meter |
CN108761201A (en) * | 2018-04-04 | 2018-11-06 | 何晓龙 | bit stream frequency measuring device and method |
CN108761201B (en) * | 2018-04-04 | 2020-05-22 | 何晓龙 | Bit stream frequency measurement device and method |
CN117007933A (en) * | 2022-04-29 | 2023-11-07 | 象帝先计算技术(重庆)有限公司 | Chip testing method and device, electronic equipment and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105486919B (en) | A kind of frequency measuring equipment based on FPGA | |
CN101825481B (en) | Method and device for applying encoder to count | |
CN103837741A (en) | Equal-precision frequency testing system based on FPGA and design method thereof | |
CN103901270A (en) | Method for testing frequency based on DSP digital frequency meter | |
CN102128981A (en) | Method for measuring pulse signal period | |
CN102879641A (en) | Frequency measurement method and system | |
CN106645784A (en) | Method and circuit for measuring rotating speed of rotary machine | |
CN103901272A (en) | Digital frequency meter | |
CN108333425A (en) | A kind of digital frequency meter | |
CN203929885U (en) | Based on FPGA etc. precision frequency testing system | |
CN203276265U (en) | I2C (bus testing device based on USB (universal serial bus) interface | |
CN201811988U (en) | Moldboard trigger digital oscilloscope | |
CN203630222U (en) | Digital frequency meter | |
CN105403725A (en) | Rotating speed measurement method and system, and tachometer | |
CN201804035U (en) | Dynamic monitoring storage oscilloscope | |
CN104637173A (en) | Water meter management system based on wireless network | |
CN203673058U (en) | Electric energy meter field inspecting apparatus | |
CN203658463U (en) | Digital frequency meter based on DSP | |
CN108019201B (en) | Well cementation cement density logger probe detection device | |
CN203551739U (en) | Simple multifunctional logic testing pen | |
CN206450709U (en) | A kind of rotating machinery tachometric survey circuit | |
CN205940463U (en) | Micro displacement measuring method | |
CN204008851U (en) | A kind of digital frequency meter based on dsp chip | |
CN203596123U (en) | Intelligent control physical test simple pendulum tester | |
CN203786240U (en) | Intelligent airplane conducting wire rapid detector based on microprocessor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20140702 |