关于c8051f020温度测量疑问
请问大家关于C8051F020的程序温度测量的while (1) {
EA = 0; // disable interrupts
temperature = result;
EA = 1; // re-enable interrupts
// calculate temperature in hundredths of a degree
temperature = temperature - 41380;
temperature = (temperature * 100L) / 156;
temp_int = temperature / 100;
temp_frac = temperature - (temp_int * 100);
printf ("Temperature is %+02d.%02d\n", temp_int, temp_frac);
LED = ~SW1; // LED reflects state of switch
}
关于temperature装换 请问哪位高手可以解释下 看不懂 同求!!!!!!!!!!!!!!! 片内温度传感器?参考手册上已经很详细。
页:
[1]