>
seksot + +; (seksot == 100)
{seksot = 0; sec + +; (60 == sek)
{= 0; min + +;}
if (60 == min)
{= 0;
{+ +; (24 == hour) {hour = 0;}
}
} [0] = n +0 x30; [6] = hour/10 +0 x30; [7] = hour% 10 +0 x30; [8] = min/10 +0 x30;
lcd2 [9] = min% 10 +0 x30; [10] = sek/10 +0 x30; [11] = sec% 10 +0 x30;
// send LCD (sec <12) {e = 0; rs = 0; P1 = lcd1 [sec] &0x0f; e = 1; delay (255); e = 0; rs = 0; P1 = ((lcd1 [sec] & 0xf0)>> 4); e = 1;} if (sec <40) {e = 0; rs = 0; P1 = 0; e = 1; delay (255); e = 0; rs = 0; P1 = 2; e = 1;} if (sec <52) {e = 0; rs = 0; P1 = lcd2 [sec] &0x0f; e = 1 ; delay (255); e = 0; rs = 0; P1 = ((lcd2 [sec] & 0xf0)>> 4); e = 1;}
if (sec == 99) {e = 0; rs = 0; P1 = 1; e = 1;}// reset lcd
}/* end Function interrupt timer0 */main (void)
{
SCON = 0x50 ;//obmen 8bit takt for timer1
TH1 = 0xFD; = 0;/* time 1s */= 0xd8;/* set timer0 = 55635 */= 0xef;
TMOD = 0x21;/* 1 regim */= 1;/* enable interrupt timer0 */= 0;/* priority = 0 */= 1;/* enable interrupt */= 1; = 1; = 1;/* start timet0 */(1)
{(iware) ;//ogidanie klucha; (fok)
{write (0x33); (j = 0; j <8; j + +)
{(); [j] = iw;
} = 0;
fok = 0; nkey = 11; (n = 0; n <10; n + +)
for (j = 0; j <6; j + + ;) (dat [j + n * 12] == dat1 [j]) fok = 1; else {fok = 0;;}
if (fok) {nkey = n;} = 0; P1 = 0xFE; (key! = 12) && (n <6) (i = 0; i <6; i + + )
{(key == 0) = key (! P3 ^ 3) {dat [6 + n1] = j; key = j; n1 + +;} if (! P3 ^ 4) {dat [ 6 + n1] = j * 2; key = j * 2; n1 + +; (key == 11) n1 -;} = P1 <<1;
} = 0;
for (j = 6; j <12; j + + ;)
{(dat [j + n * 12] == dat1 [j]) fok = 1;
else {fok = 0;
} (fok) {SBUF = n; poz = 0; ^ 7 = 1; for (i = 0; i <2000; i + +) delay (200); P3 ^ 7 = 0;} // vse sovpalo na 2 sek open door
}
}
}
}