Analog-to-digital conversion circuit
Technical field
The invention relates to a kind of change-over circuit, refer in particular to a kind of analog-to-digital conversion circuit.
Background technology
Now, microcomputer system has possessed the ability of rapid computations, storage data, and in current Mechatronic Systems, the made controller (controller) of microcomputer replaces the controlling organization of old times Purely mechanical or electromechanics formula already.The patterned signal of microcomputer inside, is all digital signal, i.e. usual so-called logical zero or " 1 ", and logical zero represents electronegative potential, and be 0 volt in microcomputer system usually, logical one represents high potential, usually in microcomputer system, is 5 volts.But in the physical phenomenon of occurring in nature, continuous print input signal is presented often after giving quantification, if therefore carry out computing for being imported in microcomputer by the variable quantity of external physical quantity, or will by microcomputer output command drive unit time, just need the process being carried out by signal changing.
The voltage generally measured or electric current etc. be signal continuously, can be referred to as input signal.Device input signal being converted to digital signal then calls adc (analogtodigitalconverter, ADC).In simulation in the switch technology of digital signal, there is various not circuit framework to finish the work, be respectively: (1) single-slope ADC (SingleSlopeIntegratingA/DConverter) (2) two slope ADC (DoubleSlopeIntegratingA/DConverter).
In analog-digital converter, all have an integrating circuit, as shown in Figure 1, input signal Iin carries out integration via the integrating circuit comprising electric capacity C and operational amplifier 12, so can produce an integration signal at the output D of operational amplifier 12, this integration signal is a triangular wave signal as shown in Figure 2.Comparator 14 compares integration signal and compares signal with a reference signal Vref to produce one.Counter 16 couples the output of comparator 14 with count ratio comparatively signal, to represent counting triangular wave signal, so can produce digital signal, compare signal and more reset signal RST to reset integrating circuit as one, to produce next integration signal, namely produce next triangular wave signal.
From the above, comparator 14 often compare integration signal produce with reference signal one compare signal after, just must reset integrating circuit, to produce next integration signal.So with one 12 analog-digital converters, counter 16 will count 4096 times, so integrating circuit just must be reset 4096 times.Known integrating circuit is when resetting, to produce nonlinearity erron (IntegralNon-Linearity, INL), and nonlinearity erron can be accumulated, therefore, the number of times that this nonlinearity erron can be reset along with integrating circuit increases and increases, and so then can reduce the accuracy of analog-digital converter.Therefore, that how to reduce nonlinear effect is produced as the large important topic developing analog-digital converter now.
Therefore, namely the present invention is proposing a kind of analog-to-digital conversion circuit for the problems referred to above, it can reduce the number of times that integrating circuit is reset, and reduces nonlinear effect, to solve the problem.
Summary of the invention
The object of the present invention is to provide a kind of analog-to-digital conversion circuit, it sequentially compares integration signal and plural reference signal by comparator, and produce complex ratio comparatively signal, first counting circuit counts those and compares signal and produce a replacement signal to reset integrating circuit, because integrating circuit is after comparator generation complex ratio comparatively signal, is just reset once, so can reduces the number of times that integrating circuit is reset, and reduce nonlinear effect, to improve the accuracy of analog-to-digital conversion circuit.
To achieve the above object, the present invention is a kind of analog-to-digital conversion circuit, and it includes:
One integrating circuit, integration one input signal is to produce an integration signal;
One reference signal produces circuit, sequentially produces a plurality of reference signal;
One comparator, receives this integration signal and those reference signal, and sequentially compares this integration signal and those reference signal, a plurality ofly compares signal sequentially to produce; And
One first counting circuit, receives those and compares signal, and counts those and compare signal, resets this integrating circuit and this first counting circuit to produce a replacement signal.
In the present invention, wherein this reference signal generation circuit more comprises:
One bleeder circuit, receives a reference voltage, and produces those reference signal; And
One switch module, couples between this bleeder circuit and this comparator, and sequentially to transmit those reference signal to this comparator, this switch module is controlled by this first counting circuit.
In the present invention, wherein this bleeder circuit comprises a plurality of resistance, and those resistance are connected mutually.
In the present invention, wherein this integrating circuit more comprises:
One operational amplifier, receives this input signal;
One electric capacity, is parallel to this operational amplifier, to produce this integration signal;
One first discharge switch, couple between one end of this electric capacity and one first discharge end, this first discharge switch is controlled by this first counting circuit; And
One second discharge switch, couple between the other end of this electric capacity and one second discharge end, this second discharge switch is controlled by this first counting circuit.
In the present invention, wherein this integration signal is a triangular wave signal.
In the present invention, wherein this comparator is a hysteresis comparator.
In the present invention, wherein this first counting circuit comprises:
One counter, counts those and compares signal, and produce a counting signal; And
One logical circuit, produces this replacement signal according to this counting signal.
In the present invention, wherein this counter more comprises:
A plurality of flip-flop, it is connected mutually, compares signal to count those and produces this counting signal.
In the present invention, it more comprises:
One second counting circuit, couples this first counting circuit to count this replacement signal, to produce a counting signal; And
One latch circuit, those receiving this first counting circuit and this second counting circuit count signal, to produce a bolt-lock signal.
The beneficial effect that the present invention has: the integrating circuit of analog-to-digital conversion circuit of the present invention produces after those compare signal at comparator, just be reset once, so can reduce the number of times that integrating circuit is reset, to reduce the nonlinearity erron of integrating circuit, and improve the accuracy of analog-to-digital conversion circuit.
Accompanying drawing explanation
Fig. 1 is the circuit diagram of the integrating circuit of prior art;
Fig. 2 is the oscillogram of the integrating circuit of prior art;
Fig. 3 is the circuit diagram of a preferred embodiment of analog-to-digital conversion circuit of the present invention; And
Fig. 4 is the oscillogram of a preferred embodiment of analog-to-digital conversion circuit of the present invention.
[figure number is to as directed]
C electric capacity Iin input signal
RST resets signal V
cmifirst discharge end
V
cmosecond discharge end V
refreference signal
V
rEFPreference voltage V
rEFNwith reference to level
12 operational amplifier 14 comparators
16 counter 20 integrating circuit
22 operational amplifier 24 electric capacity
26 first discharge switch 28 second discharge switches
30 reference signal produce circuit 32 bleeder circuit
34 switch module 40 comparators
50 first counting circuit 52 flip-flops
54 logical circuit 61 second counting circuits
63 latch circuit 65 integration signals
The little triangular wave signal of 67 reference signal 69
Embodiment
For making to have a better understanding and awareness architectural feature of the present invention and effect of reaching, coordinating detailed description in order to preferred embodiment and accompanying drawing, being described as follows:
First, refer to Fig. 3 and Fig. 4, it is circuit diagram and the oscillogram of a preferred embodiment of analog-to-digital conversion circuit of the present invention.As shown in the figure, analog-to-digital conversion circuit of the present invention comprises integrating circuit 20, reference signal generation circuit 30, comparator 40 and one first counting circuit 50.Integrating circuit 20 receives an input signal Iin and integration input signal Iin and the integration signal 65 produced as shown in Figure 4.In this embodiment, input signal Iin is a current signal.Reference signal produces circuit 30 and sequentially produces a plurality of reference signal.The positive input terminal of comparator 40 and negative input end receive integration signal 65 that integrating circuit 20 produces and reference signal respectively and produce those reference signal that circuit 30 produces, and sequentially compare integration signal 65 and those reference signal, to produce complex ratio comparatively signal.One preferred embodiment of the comparator 40 of analog-to-digital conversion circuit of the present invention is a hysteresis comparator.
Consult Fig. 3 again, the first counting circuit 50 couples the output of comparator 40, compares signal and counts those compare signal with those receiving that comparator 40 produces.When first counting circuit 50 counts number of times to threshold value that those compare signal, namely produce one and reset signal RST and reset integrating circuit 20.Integrating circuit 20 compares integration signal 65 at comparator 40 to produce after those compare signal with those reference signal, just reset once by the first counting circuit 50, so namely can reduce the number of times that integrating circuit 20 is reset, so that the nonlinearity erron of integrating circuit 20 can be lowered, and improve the accuracy of analog-to-digital conversion circuit.
In addition, the integrating circuit 20 of analog-to-digital conversion circuit of the present invention more comprises operational amplifier 22, electric capacity 24,1 first discharge switch 26 and one second discharge switch 28.The input of operational amplifier 22 receives input signal Iin.Electric capacity 24 is parallel to operational amplifier 22 to produce integration signal 65.When input signal Iin is input into integrating circuit 20, integrating circuit 20 namely can integration input signal Iin and produce integration signal 65.As shown in Figure 4, the integration signal 65 of analog-to-digital conversion circuit of the present invention is a triangular wave signal.One end of first discharge switch 26 coupling capacitance 24 and one first discharge end V
cmibetween, and be controlled by the replacement signal RST of the first counting circuit 50.The other end of the second discharge switch 28 coupling capacitance 24 and one second discharge end V
cmobetween, and be also controlled by the replacement signal RST of the first counting circuit 50.First resets signal RST is used for conducting first discharge switch 26 and the second discharge switch 28, resets integrating circuit 20 to discharge to electric capacity 22.So, integrating circuit 20 is can integration input signal Iin and produce next integration signal 65 again, namely produces next triangular wave signal.
Consult Fig. 3 again, the raw circuit 30 of reference bit signal of analog-to-digital conversion circuit of the present invention more comprises bleeder circuit 32 and a switch module 34.The two ends of bleeder circuit 32 receive a reference voltage V respectively
rEFPwith one with reference to level V
rEFN, bleeder circuit 32 comprises a plurality of resistance, and those resistance are connected mutually with this reference voltage of dividing potential drop V
rEFP, to produce the plural reference signal 67 of different levels as shown in Figure 4, the level of those reference signal 67 improves gradually.Switch module 34 couples between bleeder circuit 32 and comparator 40, sequentially to transmit those reference signal 67 to comparators 40 of different level, compares integration signal 65 and those reference signal 67, and produce complex ratio comparatively signal for comparator 40.
Once when the level of integration signal 65 produces the level of the reference signal 67 that circuit 30 provides higher than reference signal, namely switch module 34 can switch and transmit next reference signal 67 to comparator 40 with more high levle.Because the level of integration signal 65 also can improve gradually, so comparator 40 compares integration signal 65 can produce complex ratio comparatively signal with those reference signal 67.Reference signal produces circuit 30 and provides reference signal 67 to the comparator 40 of different level and compare with integration signal 65, thus comparator 40 produce each compare signal and be namely equivalent to a little triangular wave signal 69.Therefore, the first counting circuit 50 counts those quantity comparing signal, is namely equivalent to the quantity counting triangular wave signal 69.Switch module 34 of the present invention be controlled by the first counting circuit 50, first counting circuit 50 often count one compare signal namely can control switch module 34, to transmit reference signal 67 to the comparator 40 of different level.Switch module 30 of the present invention includes plural switch, and is respectively coupled between those resistance of bleeder circuit 32 and comparator 40, to provide reference signal 67 to the comparator 40 of different level.Those switches are controlled by the first counting circuit 50.Consult Fig. 3 again, the first counting circuit 50 of analog-to-digital conversion circuit of the present invention comprises a counter and a logical circuit 54.In this embodiment, counter includes plural flip-flop 52 and mutually connects, and those flip-flops 52 are D type flip-flop 52.One input D of each flip-flop 52 couples mutually with an inverse output terminal QB, and a frequency input CK of first flip-flop of those flip-flops 52 is the outputs coupling comparator 40, compares signal to receive.In addition, except last flip-flop of those flip-flops 52, an output Q of each flip-flop 52 is the frequency input CK coupling next flip-flop 52, and is in series.Namely the output Q of each flip-flop 52 exports counting signal B0 ~ B3 respectively, and those counting signals B0 ~ B3 is binary system.Above-mentioned counter is used for the quantity of count ratio compared with signal, is namely equivalent to the quantity counting triangular wave signal 69, and those counting signals of corresponding output B0 ~ B3.Those counting signals B0 ~ B3 can be used for the control signal as control switch module 34, with those switches of control switch module 34, to transmit reference signal 67 to the comparator 40 of different level.The counter of this embodiment utilizes plural flip-flop 52 to realize, but the counter not limiting to the first counting circuit 50 of the present invention only can be made up of flip-flop 52, and the known counter of these those skilled in the art also can be made up of other common circuit.
Logical circuit 54 couples counter to receive those counting signals B0 ~ B3, and learns the quantity of triangular wave signal 69 according to those counting signal B0 ~ B3.When logical circuit 54 learns that the quantity of triangular wave signal 69 reaches threshold value according to those counting signal B0 ~ B3, namely produce and reset signal RST and reset integrating circuit 20, produce next new integration signal 65 with integration input signal Iin again, namely produce next large triangular wave signal.The threshold value of this embodiment is for being pre-set in logical circuit 54, and its value can change according to user demand.In addition, reset the counter that signal RST also can reset the first counting circuit 50, in this embodiment, namely reset those flip-flops 52 by replacement signal RST, the complex ratio comparatively signal exported with count comparator 40 again.
As shown in the above description, first counting circuit 50 is the quantity namely counting little triangular wave signal 69 for counting those quantity comparing signal, and reset integration signal 65 when the quantity of relatively signal reaches threshold value, to produce next integration signal, and reset counting signal B0 ~ B3.So, each integration signal 65 is the little triangular wave signal 69 being equivalent to include fixed qty.
Consult Fig. 3 again, the present invention more comprises one second counting circuit 61 and a latch circuit 63.Second counting circuit 61 receives the replacement signal RST also counting replacement signal RST that the first counting circuit 50 produces, and produces a counting signal and be sent to latch circuit 63.The counting signal that second counting circuit 61 produces is the quantity representing integration signal 65, namely represents the quantity of the large triangular wave signal that integrating circuit 20 produces.Latch circuit 63 more couples the first counting circuit 50 to receive those counting signals B0 ~ B3, latch circuit 63 like this, according to those counting signal B0 ~ B3 and counting signals of the second counting circuit 61 of the first counting circuit 50, can learn the quantity of the little triangular wave signal 69 that the quantity of integration signal 65 and integration signal 65 comprise.In other words, the total quantity of little triangular wave signal 69 is the product of the quantity of the little triangular wave signal 69 that the quantity of integration signal 65 and each integration signal 65 comprise.Latch circuit 63 those counting signal B0 ~ B3 according to the first counting circuit 50 and the counting signal of the second counting circuit 61, and produce a bolt-lock signal, to be supplied to subsequent conditioning circuit.The utilization meeting that bolt-lock signal is supplied to subsequent conditioning circuit is different along with different circuit design, and is not technical characteristics of the present invention, so then do not describe in detail at this.
Use analog-to-digital conversion circuit of the present invention to be to reduce the number of times that integrating circuit 20 is reset, and reduce nonlinear effect, and improve the accuracy of analog-to-digital conversion circuit.For example, with one 12 analog-to-digital conversion circuits, it must produce 4096 little triangular wave signal.Therefore, the integrating circuit of general prior art analog-to-digital conversion circuit must be reset 4096 times.But, integrating circuit 20 of the present invention does not need to be reset 4096 times, if reference signal of the present invention produces the reference signal 67 that circuit 30 can provide 16 different levels, namely an integration signal 65 can include 16 little triangular wave signal 69 relatively, so the first counting circuit 50 is 4 counting circuits, bamboo product second counting circuit 61 is 8 counting circuits, and for counting the quantity of integration signal 65, so can reach the function of 12.In other words, integrating circuit 20 of the present invention only needs to be reset 256 times, so reset number of times and only have 1/16th of prior art.So, effectively can reduce the number of times that integrating circuit 20 is reset, and reduce nonlinear effect, and improve the accuracy of analog-to-digital conversion circuit, above-mentioned first counting circuit 50 is 4 counting circuits and the second counting circuit 61 is that 8 counting circuits are only a preferred embodiment of the present invention, and the first counting circuit 50 and the second counting circuit 61 can design according to user demand not limit to the above embodiments.
In sum, analog-to-digital conversion circuit of the present invention comprises integrating circuit, reference signal produces circuit, comparator and the first counting circuit, integrating circuit integration input signal is to produce integration signal, reference signal produces circuit and sequentially produces plural reference signal, the integration signal that comparator reception integrating circuit produces and reference signal produce those reference signal that circuit produces, and sequentially compare integration signal and those reference signal, to produce complex ratio comparatively signal, first counting circuit counts those and compares signal, integrating circuit is reset to produce replacement signal, so, minimizing can be reached and reset the number of times of integrating circuit to reduce nonlinear effect, and improve the accuracy of analog-to-digital conversion circuit.
In sum, be only a preferred embodiment of the present invention, not be used for limiting scope of the invention process, all equalizations of doing according to shape, structure, feature and the spirit described in the claims in the present invention scope change and modify, and all should be included in right of the present invention.