CN109491640A - A kind of temperature-detecting device and temperature checking method - Google Patents
A kind of temperature-detecting device and temperature checking method Download PDFInfo
- Publication number
- CN109491640A CN109491640A CN201910057047.4A CN201910057047A CN109491640A CN 109491640 A CN109491640 A CN 109491640A CN 201910057047 A CN201910057047 A CN 201910057047A CN 109491640 A CN109491640 A CN 109491640A
- Authority
- CN
- China
- Prior art keywords
- biasing
- converted
- unsigned number
- temperature
- value
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
- G06F7/50—Adding; Subtracting
- G06F7/505—Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination
- G06F7/509—Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination for multiple operands, e.g. digital integrators
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01K—MEASURING TEMPERATURE; MEASURING QUANTITY OF HEAT; THERMALLY-SENSITIVE ELEMENTS NOT OTHERWISE PROVIDED FOR
- G01K13/00—Thermometers specially adapted for specific purposes
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Pure & Applied Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Mathematical Optimization (AREA)
- General Engineering & Computer Science (AREA)
- Gyroscopes (AREA)
- Indication And Recording Devices For Special Purposes And Tariff Metering Devices (AREA)
Abstract
This application discloses a kind of temperature-detecting device and temperature checking methods, wherein, the unsigned number to be converted for the expression temperature information that the temperature-detecting device will acquire, pass through the first biasing remove module, second biasing remove module, the processing of deviation computing module and complement code conversion module, realize the purpose for the temperature information for indicating the complement of two's two's complement form that unsigned number to be converted is converted to the information for indicating true temperature, and in view of the conversion of SAR-DAC has linearity error, pass through the first biasing remove module, second biasing remove module has carried out biasing twice to unsigned number to be converted and has removed, and the unsigned number drift correction value to be converted after biasing removal twice is determined by deviation computing module, complement code conversion module is allowed to eliminate the linearity error in complement code conversion process, it is accurate to carry out The accurate transformation for the temperature information that unsigned number to be converted is indicated to complement of two's two's complement form.
Description
Technical field
This application involves temperature detection technical fields, more specifically to a kind of temperature-detecting device and temperature detection
Method.
Background technique
In Application of integrated circuit field, it usually needs detected to the real time temperature of chip, for user feedback chip
Real time temperature or according to the real time temperature of chip carry out chip temperature adjust so that chip is in good working order
Under.
In the prior art when carrying out temperature detection to chip, SAR-ADC (successive approximation register pattern number is usually utilized
Converter) to carry out analog-to-digital conversion to the analog signal that temperature sensor obtains.This is because in temperature detection application scenarios,
Usually not high speed and high-precision requirement, therefore, carrying out analog-to-digital conversion using the SAR-ADC of low-power consumption is general way.
But it is found in actual application process, since the parameter for indicating temperature information of SAR-ADC output is unsigned number, such as
Fruit needs further to show the unsigned number, needs upper layer software (applications) separately to decode, unsigned number has been converted to
Symbolic number, consequently facilitating user reads or other application is called, and increased decoding process makes the code of upper layer software (applications) more
It is complicated.
Summary of the invention
In order to solve the above technical problems, this application provides a kind of temperature-detecting device and temperature checking method, to realize
The purpose for the temperature information that complement of two's two's complement form indicates is obtained, so that upper layer software (applications) is not necessarily to complement of two's two's complement form table
The temperature information shown separately decodes, and simplifies the code of upper layer software (applications).
To realize the above-mentioned technical purpose, the embodiment of the present application provides following technical solution:
A kind of temperature-detecting device, comprising: the first biasing remove module, the second biasing remove module, deviation computing module
With complement code conversion module;Wherein,
The first biasing remove module is used to receive the unsigned number to be converted for indicating temperature information and indicates that first is pre-
If the default unsigned number of temperature;With for carrying out first to the unsigned number to be converted according to the default unsigned number
Secondary biasing removes;First preset temperature is the temperature sensing lower limit value of the temperature-detecting device, described default without symbol
Number is less than 0;
The unsigned number to be converted after the second biasing remove module is used to remove first time biasing carries out the
Secondary biasing removes, to remove a lowest bit position of the unsigned number to be converted after biasing removal for the first time;
The deviation computing module, for determining number locating for the unsigned number to be converted after biasing removal second
It is worth section, and the numerical intervals according to locating for the unsigned number to be converted after second of biasing removal, Xiang Suoshu complement code turn
Change the mold block output bias correction value;
The complement code conversion module, for receive the unsigned number to be converted after second biasing removes, it is described partially
Poor correction value and the first preset value, first preset value is less than 0, and the absolute value of first preset value is equal to described first
The absolute value of preset temperature;With the institute for being used to, according to the drift correction value and the first preset value, bias after removing second
It states unsigned number to be converted and carries out complement code conversion, to obtain the temperature information indicated in the form of the complement of two's two's complement.
Optionally, the first biasing remove module and complement code conversion module are adder.
Optionally, the first biasing remove module is according to the default unsigned number, to the unsigned number to be converted
It carries out biasing removal for the first time to be specifically used for, subtracts the default unsigned number using the unsigned number to be converted, to obtain
Unsigned number to be converted after biasing removes for the first time.
Optionally, the unsigned number to be converted after the deviation computing module removes first time biasing carries out second
Secondary biasing removes, and is specifically used with removing a lowest bit position of the unsigned number to be converted after biasing removal for the first time
In the unsigned number to be converted after removing to first time biasing carries out the operation divided by 2, is removed with removing biasing for the first time
One lowest bit position of the unsigned number to be converted afterwards.
Optionally, the complement code conversion module moves second of biasing according to the drift correction value and the first preset value
The unsigned number to be converted after removing carries out complement code conversion, is specifically used by obtaining the temperature information indicated in the form of the complement of two's two's complement
In the unsigned number to be converted after being removed using second of biasing is subtracted the drift correction value and described first and preset
Value, to obtain the temperature information indicated in the form of the complement of two's two's complement.
Optionally, the deviation computing module includes:
Whether judging unit, the unsigned number to be converted for judging that second biases after removing are less than first interval
Value, if it is, determining that the unsigned number to be converted after second of biasing removal is in the first numerical intervals;
If not, whether the unsigned number to be converted after second of biasing of judgement removes is less than second interval value, if
It is that the unsigned number to be converted after then determining second of biasing removal is in second value section, if it is not, then determining second
The unsigned number to be converted after secondary biasing removes is in third value section;
Amending unit, for being in the first numerical intervals in the unsigned number to be converted after second of biasing removes
When, output 0 is used as the drift correction value;
When the unsigned number to be converted after second of biasing removes is in second value section, 1 conduct is exported
The drift correction value;
When the unsigned number to be converted after second of biasing removes is in third value section, 2 conducts are exported
The drift correction value.
A kind of temperature checking method is applied to temperature-detecting device described in any of the above embodiments, the temperature checking method
Include:
It receives the unsigned number to be converted for indicating temperature information and indicates the default unsigned number of the first preset temperature;
According to the default unsigned number, biasing for the first time is carried out to the unsigned number to be converted and is removed;Described first
Preset temperature is the temperature sensing lower limit value of the temperature-detecting device, and the default unsigned number is less than 0;
The unsigned number to be converted after removing to first time biasing carries out second of biasing and removes, to remove for the first time
One lowest bit position of the unsigned number to be converted after biasing removal;
Determine numerical intervals locating for the unsigned number to be converted after second of biasing removes, and partially according to second
Set numerical intervals locating for the unsigned number to be converted after removing, Xiang Suoshu complement code conversion module output bias correction value;
The unsigned number to be converted according to the drift correction value and the first preset value, after being removed to second of biasing
Complement code conversion is carried out, to obtain the temperature information indicated in the form of the complement of two's two's complement;First preset value is less than 0, and described
The absolute value of one preset value is equal to the absolute value of first preset temperature.
Optionally, numerical intervals locating for second of unsigned number to be converted biased after removing of the determination, and
Numerical intervals locating for the unsigned number to be converted after being removed according to second of biasing, the output of Xiang Suoshu complement code conversion module
Drift correction value includes:
Whether the unsigned number to be converted after second of biasing of judgement removes is less than first interval value, if it is,
Determine that the unsigned number to be converted after second of biasing removes is in the first numerical intervals;
If not, whether the unsigned number to be converted after second of biasing of judgement removes is less than second interval value, if
It is that the unsigned number to be converted after then determining second of biasing removal is in second value section, if it is not, then determining second
The unsigned number to be converted after secondary biasing removes is in third value section;
When the unsigned number to be converted after second of biasing removes is in the first numerical intervals, 0 conduct is exported
The drift correction value;
When the unsigned number to be converted after second of biasing removes is in second value section, 1 conduct is exported
The drift correction value;
When the unsigned number to be converted after second of biasing removes is in third value section, 2 conducts are exported
The drift correction value.
Optionally, described according to the default unsigned number, biasing for the first time is carried out to the unsigned number to be converted and is moved
Except including:
Subtract the default unsigned number using the unsigned number to be converted, with obtain for the first time biasing remove after to
Convert unsigned number.
Optionally, second of biasing of unsigned number progress to be converted after the biasing removal to first time removes,
Include: to remove a lowest bit position of the unsigned number to be converted after biasing removal for the first time
The unsigned number to be converted after removing to first time biasing carries out the operation divided by 2, inclined for the first time to remove
Set a lowest bit position of the unsigned number to be converted after removing.
Optionally, described according to the drift correction value and the first preset value, after being removed to second of biasing described in
It converts unsigned number and carries out complement code conversion, include: to obtain the temperature information indicated in the form of the complement of two's two's complement
The unsigned number to be converted after being removed using second of biasing subtracts the drift correction value and described first
Preset value, to obtain the temperature information indicated in the form of the complement of two's two's complement.
It can be seen from the above technical proposal that the embodiment of the present application provides a kind of temperature-detecting device and temperature detecting method
Method, wherein the unsigned number to be converted for the expression temperature information that the temperature-detecting device will acquire is removed by the first biasing
The processing of module, the second biasing remove module, deviation computing module and complement code conversion module, realizes unsigned number to be converted
The purpose of the temperature information of the complement of two's two's complement form expression for the information for indicating true temperature is converted to, and considers SAR-
The conversion of DAC have linearity error, by first biasing remove module, second biasing remove module to unsigned number to be converted into
The biasing gone twice removes, and has been determined that the unsigned number to be converted after biasing removal twice is inclined by deviation computing module
Poor correction value allows complement code conversion module to eliminate the linearity error in complement code conversion process, accurately carries out to be converted
The accurate transformation for the temperature information that unsigned number is indicated to complement of two's two's complement form.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is the structural schematic diagram for carrying out temperature detection using SAR-ADC in the prior art;
Fig. 2 is a kind of structural schematic diagram for temperature-detecting device that one embodiment of the application provides;
Fig. 3 is the schematic diagram of deviation from linearity present in the unsigned number of SAR-ADC output;
Fig. 4 be the application one embodiment provide for -40-159 DEG C to signal intensity in temperature detection process
Schematic diagram;
Fig. 5 is a kind of structural schematic diagram for temperature-detecting device that another embodiment of the application provides;
Fig. 6 is the schematic diagram for the deviation from linearity present in -40 DEG C -159 DEG C that one embodiment of the application provides;
Fig. 7 is the schematic diagram for the deviation from linearity present in -40 DEG C -159 DEG C that another embodiment of the application provides.
Specific embodiment
As described in background, SAR-ADC (successive approximation register type analog-to-digital conversion is usually utilized in the prior art
Device) to carry out analog-to-digital conversion to the analog signal that temperature sensor obtains.As shown in FIG. 1, FIG. 1 is utilize SAR- in the prior art
ADC carries out the schematic diagram of analog-to-digital conversion, and in Fig. 1, input signal is sine wave signal, indicates the chip temperature that temperature sensor obtains
Spend information;But in actual application, inevitably has after noise source is overlapped with input signal and be input to jointly
In SAR-ADC, SAR-ADC obtains signless unsigned number (digital Code) after analog-to-digital conversion and is exported, that is,
The output signal for saying SAR-ADC is superimposed to input signal and noise source to approach value.
It is found in actual application process, since SAR-ADC output is for indicating that the parameter of temperature information is no symbol
Number needs upper layer software (applications) separately to decode if necessary to further show to the unsigned number, and unsigned number is turned
It is changed to signed number, consequently facilitating user reads or other application is called, and increased decoding process makes the generation of upper layer software (applications)
Code is complex.
In view of this, the embodiment of the present application provides a kind of temperature-detecting device, comprising: the first biasing remove module, the
Two biasing remove modules, deviation computing module and complement code conversion module;Wherein,
The first biasing remove module is used to receive the unsigned number to be converted for indicating temperature information and indicates that first is pre-
If the default unsigned number of temperature;With for carrying out first to the unsigned number to be converted according to the default unsigned number
Secondary biasing removes;First preset temperature is the temperature sensing lower limit value of the temperature-detecting device, described default without symbol
Number is less than 0;
The unsigned number to be converted after the second biasing remove module is used to remove first time biasing carries out the
Secondary biasing removes, to remove a lowest bit position of the unsigned number to be converted after biasing removal for the first time;
The deviation computing module, for determining number locating for the unsigned number to be converted after biasing removal second
It is worth section, and the numerical intervals according to locating for the unsigned number to be converted after second of biasing removal, Xiang Suoshu complement code turn
Change the mold block output bias correction value;
The complement code conversion module, for receive the unsigned number to be converted after second biasing removes, it is described partially
Poor correction value and the first preset value, first preset value is less than 0, and the absolute value of first preset value is equal to described first
The absolute value of preset temperature;With the institute for being used to, according to the drift correction value and the first preset value, bias after removing second
It states unsigned number to be converted and carries out complement code conversion, to obtain the temperature information indicated in the form of the complement of two's two's complement.
The unsigned number to be converted for the expression temperature information that the temperature-detecting device will acquire, is removed by the first biasing
The processing of module, the second biasing remove module, deviation computing module and complement code conversion module, realizes unsigned number to be converted
The purpose of the temperature information of the complement of two's two's complement form expression for the information for indicating true temperature is converted to, and considers SAR-
The conversion of DAC have linearity error, by first biasing remove module, second biasing remove module to unsigned number to be converted into
The biasing gone twice removes, and has been determined that the unsigned number to be converted after biasing removal twice is inclined by deviation computing module
Poor correction value allows complement code conversion module to eliminate the linearity error in complement code conversion process, accurately carries out to be converted
The accurate transformation for the temperature information that unsigned number is indicated to complement of two's two's complement form.
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
The embodiment of the present application provides a kind of temperature-detecting device, as shown in Figure 2, comprising: the first biasing remove module 10,
Second biasing remove module 20, deviation computing module 30 and complement code conversion module 40;Wherein, the first biasing remove module 10
For receiving the unsigned number to be converted for indicating temperature information and the default unsigned number for indicating the first preset temperature;Be used for root
According to the default unsigned number, biasing for the first time is carried out to the unsigned number to be converted and is removed;First preset temperature is
The temperature sensing lower limit value of the temperature-detecting device, the default unsigned number is less than 0;
The unsigned number to be converted after the second biasing remove module 20 is used to remove first time biasing carries out
Second of biasing removes, to remove a lowest bit position of the unsigned number to be converted after first time biasing removes;
The deviation computing module 30 biases locating for the unsigned number to be converted after removing for determining second
Numerical intervals, and the numerical intervals according to locating for the unsigned number to be converted after second of biasing removal, Xiang Suoshu complement code
40 output bias correction value of conversion module;
The complement code conversion module 40, for receiving the unsigned number to be converted after second biasing removes, described
Drift correction value and the first preset value, first preset value is less than 0, and the absolute value of first preset value is equal to described the
The absolute value of one preset temperature;With for according to the drift correction value and the first preset value, after being removed to second of biasing
The unsigned number to be converted carries out complement code conversion, to obtain the temperature information indicated in the form of the complement of two's two's complement.
It should be noted that the unsigned number to be converted for indicating temperature information refers to the output signal of SAR-ADC.
Specifically, with reference to Tables 1 and 2, table 1 is the comparison output valve of 10bit SAR-ADC, and table 2 is 10bit SAR-ADC
Unsigned number output valve.
The output of table 1:10bit SAR_ADC
The signless integer of table 2:10bit SAR_ADC exports
In order to enable the true temperature value that unsigned number to be converted can be indicated to it is close, it is necessary first to which the first biasing moves
Except module 10 is according to the default unsigned number, biasing for the first time is carried out to the unsigned number to be converted and is removed;Then pass through
Second biasing remove module 20 removes a lowest bit position of the unsigned number to be converted after biasing removal for the first time.
In addition, with reference to Fig. 3, due to 0.5 DEG C of each of unsigned number of SAR-ADC output be there are certain deviation,
It is generally acknowledged that being n+0.5+ μ between the digital Code of two conversions, wherein μ is an accumulated error.It is repeatedly approaching in this way
Afterwards, as soon as accumulated error can be higher than the variation of a number Code (0.5 DEG C), one is had when complement code is converted so linearly partially
Difference.Therefore, it is also desirable to which deviation computing module 30 determines number locating for the unsigned number to be converted after second of biasing removal
It is worth section, and the numerical intervals according to locating for the unsigned number to be converted after second of biasing removal, Xiang Suoshu complement code turn
Change the mold 40 output bias correction value of block.
In this way after the unsigned number to be converted after obtaining drift correction value, second of biasing removing, benefit is utilized
The to be converted no symbol of the code conversion module 40 according to the drift correction value and the first preset value, after being removed to second of biasing
Number carries out complement code conversion, to realize the complement of two's two's complement shape that unsigned number to be converted is converted to the information for indicating true temperature
The purpose for the temperature information that formula indicates.And in view of the conversion of SAR-DAC has linearity error, mould is removed by the first biasing
Block 10, second biases remove module 20 and has carried out the removal of biasing twice to unsigned number to be converted, and passes through deviation and calculate
Module 30 has determined the unsigned number drift correction value to be converted after biasing removal twice, and complement code conversion module 40 is existed
The linearity error is eliminated in complement code conversion process, accurately carries out the temperature that unsigned number to be converted is indicated to complement of two's two's complement form
Spend the accurate transformation of information.
Optionally, in one embodiment of the application, the temperature detection range of the temperature-detecting device is -40 DEG C -
159 DEG C, i.e., described first preset temperature is -40 DEG C, and the default unsigned number is -40 DEG C of expression of nothing of SAR-ADC output
Symbolic number.
Of course, in the other embodiments of the application, first preset temperature can also be -30 DEG C or -50 DEG C etc.,
The application is to this and without limitation.
On the basis of the above embodiments, in one embodiment of the application, still referring to Figure 2, first biasing
Remove module 10 and complement code conversion module 40 are adder.
It is since the input of the first biasing remove module 10 is one positive one negative, then practical to bias remove module 10 first
The operation of middle progress is subtraction, and similarly, the practical operation carried out in adder is also subtraction.
That is, the first biasing remove module 10 is according to the default unsigned number, to the unsigned number to be converted into
Row biasing for the first time, which removes, to be specifically used for, and the default unsigned number is subtracted using the unsigned number to be converted, to obtain the
Unsigned number to be converted after primary biasing removal.
The complement code conversion module 40 is according to the drift correction value and the first preset value, after removing to second of biasing
The unsigned number to be converted carries out complement code conversion, is specifically used for by obtaining the temperature information indicated in the form of the complement of two's two's complement, sharp
The unsigned number to be converted after being removed with second of biasing subtracts the drift correction value and first preset value, to obtain
Obtain the temperature information that complement of two's two's complement form indicates.
Optionally, the unsigned number to be converted of 30 pairs of the deviation computing module after biasing removes for the first time carries out the
Secondary biasing removes, and is specifically used with removing a lowest bit position of the unsigned number to be converted after biasing removal for the first time
In the unsigned number to be converted after removing to first time biasing carries out the operation divided by 2, is removed with removing biasing for the first time
One lowest bit position of the unsigned number to be converted afterwards.
With reference to Fig. 4, in Fig. 4, carried out so that the temperature sensing range of the temperature-detecting device is -40 DEG C -159 DEG C as an example
Illustrate, the line segment of label L10 indicates the unsigned number to be converted in Fig. 4, and the line segment expression of label L11 has carried out for the first time partially
Set the unsigned number to be converted after removing, the line segment of label L12 indicate to have carried out to bias for second after removing it is described to
Unsigned number is converted, label L13 indicates the temperature information that the complement of two's two's complement form export after complement code conversion indicates, from
As can be seen that the temperature information that the complement of two's two's complement form of final output indicates can greatly facilitate upper layer software (applications) in Fig. 4
It calls, it is for a user and simple and clear.
On the basis of the above embodiments, in another embodiment of the application, as shown in figure 5, the deviation calculates
Module 30 includes:
Judging unit 31, for judging the unsigned number to be converted after second of biasing removes whether less than the firstth area
Between be worth, if it is, determining that the unsigned number to be converted after second biasing removes is in the first numerical intervals;
If not, whether the unsigned number to be converted after second of biasing of judgement removes is less than second interval value, if
It is that the unsigned number to be converted after then determining second of biasing removal is in second value section, if it is not, then determining second
The unsigned number to be converted after secondary biasing removes is in third value section;
Amending unit 32, for being in the first numerical value area in the unsigned number to be converted after second of biasing removes
Between when, output 0 be used as the drift correction value;
When the unsigned number to be converted after second of biasing removes is in second value section, 1 conduct is exported
The drift correction value;
When the unsigned number to be converted after second of biasing removes is in third value section, 2 conducts are exported
The drift correction value.
With reference to Fig. 6, in Fig. 6 other than L12 and L13 line segment, further it is shown that L13 is before carrying out the amendment of drift correction value
Line segment L13 '.From fig. 6 it can be seen that one has co-existed in twice due to tired in the section that temperature range is -40 DEG C -159 DEG C
The deviation from linearity accumulating error accumulation and being formed.Therefore, in the present embodiment, the judging unit 31 first determines whether second of biasing
Interval range locating for the unsigned number to be converted after removal, then determines corresponding drift correction value.
With reference to Fig. 7, the feasible value of first interval value and second interval value, in Fig. 7, described first are given in Fig. 7
Interval value is 55, that is, thinks exist when the unsigned number to be converted after second of biasing removes is greater than or equal to 55
The deviation from linearity of one accumulation, then corresponding drift correction value is 1;The no symbol to be converted after second of biasing removes
When number is less than 55, that is, think that there is no deviations from linearity, then corresponding drift correction value is 0;Institute after second of biasing removes
When stating unsigned number to be converted more than or equal to 139, then it is assumed that the deviation from linearity accumulated there are two, then corresponding drift correction
Value is 2.
Temperature checking method provided by the embodiments of the present application is described below, temperature checking method described below with
Above-described temperature-detecting device can correspond to each other reference.
Correspondingly, the embodiment of the present application provides a kind of temperature checking method, applied to described in any of the above-described embodiment
Temperature-detecting device, the temperature checking method include:
It receives the unsigned number to be converted for indicating temperature information and indicates the default unsigned number of the first preset temperature;
According to the default unsigned number, biasing for the first time is carried out to the unsigned number to be converted and is removed;Described first
Preset temperature is the temperature sensing lower limit value of the temperature-detecting device, and the default unsigned number is less than 0;
The unsigned number to be converted after removing to first time biasing carries out second of biasing and removes, to remove for the first time
One lowest bit position of the unsigned number to be converted after biasing removal;
Determine numerical intervals locating for the unsigned number to be converted after second of biasing removes, and partially according to second
Set numerical intervals locating for the unsigned number to be converted after removing, Xiang Suoshu complement code conversion module output bias correction value;
The unsigned number to be converted according to the drift correction value and the first preset value, after being removed to second of biasing
Complement code conversion is carried out, to obtain the temperature information indicated in the form of the complement of two's two's complement;First preset value is less than 0, and described
The absolute value of one preset value is equal to the absolute value of first preset temperature.
Optionally, numerical intervals locating for second of unsigned number to be converted biased after removing of the determination, and
Numerical intervals locating for the unsigned number to be converted after being removed according to second of biasing, the output of Xiang Suoshu complement code conversion module
Drift correction value includes:
Whether the unsigned number to be converted after second of biasing of judgement removes is less than first interval value, if it is,
Determine that the unsigned number to be converted after second of biasing removes is in the first numerical intervals;
If not, whether the unsigned number to be converted after second of biasing of judgement removes is less than second interval value, if
It is that the unsigned number to be converted after then determining second of biasing removal is in second value section, if it is not, then determining second
The unsigned number to be converted after secondary biasing removes is in third value section;
When the unsigned number to be converted after second of biasing removes is in the first numerical intervals, 0 conduct is exported
The drift correction value;
When the unsigned number to be converted after second of biasing removes is in second value section, 1 conduct is exported
The drift correction value;
When the unsigned number to be converted after second of biasing removes is in third value section, 2 conducts are exported
The drift correction value.
Optionally, described according to the default unsigned number, biasing for the first time is carried out to the unsigned number to be converted and is moved
Except including:
Subtract the default unsigned number using the unsigned number to be converted, with obtain for the first time biasing remove after to
Convert unsigned number.
Optionally, second of biasing of unsigned number progress to be converted after the biasing removal to first time removes,
Include: to remove a lowest bit position of the unsigned number to be converted after biasing removal for the first time
The unsigned number to be converted after removing to first time biasing carries out the operation divided by 2, inclined for the first time to remove
Set a lowest bit position of the unsigned number to be converted after removing.
Optionally, described according to the drift correction value and the first preset value, after being removed to second of biasing described in
It converts unsigned number and carries out complement code conversion, include: to obtain the temperature information indicated in the form of the complement of two's two's complement
The unsigned number to be converted after being removed using second of biasing subtracts the drift correction value and described first
Preset value, to obtain the temperature information indicated in the form of the complement of two's two's complement.
In conclusion the embodiment of the present application provides a kind of temperature-detecting device and temperature checking method, wherein the temperature
The unsigned number to be converted for the expression temperature information that degree detection device will acquire passes through the first biasing remove module, the second biasing
The processing of remove module, deviation computing module and complement code conversion module realizes unsigned number to be converted being converted to expression very
The purpose for the temperature information that the complement of two's two's complement form of the information of real temperature indicates, and in view of the conversion of SAR-DAC has
Linearity error has carried out twice inclined to unsigned number to be converted by the first biasing remove module, the second biasing remove module
Removal is set, and the unsigned number drift correction value to be converted after biasing removal twice has been determined by deviation computing module, is made
The linearity error can be eliminated in complement code conversion process by obtaining complement code conversion module, accurately carry out unsigned number to be converted to two
The accurate transformation for the temperature information that complement on n n form indicates.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other
The difference of embodiment, the same or similar parts in each embodiment may refer to each other.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.
Claims (11)
1. a kind of temperature-detecting device characterized by comprising the first biasing remove module, the second biasing remove module, deviation
Computing module and complement code conversion module;Wherein,
The first biasing remove module is used to receive the unsigned number to be converted for indicating temperature information and indicates the first default temperature
The default unsigned number of degree;With for being carried out to the unsigned number to be converted inclined for the first time according to the default unsigned number
Set removal;First preset temperature is the temperature sensing lower limit value of the temperature-detecting device, and the default unsigned number is small
In 0;
The unsigned number to be converted after the second biasing remove module is used to remove first time biasing carries out second
Biasing removes, to remove a lowest bit position for biasing the unsigned number to be converted after removing for the first time;
The deviation computing module, for determining numerical value area locating for the unsigned number to be converted after biasing removal second
Between, and the numerical intervals according to locating for the unsigned number to be converted after second of biasing removal, Xiang Suoshu complement code modulus of conversion
Block output bias correction value;
The complement code conversion module is repaired for receiving the unsigned number to be converted, the deviation after second biasing removes
Positive value and the first preset value, first preset value is less than 0, and the absolute value of first preset value is equal to described first and presets
The absolute value of temperature;With for according to the drift correction value and the first preset value, after being removed to second of biasing described in
It converts unsigned number and carries out complement code conversion, to obtain the temperature information indicated in the form of the complement of two's two's complement.
2. temperature-detecting device according to claim 1, which is characterized in that the first biasing remove module and complement code turn
Changing the mold block is adder.
3. temperature-detecting device according to claim 2, which is characterized in that the first biasing remove module is according to
Default unsigned number carries out biasing removal for the first time to the unsigned number to be converted and is specifically used for, utilizes the nothing to be converted
Symbolic number subtracts the default unsigned number, to obtain the unsigned number to be converted after biasing removal for the first time.
4. temperature-detecting device according to claim 2, which is characterized in that the deviation computing module biases first time
The unsigned number to be converted after removal carries out second of biasing and removes, with described in removing after biasing removes for the first time wait turn
A lowest bit position for changing unsigned number is specifically used for, and the unsigned number to be converted after removing to first time biasing carries out
Divided by 2 operation, to remove a lowest bit position of the unsigned number to be converted after biasing removal for the first time.
5. temperature-detecting device according to claim 2, which is characterized in that the complement code conversion module is according to the deviation
Correction value and the first preset value, the unsigned number to be converted after removing to second of biasing carries out complement code conversion, to obtain
The temperature information that complement of two's two's complement form indicates is specifically used for, the unsigned number to be converted after being removed using second of biasing
The drift correction value and first preset value are subtracted, to obtain the temperature information indicated in the form of the complement of two's two's complement.
6. temperature-detecting device according to claim 1, which is characterized in that the deviation computing module includes:
Whether judging unit, the unsigned number to be converted for judging that second biases after removing are less than first interval value,
If it is, determining that the unsigned number to be converted after second of biasing removal is in the first numerical intervals;
If not, whether the unsigned number to be converted after second of biasing of judgement removes is less than second interval value, if so,
The unsigned number to be converted after second of biasing of judgement removes is in second value section, if it is not, then determining inclined for the second time
It sets the unsigned number to be converted after removing and is in third value section;
Amending unit, for when the unsigned number to be converted after second biasing removes is in the first numerical intervals,
Output 0 is used as the drift correction value;
When the unsigned number to be converted after second of biasing removes is in second value section, described in 1 conduct of output
Drift correction value;
When the unsigned number to be converted after second of biasing removes is in third value section, described in 2 conduct of output
Drift correction value.
7. a kind of temperature checking method, which is characterized in that it is applied to temperature-detecting device described in any one of claims 1-6,
The temperature checking method includes:
It receives the unsigned number to be converted for indicating temperature information and indicates the default unsigned number of the first preset temperature;
According to the default unsigned number, biasing for the first time is carried out to the unsigned number to be converted and is removed;Described first is default
Temperature is the temperature sensing lower limit value of the temperature-detecting device, and the default unsigned number is less than 0;
The unsigned number to be converted after removing to first time biasing carries out second of biasing and removes, and is biased for the first time with removing
One lowest bit position of the unsigned number to be converted after removal;
It determines numerical intervals locating for the unsigned number to be converted after second of biasing removes, and is moved according to second of biasing
Numerical intervals locating for the unsigned number to be converted after removing, Xiang Suoshu complement code conversion module output bias correction value;
According to the drift correction value and the first preset value, the unsigned number to be converted after removing to second of biasing is carried out
Complement code conversion, to obtain the temperature information indicated in the form of the complement of two's two's complement;First preset value is less than 0, and described first is pre-
If the absolute value of value is equal to the absolute value of first preset temperature.
8. the method according to the description of claim 7 is characterized in that biasing for second of the determination described to be converted after removing
Numerical intervals locating for unsigned number, and the numerical value area according to locating for the unsigned number to be converted after second of biasing removal
Between, Xiang Suoshu complement code conversion module output bias correction value includes:
Whether the unsigned number to be converted after second of biasing of judgement removes is less than first interval value, if it is, determining
The unsigned number to be converted after second of biasing removes is in the first numerical intervals;
If not, whether the unsigned number to be converted after second of biasing of judgement removes is less than second interval value, if so,
The unsigned number to be converted after second of biasing of judgement removes is in second value section, if it is not, then determining inclined for the second time
It sets the unsigned number to be converted after removing and is in third value section;
When the unsigned number to be converted after second of biasing removes is in the first numerical intervals, described in 0 conduct of output
Drift correction value;
When the unsigned number to be converted after second of biasing removes is in second value section, described in 1 conduct of output
Drift correction value;
When the unsigned number to be converted after second of biasing removes is in third value section, described in 2 conduct of output
Drift correction value.
9. the method according to the description of claim 7 is characterized in that described according to the default unsigned number, to described wait turn
It changes unsigned number and carries out biasing to remove for the first time and include:
The default unsigned number is subtracted using the unsigned number to be converted, it is to be converted after biasing removal for the first time to obtain
Unsigned number.
10. the method according to the description of claim 7 is characterized in that described to be converted after the biasing removal to first time
Unsigned number carries out second and biases removal, most with one of the unsigned number to be converted after removal biasing removal for the first time
Low bit position includes:
The unsigned number to be converted after removing to first time biasing carries out the operation divided by 2, is moved with removing biasing for the first time
One lowest bit position of the unsigned number to be converted after removing.
11. the method according to the description of claim 7 is characterized in that described according to the drift correction value and the first preset value,
The unsigned number to be converted after removing to second biasing carries out complement code conversion, is indicated in the form of the complement of two's two's complement by obtaining
Temperature information includes:
The unsigned number to be converted after being removed using second of biasing is subtracted the drift correction value and described first and preset
Value, to obtain the temperature information indicated in the form of the complement of two's two's complement.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910057047.4A CN109491640B (en) | 2019-01-22 | 2019-01-22 | Temperature detection device and temperature detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910057047.4A CN109491640B (en) | 2019-01-22 | 2019-01-22 | Temperature detection device and temperature detection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109491640A true CN109491640A (en) | 2019-03-19 |
CN109491640B CN109491640B (en) | 2023-08-01 |
Family
ID=65714823
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910057047.4A Active CN109491640B (en) | 2019-01-22 | 2019-01-22 | Temperature detection device and temperature detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109491640B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2142796A1 (en) * | 1994-04-05 | 1995-10-06 | Timothy A. Elliott | Efficient floating point overflow and underflow detection system |
CN1133534A (en) * | 1994-03-24 | 1996-10-16 | Dva公司 | Detector for initial code |
WO2003088033A1 (en) * | 2002-04-09 | 2003-10-23 | University Of Rochester | Multiplier-based processor-in-memory architectures for image and graphics processing |
US20090112334A1 (en) * | 2007-10-31 | 2009-04-30 | Grichnik Anthony J | Fixed-point virtual sensor control system and method |
US20110125419A1 (en) * | 2009-11-16 | 2011-05-26 | Nrg Systems, Inc. | Data acquisition system for condition-based maintenance |
CN103905040A (en) * | 2014-03-04 | 2014-07-02 | 东莞博用电子科技有限公司 | Method for eliminating errors of analog-to-digital conversion circuit system |
CN109186790A (en) * | 2018-10-18 | 2019-01-11 | 卓捷创芯科技(深圳)有限公司 | A method of improving semiconductor temperature sensor measurement accuracy |
CN209103271U (en) * | 2019-01-22 | 2019-07-12 | 上海艾为电子技术股份有限公司 | A kind of temperature-detecting device |
-
2019
- 2019-01-22 CN CN201910057047.4A patent/CN109491640B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1133534A (en) * | 1994-03-24 | 1996-10-16 | Dva公司 | Detector for initial code |
CA2142796A1 (en) * | 1994-04-05 | 1995-10-06 | Timothy A. Elliott | Efficient floating point overflow and underflow detection system |
WO2003088033A1 (en) * | 2002-04-09 | 2003-10-23 | University Of Rochester | Multiplier-based processor-in-memory architectures for image and graphics processing |
US20090112334A1 (en) * | 2007-10-31 | 2009-04-30 | Grichnik Anthony J | Fixed-point virtual sensor control system and method |
US20110125419A1 (en) * | 2009-11-16 | 2011-05-26 | Nrg Systems, Inc. | Data acquisition system for condition-based maintenance |
CN103905040A (en) * | 2014-03-04 | 2014-07-02 | 东莞博用电子科技有限公司 | Method for eliminating errors of analog-to-digital conversion circuit system |
CN109186790A (en) * | 2018-10-18 | 2019-01-11 | 卓捷创芯科技(深圳)有限公司 | A method of improving semiconductor temperature sensor measurement accuracy |
CN209103271U (en) * | 2019-01-22 | 2019-07-12 | 上海艾为电子技术股份有限公司 | A kind of temperature-detecting device |
Non-Patent Citations (3)
Title |
---|
冯烨旻: "大动态范围接收系统和小型化发射系统的研制", pages 136 - 19 * |
武东健: "一种采用线性光耦实现温度隔离测量的方法", vol. 35, no. 35, pages 30 - 32 * |
王淑杰: "一种工业热电阻检定系统的设计", vol. 32, no. 32, pages 1 - 4 * |
Also Published As
Publication number | Publication date |
---|---|
CN109491640B (en) | 2023-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102111158B (en) | Device for subdividing sine signal and cosine signal of position sensor and coding data, and implementation method thereof | |
CN103954316B (en) | A kind of scaling method of angular encoder and device | |
TWI438408B (en) | Detection apparatus | |
CN209103271U (en) | A kind of temperature-detecting device | |
CN104677394A (en) | Code and device for sensing position or angular position | |
CN102168996B (en) | Photoelectric encoder | |
CN108155910B (en) | High-speed sine and cosine encoder decoding method based on FPGA | |
CN104567955A (en) | Grating subdivision device and method based on FPGA | |
CN108168680B (en) | Dynamic weighing filtering method and system | |
CN111351512B (en) | Incremental photoelectric encoder signal processing device and processing method | |
CN103532556A (en) | Axial angle signal-to-serial digital signal conversion circuit of single chip | |
CN108896075A (en) | A kind of rotary transformer angular displacement closed loop decoding System and method for based on FPGA | |
CN109491640A (en) | A kind of temperature-detecting device and temperature checking method | |
CN102879017B (en) | Novel double-speed coarse and fine combination system for resolver-to-digital converter | |
CN111256735B (en) | Photoelectric encoder data processing method and device and photoelectric encoder | |
CN113607046A (en) | Laser interferometry signal processing device and signal subdivision method | |
JPH0496130A (en) | Signal calibrating device | |
JP2016001103A (en) | Position detector | |
CN105680858A (en) | Method for estimating time offset error of TIADC parallel collection system | |
CN1272600C (en) | Phase differential nonsensitive counting method and device for node tracking mohr interference fringe signals | |
CN111368584A (en) | Self-correcting high-resolution position information splicing method for sine and cosine encoder | |
CN116358619A (en) | Signal error correction method, magnetic encoder and optical encoder | |
CN205388479U (en) | Rotary encoder based on anisotropic magnetic resistance | |
CN105865318A (en) | Non-phase-sensitive digital demodulation system and method applied to LVDT displacement sensor | |
CN109297516A (en) | A kind of rotary transformer coding/decoding method suitable for small-angle movement range |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |