求帮看看为什么keil里程序会出现下面警告,是不是程序不对?还是设置错了?
程序如下#include<reg51.h>#defineucharunsignedchar#defineunitunsignedintucharcodeDSY_code[...
程序如下#include<reg51.h>#define uchar unsigned char#define unit unsigned intuchar code DSY_code[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};uchar Temperature[]={0,0,0};sbit ST=p2^5;sbit OE=P2^7;sbit EOC=P2^6;sbit CLK=P2^4;sbit H_LED=P3^0;sbit L_LED=P3^1;sbit BEEP=P3^7;uchar t=0;void DelayMS(unit x){uchar i;while(x--)for(i=0;i<120;i++);}void Show_Temperature(){uchar i,DSY_IDX[]={0xF7,0xFB,0xFD};for(i=0;i<3;i++)}{P0=DSY_CODE[Temperature[i]];P2&=DSY_IDX[i];DelayMS(5);P2|=0x0F;}}void main(){uchar d;IE=0x8a;TM0D=18;TH0=245;TL0=0;TH1=(65536-1000)/256;TL1=(65536-1000)&256;TR0=1;H_LED=L_LED=1;while(1){ST=0;ST=1;ST=0;while(1){if(EOC==1){OE=1;d=P1;OE=0;Temperature[2]=d/100;Temperature[1]=d%100/10;Temperature[0]=d%10;Show_Temperature();if(d<60){TR1=1;L_LED=!H_LED;}elseif(d>160){TR1=1;H_LED=!L_LED;}else{TR1=0;H_LED=L_LED=1;}break;}}}}void T0_INT()interrupt 1{CLK=~CLK;}void T1_INT() interrupt 3{TH1=(65536-1000)/256;TL1=(65536-1000)%256;BEEP=~BEEP;if(L_LED=0){if(++t!=150)return;}else{if(++t!=60)return;}t=0;DelayMS(20);}
其实就是用ADC0808设计的调温报警器的源程序 展开
其实就是用ADC0808设计的调温报警器的源程序 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询