在single_ended这个例程里,AIN0输出的外接数据是什么进制的,如何换算成真正传感器的数据
在串口调试助手里面显示出来的数非常大,请问这是什么原因。还有在single_end这个例程里,AIN0输出的外接数据是什么进制的,如何换算成真正传感器的数据
谢谢
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
在串口调试助手里面显示出来的数非常大,请问这是什么原因。还有在single_end这个例程里,AIN0输出的外接数据是什么进制的,如何换算成真正传感器的数据
谢谢
传感器数据到实际温度于转换的过程,数据手册中有个公式了。
//
// Use non-calibrated conversion provided in the data sheet. Make
// sure you divide last to avoid dropout.
//
ui32TempValueC = ((1475 * 1023) - (2250 * pui32ADC0Value[0])) / 10230;
//
// Get Fahrenheit value. Make sure you divide last to avoid dropout.
//
ui32TempValueF = ((ui32TempValueC * 9) + 160) / 5;
//
// Display the temperature value on the console.
//
UARTprintf("Temperature = %3d*C or %3d*F\r", ui32TempValueC,
ui32TempValueF);
这个算法就是实际的温度,你实际这个打印值是多少呢?另外,这个出来的应该是华氏温度,你应该转换为摄氏温度才对。
d对呀,但是串口调试助手里面显示的数据是个5位数,反正很大
内部温度传感器里面的温度在串口调试助手里面的非常大,还有
在single_ended这个例程里,AIN0输出的外接数据是什么进制的,如何换算成真正传感器的数据
官方的这个算法,确实有问题,我用官方给的另一个例程,就是给你发的四通道那个,也是官方给的例程。