找回密码
 立即注册

QQ登录

只需一步,快速开始

打印 上一主题 下一主题
开启左侧

[M2L31] Internal Temperature Sensor

[复制链接]
跳转到指定楼层
楼主
admin 发表于 1 小时前 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

This example code demonstrates how to read the internal temperature sensor of the NuMicro
M2L31 series microcontroller. Upon system startup, the factory-calibrated two-point data for
25°C and 125°C is retrieved from the RMC memory. Timer0 then triggers a measurement once
every second. During measurement, EADC Channel 28 measures the band-gap voltage to
calculate the actual AVDD voltage, while EADC Channel 29 measures the temperature sensor
voltage. After filtering out noise using a median filter, both values are converted into Celsius
using a two-point linear interpolation formula. Finally, the data is packed into a custom UART
packet and transmitted to the PC-side UI at 115200 bps, allowing users to view the real-time
temperature curve.

You can download the sample code at EC_M2L31_Internal_Temperature_Sensor_V1.00.


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 顶顶 踩踩
牛卧堂
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

新唐MCU