Time_0() interrupt 1
{
if (--time1==0)
{
time1=set_time1;
if (--time2==0)
{
flagC=1;
TR0=0;
}
}
}
Time_1() interrupt 3
{
if(++dem_taoxung>=taoxung)
{
dem_taoxung=0;
if (tocdo_dcTrai!= dung)
{if (chieuquaydcTrai) {dkdcTrai_f=1;dkdcTrai_b=0;} else {dkdcTrai_f=0;dkdcTrai_b=1;}}
if (tocdo_dcPhai!=dung)
{if (chieuquaydcPhai) {dkdcPhai_f=1;dkdcPhai_b=0;} else {dkdcPhai_f=0;dkdcPhai_b=1;}}
if (tocdo_dcNang!=dung)
{if (chieuquaydcNang) {dkdcNang_f=1;dkdcNang_b=0;} else {dkdcNang_f=0;dkdcNang_b=1;}}
if (tocdo_dcGap!=dung)
{if (chieuquaydcGap) {dkdcGap_f=1;dkdcGap_b=0;} else {dkdcGap_f=0;dkdcGap_b=1;}}
}
if (dem_taoxung>=tocdo_dcTrai) {dkdcTrai_f=0;dkdcTrai_b=0;}
if (dem_taoxung>=tocdo_dcPhai) {dkdcPhai_f=0;dkdcPhai_b=0;}
if (dem_taoxung>=tocdo_dcNang) {dkdcNang_f=0;dkdcNang_b=0;}
if (dem_taoxung>=tocdo_dcGap) {dkdcGap_f=0;dkdcGap_b=0;}
++demgiay;
{if (++time>=10000)
{
time=0;
++demgiay;
if (++giay>=60)
{
giay=0;
++phut;
}
}
}
}
các bác cho em hoi đoạng trương trinh này vi sao cứ báo lỗi syntax error enaer'='
{
if (--time1==0)
{
time1=set_time1;
if (--time2==0)
{
flagC=1;
TR0=0;
}
}
}
Time_1() interrupt 3
{
if(++dem_taoxung>=taoxung)
{
dem_taoxung=0;
if (tocdo_dcTrai!= dung)
{if (chieuquaydcTrai) {dkdcTrai_f=1;dkdcTrai_b=0;} else {dkdcTrai_f=0;dkdcTrai_b=1;}}
if (tocdo_dcPhai!=dung)
{if (chieuquaydcPhai) {dkdcPhai_f=1;dkdcPhai_b=0;} else {dkdcPhai_f=0;dkdcPhai_b=1;}}
if (tocdo_dcNang!=dung)
{if (chieuquaydcNang) {dkdcNang_f=1;dkdcNang_b=0;} else {dkdcNang_f=0;dkdcNang_b=1;}}
if (tocdo_dcGap!=dung)
{if (chieuquaydcGap) {dkdcGap_f=1;dkdcGap_b=0;} else {dkdcGap_f=0;dkdcGap_b=1;}}
}
if (dem_taoxung>=tocdo_dcTrai) {dkdcTrai_f=0;dkdcTrai_b=0;}
if (dem_taoxung>=tocdo_dcPhai) {dkdcPhai_f=0;dkdcPhai_b=0;}
if (dem_taoxung>=tocdo_dcNang) {dkdcNang_f=0;dkdcNang_b=0;}
if (dem_taoxung>=tocdo_dcGap) {dkdcGap_f=0;dkdcGap_b=0;}
++demgiay;
{if (++time>=10000)
{
time=0;
++demgiay;
if (++giay>=60)
{
giay=0;
++phut;
}
}
}
}
các bác cho em hoi đoạng trương trinh này vi sao cứ báo lỗi syntax error enaer'='
Comment