/*--------------------------------------------------------------------------------------------------------------------------------------------***该程序为一个完整的温度控制器程序**最小系统温控板(后附图)**实现功能:**1、2X2 的矩阵按键:分别实现(温度+,温度-,温度**确认,回到初始化状态)**2、先按键设定你要的温度值,然后按下确认键,**此时,水泥电阻开始加热,数码管动态显示电阻**此时的温度。实现控制水泥电阻被加热到你所需要**的温度值。并且能够稳定在你所设定的温度下。当**实际温度超过你设定的温度,蜂鸣器报警。****包括各个模块及详细的注释**方便 C51 单片机入门级别者阅读**--------------------------------------------------------------------------------------*/#include//该头文件可以百度到typedef unsigned char uchar ;typedef unsigned int uint;sbit heat= P1^3;uchar makesure;//s62 键为 makesure 确定键(若按下则置 1)uchar tp=0;uchar num=0;uchar ad=0;uchar s60,s61,s62,s63,temp;//定义四个按键void smgshow(uchar num,uchar tp);//声明数码管显示函数void keyask(void);//键盘扫描uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};//数码管编码/*--------------------------------------------------------------------------------------------------------------------------------------------*三个小函数**delayus() --1us 延时**delay1ms()--1ms 延时**buzzeron()--蜂鸣器响*----------------------------------------------------*/void delayus(uint xus)//--------------------1us 基准延时函数{uint i,j;for(i=0;i