资 源 简 介
基于89C51单片机 温度采集代码#include #include /**************外部变量定义************************/int num=0,num1=0; int set_t=20;double set_ph=7.0;double set_tu=3.0;/**************变量定义***************************/unsigned char AD_CHANNEL;double PH=0.0,TU=0.0;xdata unsigned char disbuff[14]={0};unsigned char Tempbuff[9];double ADC_Voltage=0.0,ADC_Voltage1=0.0;void Set_TU_Display();void Set_PH_Display();void Set_Temp_Display();unsigned char temp_value; bit SET_flag=0; //设定温度标志位int SET_Count=0;bit Warning_flag=0;sbit Beep =P2^3;sbit LED1 =P1^1;sbit LED2 =P1^2;sbit LED3 =P1^3;sbit LED4 =P1^4;void ReadTemp(void); void Delay_Beep(unsigned int i);/* * 函数名:Get_Voltage_Value * 描述 :获取ADC0809的转换电压值