ed char lcd2 [] = {0,0,0,0,0,0,0,0,0,0,0};// lcd 1 str
unsigned char dat [] = {0,0,0,0,0,0};// klaviw;
unsigned char dat1 [] = {0xDD, 0x05, 0xEC, 0xAD, 0x35, 0xb9, 0,3,6,9,7,1}; char dat1 [] = {0xD1, 0x05, 0xEC, 0xAD, 0x35, 0xb9, 0xF9, 0x0D, 0xFD, 0x5D, 0x12}; char dat1 [] = {0xD2, 0x05, 0xE2, 0xAD, 0x35, 0xb0, 0xF9, 0x0D, 0xFD, 0xBD, 0x67}; char dat1 [] = {0xDD, 0x05, 0xEC, 0xAD, 0x35, 0xb9, 0xF9, 0x0D, 0xFD, 0xBD, 0xDE}; char dat1 [] = {0xDA, 0x05, 0xEC, 0xAD, 0x35, 0xb9, 0xF9, 0x0D, 0xFD , 0x2D, ​​0xAA}; char dat1 [] = {0xD6, 0x05, 0xEC, 0xA5, 0x35, 0xb9, 0xF1, 0x0D, 0xFD, 0x1D, 0x01}; char dat1 [] = {0xAA, 0x05, 0xEC, 0xAD, 0x35 , 0xb9, 0xF9, 0xAA, 0xFD, 0xBD, 0x0F}; char dat1 [] = {0xCC, 0x05, 0xEC, 0xAD, 0x35, 0xb9, 0xF9, 0x0D, 0xFD, 0xBD, 0x02}; char dat1 [] = {0xC1 , 0x05, 0xEC, 0xAD, 0x35, 0xb9, 0xF9, 0x0D, 0xFD, 0xBD, 0x0A}; char dat1 [] = {0xA1, 0x05, 0xEC, 0xAD, 0x32, 0xb9, 0xF9, 0x0D, 0xAA, 0xBD, 0x03} ; char dat1 [] = {0x11, 0x05, 0xEC, 0xAD, 0x35, 0xb9, 0xF9, 0x0D, 0xFD, 0xBD, 0x09};
void delay (void char t)
{
unsigned char dd; (dd = 0; dd
} reset (void)
{
if (! iware) delay (100) ;//esli linia = 0 timeout 500mks = 0; (iware)// start proc
{iware = 0;
delay (100);// timeout 500mks = 1; (14) ;//timeout 70 mks (! iware)
{
delay (100);// 500mks (iware) {fok = 1;}
}
}
} readiw (void)// read IWare
{char pp, nn;
pp = 0; (nn = 0; nn <8; nn + +)
{= 0; delay (3);// start obmena bit = 1; delay (6);// +30 mks dla chtenia = iware; pp = pp> 1; (14); iware = 1, (3);} = pp ;//save rezultat
}
void writeiw (void char t)// read IWare
{unsigned char pp, nn;
pp = t; (nn = 0; nn <8; nn + +)
{
iware = 0; delay (3); = pp> 1; iware = CY;
delay (20); iware = 1, (3);
}
}
void uart (void) interrupt 4 using 2
{
if (RI)
{(SBUF == 0xff) {P3 ^ 7 = 1; for (i = 0; i <2000; i + +) delay (200); P3 ^ 7 = 0;}// vse sovpalo na 2 sek open door (SBUF == 0) {sec = 0; min = 0; chas = 0;} (TI)
{TI = 0; (+ + step <12)
}
}
void timer0 (void) interrupt 1 using 2/* Function interrupt timer0 */
{
TH0 = 0xd8;/* set timer0 = 55539 */= 0xf3;