单片机技术网|技术阅读
登录|注册

您现在的位置是:单片机技术网 > 技术阅读 > 基于51的单片机GPS定位系统设计

基于51的单片机GPS定位系统设计

.

   51GPS51+GPS+LCD12864+LED+3.3V+线

.

151(STC89C51/52AT89C51/52AT90C51/52)GPS线

2LCD12864

33LEDGPSGPRNC绿GPGGA


.

1AD,

2PCB

.

/**************************************** /****************************************/void main(void){ uchar error_num = 0;
Uart_Init(); // Lcd_Init(); //LCD GPS_Init(); //GPS rev_stop=0; REV_NO; while(1) { if (rev_stop) // { TR0 = 1; // REV_YES; if (change_page % 2 == 1) // { if (GPS_GGA_Parse(rev_buf, &GPS)) //GPGGA { GGA_YES; GPS_DisplayTwo(); // error_num = 0; gps_flag = 0; rev_stop = 0; REV_NO; } else { error_num++; if (error_num >= 20) //20 { GGA_NO; error_num = 20; GPS_Init(); // } gps_flag = 0; rev_stop = 0; REV_NO; }
} else { if (GPS_RMC_Parse(rev_buf, &GPS)) //GPRMC { RMC_YES;
GPS_DisplayOne(); //GPS error_num = 0; gps_flag = 0; rev_stop = 0; led1 = 1; } else { error_num++; if (error_num >= 20) //20 { RMC_NO; error_num = 20; GPS_Init(); // } gps_flag = 0; rev_stop = 0; REV_NO; } } } }}