This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# 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