/ TI: set TI to send first char of UART = 1;
# endif
// --- Setup the timer 0 interrupt = 0xdb;// set timer period 10ms = 9216 tik T0 - 11.0592MHz = 0xff; = TMOD | 0x01;// select mode 16 січня bit Timer = 1;// start timer 0 = 1;// enable timer 0 interrupt = 1;// global interrupt enable (1)
{//Opredelenie napravlenia (napr == 0)
{= 1; nd2 = 1; (dlin! = 0); = 1; = 56;// zapros na sleduychii hag
} (napr == 1)
{= 0; nd2 = 0; (dlin! = 0); = 1; = 56;
} (napr == 2)
{= 0; nd2 = 1; = 8;; ile (dlin! = 0); = 1; = 57;// zapros povorota nalevo
} (napr == 3)
{= 1; nd2 = 0; = 8; (dlin! = 0);
pausa = 1; = 58;// zapros povorota napravo
}
if (! k1) pausa = 0;// Button Pause
{= 1; = 0; = 4;
} {! k3}// Button BACK
{= 1; = 1; = 4;
} ((! k2) && (! k3))// Two buttons - Turn to the right
{= 1; = 2; = 4;
}
// Pri stolknovenii - TWO, LEFT, RIGHT - Bamper - dvigenie BACK ((! bampl) && (! bampr))
{= 60;// zapros prepynstvie FRONT = 1; = 4;
} ((bampl) && (! bampr))
{= 61;// zapros prepynstvie RIGHT = 1; = 4;
} ((! bampl) && (bampr))
{= 62;// zapros prepynstvie LEFT = 1; = 4;
}
// Vivod information na lcd (pausa)
{(i = 0; i <5 i + +) [i] = lcd1 [i];// pause (i = 0; i <4 i + +) [i] = lcd3 [i];// time [ 15] = min% 10 +0 x30;// minuts
lcddate1 [14] = min/10 +0 x30; ((sek% 2) == 0)) lcddate1 [13] = 0x3A;// : span> lcddate1 [13] = 0x20;
lcddate1 [12] = hour% 10 + 0x30;
lcddate1 [11] = hour/10 + 0x30; (i = 0; i <8 i + +) [i] = lcd4 [i];// distance [15] = lcd5; [14] = put% 10 +0 x30;
lcddate2 [13] = put/10 +0 x30; [12] = put/100 +0 x30;
}
{(i = 0; i <6 i + +) [i] = lcd2 [i];// active (i = 6; i <40 i + +) [i] = 0x20; (i = 0; i <40 i + +) [i] = 0x20;
} (j = 0; j <4; j + +)// init lcd
{= 0; = 1; = 1; ((P1 & 0x80)! = 0)
{E = 0; E = 0; E = 1; E = 1;};// ogid...