void sys_init()
{
SCON = 0x50; /* SCON: mode 1, 8-bit UART, enable rcvr */
TMOD = 0x21; /* TMOD: timer 1, mode 2, 8-bit reload */
TH1 = 0xfa; /* TH1: reload value for 4800 baud @ 11.059MHz */
TR1 = 1; /* TR1: timer 1 run */
spd_type=1; //速度单位km/h
LCMInit(); //初始化LCD
DisplayListChar(0,0,"GPS Monitor V1.2");
Delay400Ms();
LCD_cls();
IE=0x90; //开总中断、串口中断
}
|