user-0 提问: 51单片机 keil软件

回复:
user: user-1
content: uint tCount=0;   //后面漏了分号

user: user-0
content: 引用 1 楼 user-1的回复:看不太清楚，前面一句是否少了  ; 下面我发的是总程序，找不到错误在哪

user: user-0
content: 我编译keil程序时显示出错，有那位大佬告知我的具体哪里错了，学习keil软件没有多长时间，求告知，谢谢各位大佬。  #include<reg51.h> #include<intrins.h>  #define uchar unsigned char #define uint unsigned int #define delayNOP() {_nop_();_nop_();_nop_();_nop_();}    sbit DQ=P3^3; sbit MA=P1^0;      sbit MB=P1^1;     sbit PEM=P1^2; sbit LCD_RS=P2^0; sbit LCD_RW=P2^1; sbit LCD_EN=P2^2;  uchar code temp_DISP_Title[]={"Current temp :  "}; uchar Current_Temp_Display_Buffer[]={"TEMP: "}   uchar code_temperature_char[8]= {0x0C,0x12,0x12,0x0C,0x00,0x00,0x00,0x00,0x00}	     uchar code df_Table[]= {0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9}               //温度小数位对照表   uchar Current=0; char Signed_Temp=0; uchar Temp_Value[]={0x00,0x00}; uchar Back_Temp_Value[]={0xFF,0xFF}; uchar Display_Digit={0,0,0,0}; bit DS18B20_IS_OK=1; uint tCount=0     void DelayXus(int x) {      uchar i;     while(x--) for(i=0;i<200;i++);  }  uchar LCD_Busy_Check()reentrant void Write_LCD_Command(uchar cmd) void Write_LCD_Data(uchar data) void LCD_Initialise() void Set_LCD_POS(uchar pos) void Write_NEW_LCD_Char()                              //液晶控制函数    void Delay(uint x) {    while(--x)  }                                                       //延时2   uchar Init_DS18B20() {   uchar	   DQ=1;Delay(8);DQ=0;Delay(90);   DQ=1;Delay(8);status=DQ;Delay(100);DQ=1;   return status; }  uchar ReadOneByte() {   uchar i,data=0;   DQ=1;_nop_();   for(i=0;i<8;i++)    {      DQ=0;data>>=1;DQ=1;_nop_();_nop_();  if(DQ)data=0x80;Delay(30);DQ=1; } return data }   uchar  WriteOnebyte(uchar dat) {    uchar i;    for(i=0;i<8;i++)      {    DQ=0;DQ=data&0x01;    Delay(5);DQ=1;data>>=1;  } }   void Read_Temperature() {    if(Init_DS18B20()==1)      DS18B20_IS_OK=0; else   {     writeoneByte(0xCC); writeoneByte(0x44); Init_DS18B20(); writeoneByte(0xCC); writeoneByte(0xBE); Temp_Value[0]=ReadOneByte(); Temp_Value[1]=ReadOneByte(); DS18B20_IS_OK=1;    } }    void Display_Temperature() {    uchar i;    uchar t=150;    uchar ng=0;    if((Temp_Value[1]&0xF8)==0xF8)      {    Temp_Value[1]=~Temp_Value[1];    Temp_Value[0]=~Temp_Value[0]+1;    if(Temp_Value[0]==0x00)    Temp_Value[1]++;    ng=1;  } Display_Digit[0]=df_Table[Temp_Value[0]&0x0F]; Current=((Temp_Value[0]&0xF0>>4))|((Temp_Value[1]&0x07<<4)); Signed_Temp=!ng?CurrenT:-CurrenT; Display_Didit[3]=CurrenT/100; Display_Didit[2]=CurrenT%100/10; Display_Didit[1]=CurrenT%10 Current_Temp_Display_Buffer[11]=Display_Digit[0]+'0'; Current_Temp_Display_Buffer[10]='.'; Current_Temp_Display_Buffer[9]=Display_Digit[1]+'0'; Current_Temp_Display_Buffer[8]=Display_Digit[2]+'0'; Current_Temp_Display_Buffer[7]=Display_Digit[3]+'0';  if(Display_Digit[2]==0&&Display_Digit[3]==0) if(ng) {   if(Current_Temp_Display_Buffer[8]=='')  Current_Temp_Display_Buffer[8]=='-';   else   if(Current_Temp_Display_Buffer[7]=='')  Current_Temp_Display_Buffer[7]=='-';   else   Current_Temp_Display_Buffer[6]=='-'  }   Set_LCD_POS(0x40);  for(i=0;i<16;i++)  Write_LCD_Data(Current_Temp_Dispaly_Buffer[i])    Set_LCD_POS(0x4E);  Write_LCD_Data(0x00);  Set_LCD_POS(0x4E);  Write_LCD_Data('C'); }   Void T0_INT0()interrup 1 {   TH0=-50000/256;   TL0=-50000%256;   Read_Temperature();    if(!DS18B20_IS_OK)return;   if(Temp_Value[0]!=Back_Value[0]||Temp_Value[1]!=Back_Value[1])    {     Back_Temp_Value[0]=Temp_Value[0]; Back_Temp_Value[1]=Temp_Value[1]; Display_Temperature();   }    if(Signed_Temp>=90)Signed_Temp=90;   if(Signed_Temp<=0)Signed_Temp=0      if(Signed_Temp>=20&&<=30)    {      MA=1;MB=0;  PWM=1;DelayXus(50);return; } PWM=1;DelayXus(Signed_Temp-30)    if(Signed_Temp>30)     {   MA=1;MB=0;   PWM=1;DelayXus(10);return; } PWM=1;DelayXus(Signed_Temp)    if(Signed_Temp<10)      {    MA=0;MB=1;    PWM=1;DelayXus(10);return;  }  PWM=0;DelayXus(10-Signed_Temp);     if(Signed_Temp>=10&&<=20)    {     MA=0;MB=1; PWM=0;DelayXus(10);return;    }    PWM=0;DelayXus(Signned_Temp);    else   {     MA=0;MB=0;   } }   void main() {   LCD_Intialise();   Read_Temperature();   Delay(5000);   Delay(5000);   TMOD=0x01;   TH0=-50000/256;   TL0=-50000%256;   IE=0x82;   TR0=1;   while(1); }

user: user-0
content: 引用 5 楼 user-1的回复:uint tCount=0;   //后面漏了分号 谢谢，我明天改一下看看

user: user-0
content: 引用 1 楼 user-1的回复:看不太清楚，前面一句是否少了  ; 确实没有拍全，有点失误

user: user-1
content: 看不太清楚，前面一句是否少了  ;