jmg
发表于 2023-5-17 13:39:16
本帖最后由 jmg 于 2023-5-17 14:09 编辑
To measure temperature, there is no ADC pathway I can see.
I did find this info below, on IRC32k, and it has a strong temperature and voltage effect, so a regulated Vcc can give temperature from kHz, but there seems to be no means in STC8 to read both 32.768kHz Xtal and the IRC32K ?
No timers can capture from 32k sources, and RTC is only XtalorIRC32K ?
Looks like the external Temperature Sensor choices are an NTC for ~1c and also run the ADC on 1 pin, or a ~20c semiconductor sensor on 1 or 2 pins.
32G12K128
发表于 2023-5-17 14:37:11
Building owner, ADC temperature measurement example reference is as follows:
https://www.stcaimcu.com/data/attachment/forum/202212/13/145038vspijatil4ahlsdi.png
https://www.stcaimcu.com/data/attachment/forum/202212/13/145038yqz3fxmz1xa15a1a.png
https://www.stcai.com/filedownload/630381 代码下载在这!
jmg
发表于 2023-5-17 16:36:59
Building owner, ADC temperature measurement example reference is as follows:
Thanks, yes that's an example using an external NTC for temperature sense, and it uses floating point calc (log) to curve fit.
TI has some good notes on Code size / power / resource for floating point on NTC and other sensors
https://www.ti.com/lit/an/snoaa12/snoaa12.pdf
If this is used to correct a parabolic crystal error of RTC, it may be simplest to simply create a LUT that applies both NTC and parabola corrections in one pass.