Code:
ghilenhLCD(0xC5);
[COLOR="#FF0000"]while(menu==0);[/COLOR]
caidatgio:[COLOR="#FF0000"]while(tang!=0 && giam!=0 && menu!=0);[/COLOR]
if(tang==0)
{
gio++;
if(gio==24) gio=0;
ghilenhLCD(0xC4);
ghiso(gio);
ghilenhLCD(0xC5);
delay(300);
goto caidatgio;
}
if(giam==0)
{
gio--;
if(gio==0xff)
gio=23;
ghilenhLCD(0xC4);
ghiso(gio);
ghilenhLCD(0xC5);
delay(300);
goto caidatgio;
}
////////////////////////////////////////////
[COLOR="#FF0000"]while(menu==0);[/COLOR]
ghilenhLCD(0xC8);
caidatphut: [COLOR="#FF0000"]while(tang!=0 && giam!=0 && menu!=0);[/COLOR]
if(tang==0)
{
phut++;
if(phut==60) phut=0;
ghilenhLCD(0xC7);
ghiso(phut);
ghilenhLCD(0x10);
delay(300);
goto caidatphut;}
if(giam==0)
{
phut--;
if(phut==0xff)
phut=59;
ghilenhLCD(0xC7);
ghiso(phut);
ghilenhLCD(0x10);
delay(300);
goto caidatphut;
}

Comment