Invention content
The purpose of the present invention is the division arithmetic between analog voltage provides a solution, two can be calculated
Ratio value and while the device of output digit signals and analog signal operation result between input voltage.
To achieve these goals, the present invention provides a kind of device for seeking ratio value between two input voltages, by ratio
It is worth computing unit, analog result output unit and input voltage sequencing unit composition.
The ratio value computing unit is equipped with molecule voltage input end, denominator voltage input end and digital ratio value output
End.
The core of the ratio value computing unit is parallel A/D converter;The parallel A/D converter has analog voltage
Input terminal, reference voltage input terminal and parallel data output terminal.
The analog voltage input of the parallel A/D converter is the molecule voltage input end of ratio value computing unit, is joined
The denominator voltage input end that voltage input end is ratio value computing unit is examined, parallel data output terminal is ratio value computing unit
Numerical scale value output terminal.
The analog result output unit is equipped with numerical scale value input terminal, scale factor voltage input end and analog voltage
Ratio value output terminal;The numerical scale value input terminal is connected to the ratio value output terminal of ratio value computing unit number.
The core of the analog result output unit is parallel D/A converter;The parallel D/A converter has and line number
According to input terminal, reference voltage input and conversion voltage output end;The parallel data input terminal of the parallel D/A converter is mould
Intend the numerical scale value input terminal of result output unit, reference voltage input is scale factor voltage input end, converts voltage
Output terminal is analog voltage ratio value output terminal.
The input voltage sequencing unit is equipped with the first input voltage input terminal, the second input voltage input terminal, molecule electricity
Press output terminal, denominator voltage output end and size comparison result output terminal.
When the first input voltage amplitude is more than the second input voltage, the denominator voltage of input voltage sequencing unit output
Equal to the first input voltage, molecule voltage is equal to the second input voltage;The first input voltage amplitude is less than the second input electricity
During pressure, the denominator voltage of input voltage sequencing unit output is equal to the second input voltage, and molecule voltage is equal to the first input voltage.
The numerical scale value of the numerical scale value output terminal output and the numerical scale of digital ratio value input terminal input
Value is binary number;When the binary digit digit of numerical scale value output terminal is equal to the binary digit of numerical scale value input terminal
During digit, directly the binary digit of numerical scale value input terminal is sequentially connected with the binary digit of numerical scale value output terminal;
When the binary digit digit of numerical scale value output terminal is more than the binary digit digit of numerical scale value input terminal, then digital ratio
The low level binary digit that example value output terminal has more is not attached to numerical scale value input terminal;By the two of numerical scale value input terminal into
Position processed is sequentially connected to the binary digit of the high-order corresponding digit of numerical scale value output terminal;When numerical scale value output terminal two into
When position digit processed is less than the binary digit digit of numerical scale value input terminal, then numerical scale value input terminal has more low level two into
Position processed is connected to low level, by the binary digit of numerical scale value output terminal and the high-order corresponding digit of numerical scale value input terminal
Binary digit is sequentially connected.
If the first input voltage is UA;Second input voltage is UB;The numerical scale value of numerical scale value output terminal output
For Z, maximum value Zmax;The scale factor voltage of scale factor voltage input end input is UK;Analog voltage ratio value is defeated
The analog voltage ratio value of outlet output is U0;Then
UA>During UB, have
UA<During UB, have
During UA=UB, have
Size comparison result output terminal output size comparison result in the form of switching value.The form of the switching value
It is high and low level.
The parallel A/D converter reference voltage input terminal allows the reference voltage range of input than the first input voltage
It is all wide with the range of the second input voltage.First input voltage and the second input voltage are all positive voltages.
The parallel A/D converter is operated in automatic continuous translative mode, and mode includes setting parallel A/D converter
Automatic continuous translative mode or by parallel A/D converter conversion end signal restarting next time A/D conversion or
Person is parallel A/D converter to be controlled to carry out A/D conversions by the recurrent pulse additionally generated.
The parallel D/A converter is in direct D/A transition status.
The input voltage sequencing unit is made of binary channels two-way analog switch and comparator;The comparator is to first
Input voltage, the second input voltage amplitude size be compared;The size of the size comparison result output terminal output compares
As a result it is controlled by the output of comparator;The channel selecting of the binary channels two-way analog switch is controlled by the output of comparator.
The invention has the advantages that the ratio value between two input voltages is asked for automatically, and simultaneously with digital signal
It is exported with the form of analog signal, the size comparison result between two input voltages is exported in the form of switching value.
Specific embodiment
With reference to embodiment and attached drawing, the present invention is described in further detail, but embodiments of the present invention are unlimited
In this.
A kind of structure diagram for seeking the device of ratio value between two input voltages is as shown in Figure 1, by ratio value computing unit
100th, analog result output unit 200 and input voltage sequencing unit 300 form.
The core of ratio value computing unit 100 is parallel A/D converter, equipped with molecule voltage input end VIN, denominator voltage
Input terminal REF and number ratio value output terminal DB OUT.
The parallel A/D converter has analog voltage input, reference voltage input terminal and parallel data output terminal, work
Make in automatic continuous translative mode.The analog voltage input is the molecule voltage input end of ratio value computing unit 100
VIN, reference voltage input terminal are the denominator voltage input end REF of ratio value computing unit 100, and parallel data output terminal is ratio
It is worth the numerical scale value output terminal DB OUT of computing unit 100.
The embodiment 1 of ratio value computing unit 100 is as shown in Fig. 2, by parallel A/D converter 101, resistance 102, capacitance
103rd, it is formed with door 104.The model of parallel A/D converter 101 is 8 parallel-by-bit A/D converter ADC0841.The simulation of ADC0841
Voltage input end is VIN+, and reference voltage input terminal VREF, 8 bit parallel data output terminals are DB7~DB0.The WR of ADC0841
To start conversion inputs, negative pulse is effective;WR is connected to the output terminal with door 104;With one of door 104 input be connected to by
Resistance 102, capacitance 103 form power on pulse output end, another input be connected to ADC0841 conversion end signal it is defeated
Outlet INTR;When powering on, ADC0841 is started by upper electric pulse and carries out the conversion of first time A/D, after A/D conversion ends, INTR outputs
Negative pulse start ADC0841 and carry out new A/D conversions, in cycles, ADC0841 is operated in automatic continuous modulus of conversion
Formula.
The analog voltage input negative terminal VIN- of ADC0841, output Enable Pin RD, digitally chip select terminal CS, DGND, simulation ground
AGND is connected to publicly, and the power end VCC of ADC0841 is connected to power supply+VDD.The output Enable Pin RD inputs of ADC0841 are low
During level, data output end DB7~DB0 maintains output effective.After ADC0841 conversion ends each time, automatically by result
It is exported from data output end DB7~DB0.
If the voltage for being connected to molecule voltage input end VIN is U1, being connected to the voltage of denominator voltage input end REF is
The digital signal of U2, numerical scale value output terminal DB OUT outputs is Z.In the embodiment 1 of ratio value computing unit 100, Z is number
According to z7~z0 that output terminal DB7~DB0 is exported, maximum value Zmax is 255.Then have
Ratio value i.e. between two input voltages U1, U2 is
The embodiment 2 of ratio value computing unit 100 is as shown in figure 3, by parallel A/D converter 111,555 time base apparatus parts
112nd, resistance 113, resistance 114, capacitance 115 form.The model of parallel A/D converter 111 is 8 parallel-by-bit A/D converters
ADC0841.The embodiment 2 of ratio value computing unit 100 and the embodiment 1 of ratio value computing unit 100 the difference lies in,
Oscillator is formed by 555 time base apparatus parts 112, resistance 113, resistance 114, capacitance 115, the recurrent pulse of oscillator output is connected to
The startup conversion inputs WR of A/D converter 111, each pulse start an A/D conversion, are operated in A/D converter 111
Automatic continuous translative mode.The other parts of the embodiment 2 of ratio value computing unit 100 and the reality of ratio value computing unit 100
Apply that example is identical, the ratio value between two input voltages U1, U2 is
The embodiment 3 of ratio value computing unit 100 is as shown in figure 4, by parallel A/D converter 121,555 time base apparatus parts
122nd, resistance 123, resistance 124, capacitance 125 form.The model of parallel A/D converter 121 is 12 parallel-by-bit A/D converters
AD7492.The analog voltage input of AD7492 be VIN, reference voltage input terminal be REF IN, 12 bit parallel data output terminals
For DB11~DB0.The CONVST of AD7492 starts A/D conversions to start conversion inputs, failing edge.555 time base apparatus parts
122nd, resistance 123, resistance 124, capacitance 125 form oscillator, and the recurrent pulse of oscillator output is connected to A/D converter 121
Startup conversion inputs CONVST, each pulse starts A/D conversion, A/D converter 121 made to be operated in automatically continuously
Translative mode.
The output Enable Pin RD of AD7492, chip select terminal CS, digitally suspend mode selection end PS/FS, DGND, simulation ground
AGND is connected to publicly, and analog power end AVDD, the digital power end DVDD of AD7492 are connected to power supply+VDD.AD7492's
When exporting Enable Pin RD input low levels, data output end DB11~DB0 maintains output effective.When AD7492 is converted each time
After, result is exported from data output end DB11~DB0 automatically.
In the embodiment 3 of ratio value computing unit 100, Z is z11~z0 of data output end DB11~DB0 outputs, most
Big value Zmax is 4095.Then have
Ratio value i.e. between two input voltages U1, U2 is
Parallel A/D converter reference voltage input terminal allows the reference voltage of input in the ratio value computing unit 100
Range is wider than the input voltage U2 ranges for being connected to 100 denominator voltage input end REF of ratio value computing unit.
In addition to translative mode automatic continuous used by A/D converter parallel in above-mentioned 3 embodiments, when it is selected simultaneously
When row A/D converter can be operated in automatic continuous translative mode by setting, preferably convert parallel A/D by set-up mode
Device is operated in automatic continuous translative mode.
The core of analog result output unit 200 is parallel D/A converter, equipped with numerical scale value input terminal DB IN, ratio
Example factor voltage input end VIN3 and analog voltage ratio value output terminal VOUT.The numerical scale value input terminal DB IN connections
To the numerical scale value output terminal DB OUT of ratio value computing unit 100.
The parallel D/A converter has parallel data input terminal, reference voltage input and conversion voltage output end.Institute
The numerical scale value input terminal DB IN that parallel data input terminal is analog result output unit 200 are stated, reference voltage input is
The scale factor voltage input end VIN3 of analog result output unit 200, converts voltage output end as analog result output unit
200 analog voltage ratio value output terminal VOUT.
The embodiment 1 of analog result output unit 200 parallel D/A converter 201 as shown in figure 5, be made of, parallel D/A
The model of converter 201 is 8 parallel-by-bit D/A converter AD5330.The parallel data input terminal of AD5330 be DB7~DB0, benchmark
Voltage input end is VREF, converts voltage output end as VOUT.
The buffer switch control terminal BUF of AD5330, export ratio control terminal GAIN, input register control terminal WR, DAC
Register control terminal LDAC, chip select terminal CS, ground terminal GND are connected to publicly, the clear terminal CLR of AD5330, low power consumption control end
PD, power end VDD are connected to power supply+VDD.The input register control terminal WR and DAC register control terminal LDAC of AD5330 is defeated
When entering low level, in direct D/A transition status, when not considering transfer lag, conversion voltage output end VOUT reflections in real time are simultaneously
The data conversion result of row data input pin DB7~DB0.
If the voltage for being connected to scale factor voltage input end VIN3 is UK, analog voltage ratio value output terminal VOUT outputs
Voltage be U0, the data of parallel data input terminal DB7~DB0 inputs are z7~z0 of Z, i.e., 8, and maximum value Zmax1 is
255, then have
When Zmax1 is equal with Zmax, have
When taking UK equal to 1V, have
Obviously, if analog result output unit 200 uses embodiment 1, ratio value computing unit 100 is using implementation
When example 1 or embodiment 2, Zmax1 is equal with Zmax.If analog result output unit 200 uses embodiment 1, ratio value
During the use embodiment 3 of computing unit 100, to make Zmax1 equal with Zmax, then it should 100 reality of selection percentage value computing unit
The most-significant byte applied in the 12-bit data of the numerical scale value output terminal DB OUT output terminals output of example 3 exports list as analog result
The numerical scale value input terminal DB IN signals of first 200 embodiments 1.
The embodiment 2 of analog result output unit 200 parallel D/A converter 211 as shown in fig. 6, be made of, parallel D/A
The model of converter 211 is 12 parallel-by-bit D/A converter AD5340.The parallel data input terminal of AD5340 be DB11~DB0, base
Quasi- voltage input end is VREF, converts voltage output end as VOUT.
The buffer switch control terminal BUF of AD5340, export ratio control terminal GAIN, input register control terminal WR, DAC
Register control terminal LDAC, chip select terminal CS, ground terminal GND are connected to publicly, the clear terminal CLR of AD5340, low power consumption control end
PD, power end VDD are connected to power supply+VDD.The input register control terminal WR and DAC register control terminal LDAC of AD5340 is defeated
When entering low level, in direct D/A transition status, when not considering transfer lag, conversion voltage output end VOUT reflections in real time are simultaneously
The data conversion result of row data input pin DB11~DB0.
If the voltage for being connected to scale factor voltage input end VIN3 is UK, analog voltage ratio value output terminal VOUT outputs
Voltage be U0, the data of parallel data input terminal DB11~DB0 inputs are the z11~z0, maximum value Zmax1 of Z, i.e., 12
It is 4095, then has
When Zmax1 is equal with Zmax, have
When taking UK equal to 1V, have
Obviously, if analog result output unit 200 uses embodiment 2, ratio value computing unit 100 is using implementation
During example 3, Zmax1 is equal with Zmax.If analog result output unit 200 uses embodiment 2, ratio value computing unit 100
During using embodiment 1 or embodiment 2, to make Zmax1 equal with Zmax, then it should be by 8 of ratio value computing unit 100
Numerical scale Value Data is connected to the most-significant byte in 12 bit digital ratio value input terminals of analog result output unit 200, simulation knot
Low 4 in 12 bit digital ratio value input terminals of fruit output unit 200 are connected to publicly.
In 3 embodiments of the ratio value computing unit 100 and 2 embodiments of analog result output unit 200, number
The data of word ratio value output terminal DB OUT and number ratio value input terminal DB IN are binary data.The molecule voltage
The voltage U2 of the voltage U1 and denominator voltage input end REF of input terminal VIN are positive voltage, and U1 is less than or equal to U2.
The effect of input voltage sequencing unit 300 is to treat two positive input voltages for seeking ratio value, i.e., the first input electricity
The amplitude size of UA, the second input voltage UB is pressed to be compared, using the larger voltage of wherein amplitude as denominator voltage input end
The smaller voltage of the voltage U2 of REF, amplitude is connected to ratio value computing unit as the voltage U1 of molecule voltage input end VIN
100, while comparison result is exported in the form of switching value.
300 embodiment of input voltage sequencing unit is as shown in fig. 7, by binary channels two-way analog switch 301, comparator 302
Composition.Binary channels two-way analog switch 301 select double 4 select one multiway analog switch CD4052.
Comparator 302 is compared the amplitude size of the first input voltage UA, the second input voltage UB, size switch letter
The effect one of number SW1 is to be exported in the form of switching value as comparative result, is acted on second is that being connected to the channel selecting of CD4052
Hold A.The channel selecting end B of CD4052, enabled input terminal INH, digitally VSS, simulation ground VEE are connected to publicly, CD4052
VDD be connected to power supply+VDD.
UA>During UB, size switch signal SW1 output low levels;The output X selection connection X0 of CD4052, output Y selections connect
Logical Y0, i.e. U1=X=X0=UB, U2=Y=Y0=UA;Meet U1<U2.
UA<During UB, size switch signal SW1 output high level;The output X selection connection X1 of CD4052, output Y selections connect
Logical Y1, i.e. U1=X=X1=UA, U2=Y=Y1=UB;Meet U1<U2.
Therefore, work as UA>During UB, have
UA<During UB, have
During UA=UB, no matter SW1 is high level or low level, has U1=U2, so having
Size switch signal SW1 is exported in the form of switching value as comparative result, and the form of switching value is except aforementioned
Outside high and low level, the NPN triode of open collector, open collector can also be increased after size switch signal SW1
The circuit of the diversified forms such as PNP triode, relay obtains the switching value exported in the form of normally opened, normally closed switch etc..
Described device is of less demanding for comparative example value calculating speed, and UA, UB change shallower occasion.
The foregoing is merely the embodiment of the present invention, are not intended to restrict the invention, and those skilled in the art is come
It says, the invention may be variously modified and varied.All within the spirits and principles of the present invention, it is any modification for being made, equivalent
Replace, improve etc., it should be included within scope of the presently claimed invention.