51+HD7279+ADS1110+PT100的测温系统(程序)
发布时间:2021-06-05
发布时间:2021-06-05
51+HD7279+ADS1110+PT100的测温系统,通过与标准温度计对比拟合,精度能达到0.5度
#include <intrins.h>
#include <STC12C5A60S2.H>
typedef unsigned int uint;
typedef unsigned char uchar;
typedef unsigned short WORD;
float code RTD_TAB_PT100[151] = // 表格是以1度为一步,即-20, -19, -18.....
{
88.22, 88.62 ,88.62, 89.40, 89.80, 90.19, 90.59, 90.98, 91.37, 91.77, // -30 ~ -21
92.16, 92.55, 92.95, 93.34, 93.73, 94.12, 94.52, 94.91, 95.30, 95.69, // -20 ~ -11
96.09, 96.48, 96.87, 97.26, 97.65, 98.04, 98.44, 98.83, 99.22, 99.61, // -10 ~ -1
100.00,100.39,100.78,101.17,101.56,101.95,102.34,102.73,103.13,103.51, // 0 ~ 9
103.90,104.29,104.68,105.07,105.46,105.85,106.24,106.63,107.02,107.49, // 10 ~ 19
107.79,108.18,108.57,108.96,109.35,109.73,110.12,110.51,110.90,111.28, // 20 ~ 29
111.67,112.06,112.45,112.83,113.22,113.61,113.99,114.38,114.77,115.15, // 30 ~ 39
115.54,115.93,116.31,116.70,117.08,117.47,117.86,118.24,118.62,119.01, // 40 ~ 49
119.40,119.78,120.16,120.55,120.93,121.32,121.70,122.09,122.47,122.86, // 50 ~ 59
123.24,123.62,124.01,124.39,124.77,125.16,125.54,125.92,126.31,126.69, // 60 ~ 69
127.07,127.45,127.84,128.22,128.60,128.98,129.37,129.75,130.13,130.51, // 70 ~ 79
130.89,131.27,131.66,132.04,132.42,132.80,133.18,133.56,133.94,134.32, // 80 ~ 89
134.70,135.08,135.46,135.84,136.22,136.60,136.98,137.36,137.74,138.12, // 90 ~ 99
138.50,138.88,139.26,139.64,140.02,140.39,140.77,141.15,141.53,141.91, // 100 ~ 109
142.29,142.66,143.04,143.42,143.80,144.17,144.55,144.93,145.31,145.68, // 110 ~ 119
146.06 // 120
};
//float code RTD_TAB_PT100[41] = // 表格是以5度为一步,即-50, -45, - 40.....
//{
// 80.31, 82.29, 84.27 ,86.25, 88.22, 90.19, 92.16, 94.12, 96.09, 98.04, // -50 ~ -5
// 100.00,101.95,103.90,105.85,107.79,109.73,111.67,113.61,115.54,117.47, // 0 ~ 45
// 119.40,121.32,123.24,125.16,127.08,128.99,130.90,132.80,134.71,136.61, // 50 ~ 95
// 138.51,140.40,142.29,144.18,146.07,147.95,149.83,151.71,153.58,155.46, // 100 ~ 145
// 157.33 // 50
//};
sbit beep = P3^5;
//----------------ADS1110地址、配置字-----------------//
#define ADS1110_WR_ADDRESS 0x92 // 1001 001 0 写
#define ADS1110_RD_ADDRESS 0x93 // 1001 001 1 读
#define ADS1110_CONFIG_REG 0x8C // 连续转换模式,16bit精度,PGA=1
sbit ADS1110_SDA = P1^5; // 模拟I2C数据传输位
上一篇:道路工程概论.第2-7章
下一篇:土家风情深度亲子自驾游1.0