CN104836546A - Comparator signal two-stage filter transmission method and comparator - Google Patents
Comparator signal two-stage filter transmission method and comparator Download PDFInfo
- Publication number
- CN104836546A CN104836546A CN201510126255.7A CN201510126255A CN104836546A CN 104836546 A CN104836546 A CN 104836546A CN 201510126255 A CN201510126255 A CN 201510126255A CN 104836546 A CN104836546 A CN 104836546A
- Authority
- CN
- China
- Prior art keywords
- signal
- comparator
- comparative result
- filter circuit
- port
- 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
Landscapes
- Dc Digital Transmission (AREA)
Abstract
The invention discloses a comparator signal two-stage filter transmission method. The method comprises the following steps of 1) inputting signals to a comparator via a single-chip microcomputer; 2) the inputted signals entering an analog filter circuit and a digital filter circuit, using the analog filter circuit to filter the burr signals in the inputted signals, and using the digital filter circuit to compare after the burr signals of the inputted signals are filtered, and the inputted signals are stable; 3) outputting the comparison result. In addition, the invention also discloses the comparator. Compared with the prior art, and according to the invention, the output efficiency and accuracy of the comparison result can be improved effectively, thereby obtaining the more stable comparison result.
Description
Technical field
The present invention relates to a kind of comparator technology of single-chip microcomputer, be specifically related to a kind of signal two stage filter transmission method and comparator of comparator.
Background technology
Single-chip microcomputer is more common in the market and uses a kind of micro control unit widely, and it plays crucial impetus to the development of the automation equipment of current all trades and professions.In current single-chip microcomputer, comparator is again an one important component part.
At present in the use procedure of comparator, single-chip microcomputer is all directly enter into filter circuit to compare to the signal that comparator inputs, and then exports.Therebetween, make wherein have some burr signals owing to can be subject to the impact of the elements such as port unavoidably in input signal, these burr signals, after entering comparator, can be mingled with in the signal always, until export, thus just can impact the precision of delivery efficiency and comparative result.
Summary of the invention
In order to solve the problems of the technologies described above, the invention provides a kind of signal two stage filter transmission method and the comparator that effectively can eliminate the comparator of burr signal.
In order to achieve the above object, technical scheme of the present invention is as follows: the signal two stage filter transmission method of comparator, and it comprises the following steps:
1) by single-chip microcomputer to comparator input signal;
2) input signal enters in analogue filter circuit and digital filter circuit, is filtered out the burr signal in input signal by analogue filter circuit, and digital filter circuit then waits for that input signal compares after filtration burr signal is also stable again;
3) comparative result is exported.
Method of the present invention includes the two stage filter circuit of analogue filter circuit and digital filter circuit by arranging, burr signal is eliminated by traditional analogue filter circuit, and then compared by current widely used digital filter circuit, finally again comparative structure is exported, just the comparative result not having burr signal can be obtained thus, make comparative result can be more stable, improve delivery efficiency and the precision of comparative result.
Therefore, the present invention compared with prior art, effectively can improve delivery efficiency and the precision of comparative result, thus obtain more stable comparative result.
On the basis of technique scheme, system of the present invention can also do following improvement:
As preferred scheme, above-mentioned comparative result also carries out delay by delay cell before output and exports.
Adopt above-mentioned preferred scheme, the precise degrees of comparative result can be improved by the mode postponing to export.
As preferred scheme, above-mentioned comparative result is also output to IO port forward or backwards.
Adopt above-mentioned preferred scheme, output signal can be used as triggering signal and the feedback signal of external event, thus expand the range of application compared.
As preferred scheme, above-mentioned IO port is the P1.2 port on 8051 single-chip microcomputers.
Adopt above-mentioned preferred scheme, the stability of output can be improved.
As preferred scheme, the signal two stage filter transmission method of above-mentioned comparator also carries out interrupt processing by interrupt control circuit compared result.
Adopt above-mentioned preferred scheme, can make abnormal conditions and processing timely.
Comparator, connect the input port of single-chip microcomputer, this comparator comprises:
Analogue filter circuit, for filtering the input signal of single-chip microcomputer, filters out the burr signal in input signal;
Digital filter circuit, compares after also stablizing for the burr signal in filtered input signal again;
Signal output unit, for export after filtration with relatively after the signal with comparative result.
Comparator of the present invention includes the two stage filter circuit of analogue filter circuit and digital filter circuit by arranging, burr signal is eliminated by traditional analogue filter circuit, and then compared by current widely used digital filter circuit, finally again comparative structure is exported, just the comparative result not having burr signal can be obtained thus, make comparative result can be more stable, improve delivery efficiency and the precision of comparative result.
Therefore, the present invention compared with prior art, effectively can improve delivery efficiency and the precision of comparative result, thus obtain more stable comparative result.
As preferred scheme, above-mentioned comparator also comprises delay cell, carries out time delay, postpone to export the signal with comparative result for compared result before exporting.
Adopt above-mentioned preferred scheme, the precise degrees of comparative result can be improved by the mode postponing to export.
As preferred scheme, above-mentioned comparative result is also output to IO port forward or backwards.
Adopt above-mentioned preferred scheme, output signal can be used as triggering signal and the feedback signal of external event, thus expand the range of application compared.
As preferred scheme, above-mentioned IO port is the P1.2 port on 8051 single-chip microcomputers.
Adopt above-mentioned preferred scheme, the stability of output can be improved.
As preferred scheme, above-mentioned comparator also comprises interrupt control circuit, carries out interrupt processing for compared result.
Adopt above-mentioned preferred scheme, can make abnormal conditions and processing timely.
Accompanying drawing explanation
Fig. 1 is the flow chart of the signal two stage filter transmission method of comparator of the present invention.
Fig. 2 is the structured flowchart of comparator of the present invention.
Embodiment
The preferred embodiment of the present invention is described in detail below in conjunction with accompanying drawing.
In order to reach object of the present invention, as shown in Figure 1-2, in a kind of execution mode of the signal two stage filter transmission method of comparator of the present invention, it comprises the following steps:
S1: by single-chip microcomputer to comparator input signal, namely selects input port, P5.5 input port, P5.4 input port, BGV signal port and DISFIT control port to input by the ADCIN shown in figure;
S2: input signal enters in analogue filter circuit and digital filter circuit (the filter circuit unit 1 namely shown in figure), filtered out the burr signal in input signal by analogue filter circuit, digital filter circuit then waits for that input signal compares after filtration burr signal is also stable again;
S3: export comparative result.
This method includes the two stage filter circuit of analogue filter circuit and digital filter circuit by arranging, burr signal is eliminated by traditional analogue filter circuit, and then compared by current widely used digital filter circuit, finally again comparative structure is exported, just the comparative result not having burr signal can be obtained thus, make comparative result can be more stable, improve delivery efficiency and the precision of comparative result.Therefore, this method compared with prior art, effectively can improve delivery efficiency and the precision of comparative result, thus obtain more stable comparative result.
In order to optimize implementation result of the present invention further, as shown in Figure 1-2, in other execution modes of the signal two stage filter transmission method of comparator of the present invention, on the basis of the above, above-mentioned comparative result also carries out delay output by delay cell 2 before output.Adopt the scheme of this execution mode, the precise degrees of comparative result can be improved by the mode postponing to export.
In order to optimize implementation result of the present invention further, as shown in Figure 1-2, in other execution modes of the signal two stage filter transmission method of comparator of the present invention, on the basis of the above, above-mentioned comparative result is also output to IO port forward or backwards.Adopt the scheme of this execution mode, output signal can be used as triggering signal and the feedback signal of external event, thus expand the range of application compared.For P1.2 port, be such as set to forward and export, if the cathode voltage of comparator is higher than cathode voltage, then P1.2 exports high level, if the cathode voltage of comparator forces down than negative electricity, then and P1.2 output low level; On the contrary, if be set to reverse output, if the cathode voltage of comparator is higher than cathode voltage, then P1.2 output low level, if the cathode voltage of comparator forces down than negative electricity, then P1.2 exports high level.
In order to optimize implementation result of the present invention further, as shown in Figure 1-2, in other execution modes of the signal two stage filter transmission method of comparator of the present invention, on the basis of the above, above-mentioned IO port is the P1.2 port on 8051 single-chip microcomputers.Adopt the scheme of this execution mode, the stability of output can be improved.
In order to optimize implementation result of the present invention further, as shown in Figure 1-2, in other execution modes of the signal two stage filter transmission method of comparator of the present invention, on the basis of the above, the signal two stage filter transmission method of above-mentioned comparator also carries out interrupt processing by interrupt control circuit compared result.Adopt the scheme of this execution mode, can make abnormal conditions and processing timely.
In order to reach object of the present invention, as shown in Figure 2, in a kind of execution mode of comparator of the present invention, it connects the input port of single-chip microcomputer, namely the ADCIN shown in figure selects input port, P5.5 input port, P5.4 input port, BGV signal port and DISFIT control port, this comparator comprises: analog circuit unit 1, it comprises analogue filter circuit and digital filter circuit, analogue filter circuit is used for filtering the input signal of single-chip microcomputer, filter out the burr signal in input signal, digital filter circuit is used for the burr signal in filtered input signal and compares after stablizing again, signal output unit 3, for export after filtration with relatively after the signal with comparative result.
This comparator includes the two stage filter circuit of analogue filter circuit and digital filter circuit by arranging, burr signal is eliminated by traditional analogue filter circuit, and then compared by current widely used digital filter circuit, finally again comparative structure is exported, just the comparative result not having burr signal can be obtained thus, make comparative result can be more stable, improve delivery efficiency and the precision of comparative result.Therefore, this comparator compared with prior art, effectively can improve delivery efficiency and the precision of comparative result, thus obtain more stable comparative result.
In order to optimize implementation result of the present invention further, as shown in Figure 2, in other execution modes of comparator of the present invention, on the basis of the above, above-mentioned comparator also comprises delay cell 2, carry out time delay before exporting for compared result, postpone to export the signal with comparative result.Adopt the scheme of this execution mode, the precise degrees of comparative result can be improved by the mode postponing to export.
In order to optimize implementation result of the present invention further, as shown in Figure 2, in other execution modes of comparator of the present invention, on the basis of the above, above-mentioned comparative result is also output to IO port forward or backwards.Adopt the scheme of this execution mode, output signal can be used as triggering signal and the feedback signal of external event, thus expand the range of application compared.
In order to optimize implementation result of the present invention further, as shown in Figure 2, in other execution modes of comparator of the present invention, on the basis of the above, above-mentioned IO port is the P1.2 port on 8051 single-chip microcomputers.Adopt the scheme of this execution mode, the stability of output can be improved.
In order to optimize implementation result of the present invention further, as shown in Figure 2, in other execution modes of comparator of the present invention, on the basis of the above, above-mentioned comparator also comprises interrupt control circuit 4, carries out interrupt processing for compared result.Adopt the scheme of this execution mode, can make abnormal conditions and processing timely.
Above-described is only the preferred embodiment of the present invention, it should be pointed out that for the person of ordinary skill of the art, and without departing from the concept of the premise of the invention, can also make some distortion and improvement, these all belong to protection scope of the present invention.
Claims (10)
1. the signal two stage filter transmission method of comparator, is characterized in that, comprise the following steps:
1) by single-chip microcomputer to comparator input signal;
2) described input signal enters in analogue filter circuit and digital filter circuit, filter out the burr signal in described input signal by described analogue filter circuit, described digital filter circuit then waits for that described input signal compares after the described burr signal of filtration is also stable again;
3) comparative result is exported.
2. the signal two stage filter transmission method of comparator according to claim 1, is characterized in that, described comparative result also carries out delay by delay cell before output and exports.
3. the signal two stage filter transmission method of comparator according to claim 1 and 2, it is characterized in that, described comparative result is also output to IO port forward or backwards.
4. the signal two stage filter transmission method of comparator according to claim 3, is characterized in that, described IO port is the P1.2 port on 8051 single-chip microcomputers.
5. the signal two stage filter transmission method of comparator according to claim 1 and 2, is characterized in that, also carry out interrupt processing by interrupt control circuit compared result.
6. comparator, connects the input port of single-chip microcomputer, it is characterized in that, comprising:
Analogue filter circuit, for filtering the input signal of single-chip microcomputer, filters out the burr signal in described input signal;
Digital filter circuit, compares after also stablizing for the described burr signal in the described input signal of filtration again;
Signal output unit, for export after filtration with relatively after the signal with comparative result.
7. comparator according to claim 6, is characterized in that, also comprises delay cell, before exporting described comparative result, carry out time delay, postpones the signal with comparative result described in exporting.
8. the comparator according to claim 6 or 7, is characterized in that, described comparative result is also output to IO port forward or backwards.
9. comparator according to claim 8, is characterized in that, described IO port is the P1.2 port on 8051 single-chip microcomputers.
10. the comparator according to claim 6 or 7, is characterized in that, also comprises interrupt control circuit, for carrying out interrupt processing to described comparative result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510126255.7A CN104836546A (en) | 2015-03-20 | 2015-03-20 | Comparator signal two-stage filter transmission method and comparator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510126255.7A CN104836546A (en) | 2015-03-20 | 2015-03-20 | Comparator signal two-stage filter transmission method and comparator |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104836546A true CN104836546A (en) | 2015-08-12 |
Family
ID=53814222
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510126255.7A Pending CN104836546A (en) | 2015-03-20 | 2015-03-20 | Comparator signal two-stage filter transmission method and comparator |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104836546A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060092058A1 (en) * | 2004-11-04 | 2006-05-04 | Slavin Keith R | Calibration system and method for a linearity corrector using filter products |
CN101267194A (en) * | 2008-04-18 | 2008-09-17 | 启攀微电子(上海)有限公司 | A burr judgement and elimination circuit |
CN102195619A (en) * | 2010-03-02 | 2011-09-21 | 国民技术股份有限公司 | Method and circuit for detecting and eliminating signal glitch |
CN103218643A (en) * | 2013-05-08 | 2013-07-24 | 岳流锋 | Baseband processing method of electronic tag reader |
CN103632433A (en) * | 2013-12-23 | 2014-03-12 | 尤新革 | Multispectral image acquisition and processing method for contact image sensor |
-
2015
- 2015-03-20 CN CN201510126255.7A patent/CN104836546A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060092058A1 (en) * | 2004-11-04 | 2006-05-04 | Slavin Keith R | Calibration system and method for a linearity corrector using filter products |
CN101267194A (en) * | 2008-04-18 | 2008-09-17 | 启攀微电子(上海)有限公司 | A burr judgement and elimination circuit |
CN102195619A (en) * | 2010-03-02 | 2011-09-21 | 国民技术股份有限公司 | Method and circuit for detecting and eliminating signal glitch |
CN103218643A (en) * | 2013-05-08 | 2013-07-24 | 岳流锋 | Baseband processing method of electronic tag reader |
CN103632433A (en) * | 2013-12-23 | 2014-03-12 | 尤新革 | Multispectral image acquisition and processing method for contact image sensor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108445870B (en) | Insulation monitoring circuit of motor controller | |
CN103916012B (en) | A kind of essential safety source conversion equipment | |
CN204694824U (en) | Variable-frequency motor intelligent test device | |
CN104836546A (en) | Comparator signal two-stage filter transmission method and comparator | |
CN107544652A (en) | A kind of server PS U power supplys undervoltage protection and guard method | |
CN204556811U (en) | The shunt signal simulator that a kind of USB of support powers | |
CN203561908U (en) | Numerical control direct current source | |
CN200994060Y (en) | PFC overcurrent protection circuit and air conditioner with same | |
CN104811181A (en) | Current-to-voltage conversion circuit with input bias and active power filtering effects and current-to-voltage conversion method | |
CN105282653A (en) | Audio-insertion automatic wake-up apparatus and audio-insertion automatic wake-up method | |
CN204575732U (en) | A kind of electrokinetic cell voltage sampling circuit | |
CN204559542U (en) | A kind of current-to-voltage converting circuit with inputting biased and active power filtering | |
CN202840964U (en) | Intelligent switch power energy efficiency control circuit | |
CN203705513U (en) | Hall sensor output signal processing circuit | |
CN203522156U (en) | Phase current balance protection circuit of automobile frequency converter | |
CN203261057U (en) | Novel numerical control charger | |
CN204697020U (en) | A kind of dual output constant current-supplying circuit for preamplifier | |
CN102832893B (en) | D-type power amplifier | |
CN204906330U (en) | Filter module based on sensor signal | |
CN203574635U (en) | Signal conversion equipment | |
CN204517686U (en) | Voltage stabilizing full-wave rectifying circuit | |
CN202978885U (en) | Anti-interference circuit | |
CN202282766U (en) | Filter circuit based on filter | |
CN203191431U (en) | Direct-current component sampling circuit of photovoltaic inverter | |
CN209541776U (en) | A kind of sensor front end signal processing circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: Zilang Road, Chongchuan District 226004 Jiangsu city of Nantong province No. 28 Building 5 layer 1-4 Applicant after: Jiangsu Guoxin Technology Co., Ltd. Address before: 226004 Jiangsu Province, Nantong City Chongchuan District Chongchuan Road No. 58, building 3, floor 4 Applicant before: Nantong Guo Xin Microtronics A/S |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150812 |