【正文】
I 基于 51 單片機(jī)的 GPS 接收機(jī) 摘 要 全球定位系統(tǒng) (GPS)是由美國國防部開發(fā)的一種先進(jìn)的無線電導(dǎo)航系統(tǒng)。該系統(tǒng)能夠全天候、全方位的為海陸空用戶提供連續(xù)的、高精度的三維坐標(biāo)、三維速度和時(shí)間等信息。它所具有的諸多優(yōu)點(diǎn)是其他導(dǎo)航設(shè)備所無法比擬地?,F(xiàn)在, GPS接收機(jī)作為一種先進(jìn)的導(dǎo)航和定位儀器,已在軍事及民用領(lǐng)域得到廣泛的應(yīng)用。 本設(shè)計(jì)詳細(xì)介紹了一種成本低又能滿足性能使用要求的經(jīng)濟(jì)型 GPS 接收機(jī)的設(shè)計(jì)方案。此方案基于單片機(jī)、 GPS模塊和 1602液晶顯示屏等硬件 , 并應(yīng)用 C語言實(shí)現(xiàn)了 GPS 信號(hào)的提取、顯示 及基本的鍵盤控制操作等。經(jīng)過實(shí)踐測試 ,這種接收機(jī)可以達(dá)到基本 GPS 信息接收以及顯示,可以做到體積小、精度高、連續(xù)導(dǎo)航,并可廣泛應(yīng)用于個(gè)人野外旅游探險(xiǎn)、 出租汽車定位及海上作業(yè)等領(lǐng)域。 關(guān)鍵詞: GPS,單片機(jī), 接收 機(jī), GR87, LCD II DESIGN OF GPS RECEIVER BASED ON 51 SINGLE CHIP COMPUTER ABSTRACT Global Positioning System(GPS) is the most advanced radio navigation system which was developed by the Department of Defence. The system can be used under any weather conditions, all day long and anywhere on the earth. It can provide land, marine and airborne user with continuous, highly accurate threedimension position, velocity, time dataetc. It has various advantages that are unexampled other kind of navigation equipment. Now GPS receivers, as a type of advanced equipment on navigation and positioning, have been widely used in both military and civil field. This design introduced in detail one kind of lowcost economy GPS receiver39。s design proposal which can satisfy the performance operation requirements .This plan is based on single chip puter、 GPS and 1602 liquid crystal display monitors, and has realized the GPS signal extraction, the demonstration and the basic keyboard control operation and so on using the C language. By practical measurement, the receiver can achieve GPS information receive and display. It has small size and low cost, can be used in wild adventure tourism, taxi positioning and operations at sea. KEY WORDS: GPS, single chip puter, receiver, GR87, LCD 1 目 錄 前 言 ....................................................................................................... 3 第 1 章 GPS 系統(tǒng)簡介及設(shè)計(jì)方案選擇 ............................................... 5 GPS 系統(tǒng)簡介 ............................................................................. 5 GPS 由來及發(fā)展 ................................................................ 5 GPS 定位基本原理 ............................................................ 5 GPS 接收機(jī)定位流程 ....................................................... 5 任務(wù)的描述 ....................................................................... 6 設(shè)計(jì)方案選擇 ............................................................................. 6 方案一 ................................................................................ 6 方案二 ................................................................................. 6 第 2 章 系統(tǒng)硬件設(shè)計(jì) ............................................................................ 8 單片機(jī) .......................................................................................... 8 GPS 模塊 ....................................................................................... 9 概述 .................................................................................... 9 主要技術(shù)參數(shù) ................................................................... 9 管腳介紹 ........................................................................... 9 顯示部分 ................................................................................... 10 電源部分 ....................................................................................11 晶體振蕩器 ................................................................................11 鍵盤部分 ................................................................................... 12 第 3 章 系統(tǒng)相關(guān)協(xié)議介紹 .................................................................. 13 GR87 協(xié)議 ................................................................................ 13 協(xié)議簡介 ......................................................................... 13 數(shù)據(jù)格式 ......................................................................... 13 串行通信 .................................................................................... 14 異步通信特點(diǎn) ................................................................. 14 異步通信協(xié)議 ................................................................. 14 中斷 .................................................................................. 15 液晶顯示協(xié)議 ........................................................................... 18 2 基本 操作時(shí)序 .................................................................. 18 顯示與控制命令 .............................................................. 19 第 4 章 系統(tǒng)軟件設(shè)計(jì) .......................................................................... 21 系統(tǒng)軟件概述 ............................................................................ 21 軟件程序的編寫 ........................................................................ 22 初始化模塊 ..................................................................... 22 數(shù)據(jù)處理模塊 ................................................................. 22 人機(jī)對(duì)話模塊 ................................................................. 26 代碼實(shí)現(xiàn) ................................................................................... 28 結(jié) 論 ....................................................................................................... 30 謝 辭 ....................................................................................................... 31 參考文獻(xiàn) ................................................................................................. 32 外文資料翻譯 ........................................................................................ 33 3 前 言 GPS 主系統(tǒng)是 美國 發(fā)射運(yùn)行的衛(wèi)星系統(tǒng),包含了 27 顆能持續(xù)發(fā)送地理位置海拔高度和時(shí)間信號(hào)的衛(wèi)星, 24 個(gè)正常使用, 3 個(gè)備用,這些衛(wèi)星平均分布 運(yùn)行在六個(gè)軌道上。一般來說,在地面上的 GPS 接收器能接收 5~ 12 個(gè)衛(wèi)星信號(hào),而為了獲得地面上的定位坐標(biāo), GPS 導(dǎo)航至少需要 4 個(gè)衛(wèi)星信號(hào),三個(gè)用來確定 GPS 接收器的緯度、經(jīng)度和海拔高度,第四個(gè)則提供同步校正時(shí)間 [1]。 全球定位系統(tǒng)由三部分構(gòu)成:太空衛(wèi)星部份:由 24 顆繞極使用衛(wèi)星所組成,分成六個(gè)軌道,運(yùn)行于約 20200 公里的高空,繞行地球一周約 12 小時(shí)。每個(gè)衛(wèi)星均持續(xù)