![Nations N32G43 Series Скачать руководство пользователя страница 393](http://html1.mh-extra.com/html/nations/n32g43-series/n32g43-series_user-manual_3408051393.webp)
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
370
/
631
to detect the ambient temperature when the device is working. The output voltage sampled by the temperature sensor
is converted into a digital value by the ADC_IN17 channel. When the temperature sensor is working, the ideal
sampling time is 17.1us; when the temperature sensor is not working, the ADC_CTR2.TEMPEN bit can be cleared
by software to reduce power consumption. Figure 17-7
is a block diagram of a temperature sensor.
The output voltage of the temperature sensor changes linearly with temperature. Different chips will have different
offsets in the temperature curve due to different production processes. Through testing, it is found that the maximum
offset is 3°C. This characteristic makes the internal temperature sensor more suitable for detecting temperature
changes. Not suitable for measuring absolute temperature. When accurate temperature measurement is required, an
external temperature sensor should be used.
Figure 17-7 Temperature sensor and VREFINT Diagram of the channel
Temperature sensor using flow
1)
Configure the channel (ADC_IN17) and sampling time of the channel to be 17.1 us
2)
Set ADC_CTRL2.TEMPEN bit to 1 to enable temperature sensor and VREFINT
3)
Set ADC_CTRL2.ON bit to 1 to start ADC conversion (or through external trigger)
4)
Read the temperature data in the ADC data register, and calculate the temperature value by the following formula:
Temperature (°C) = {(V
30
- V
SENSE
) / Avg_Slope} + 30- T
offset
In which:
ADC channels
TEMPERATURE
SENSOR
ADC_IN17
ADC_IN0
INTERNAL
POWER
BLOCK(V
REFINT
)