You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
2 years ago | |
---|---|---|
.. | ||
.settings | 2 years ago | |
Core | 2 years ago | |
Debug | 2 years ago | |
Drivers | 2 years ago | |
.cproject | 2 years ago | |
.mxproject | 2 years ago | |
.project | 2 years ago | |
ADC_NTC Debug.launch | 2 years ago | |
ADC_NTC.ioc | 2 years ago | |
Readme.md | 2 years ago | |
STM32F103C8TX_FLASH.ld | 2 years ago |
Readme.md
NTC
-
(可选)打开外部晶振
-
给PA4选择ADC1_IN4
-
进入ADC配置
- Enable Continuous Conversion Mode
- Rank - Sampling Time配置为239.5Cycles
-
ADC结果转换到温度:
-
通过ADC结果计算NTC电阻值,单位欧姆
-
通过NTC电阻值,计算温度,单位摄氏度
开发板配置的NTC电阻参数如下
B值 3950
常温 T2 = 25℃
常温电阻R2 = 10KΩ
-
-
注意:默认无法使用sprintf打印浮点数,需要在工程Properties - C/C++ Build - Settings - MCU Settings中,勾选Use float with printf from newlib -nano