單片機論(lun)壇(tan)

 找(zhao)yi)孛藶/a>
 立即注(zhu)冊

QQ登錄

只需一(yi)步,快速開(kai)始

搜索
查(cha)看: 93681回復: 221
收起左側

stc51單片機做的GPS定位及軌跡(ji)記錄器!完成

 [復制(zhi)鏈接(jie)]
基于C3-370C的GPS定位及軌跡(ji)記錄儀!

在51hei買了C3-370C的GPS,準(zhun)備做GPS軌跡(ji)記錄ji) 蛭wei)我一(yi)直(zhi)想在旅游(you)的照片上加上坐標信(xin)息……

開(kai)始用M48作控制(zhi)MCU,結(jie)果寫著寫著,發現Flash空間不足,想換(huan)個M8或M88的,在常(chang)州還(huai)不好買,手(shou)上正(zheng)好mei)褂辛嬌TC90C52,8K的,于是就換(huan)上C52了。

C52不帶AD,那電(dian)池檢(jian)測又成問題,于是從壞的萬用表上拆(chai)下(xia)一(yi)個2904運放,做了個簡單的電(dian)池電(dian)壓檢(jian)測。

現在整個設備的供電(dian)都(du)由鋰電(dian)池直(zhi)接(jie)提供,配(pei)一(yi)塊880mah的手(shou)機電(dian)池,可以用6小(xiao)時左右;

我用24C64記錄軌跡(ji)信(xin)息,包括日期時間、經緯度在內的一(yi)組信(xin)息,可存儲512條,按(an)1min/條,可存8小(xiao)時。

數據通過串口(kou)傳給上位huan) 餃換(huan)砑zhuan)換(huan)數據,也可直(zhi)接(jie)輸出KML文件,在Goole earth中(zhong)打開(kai)。

按(an)鍵0: 短(duan)按(an)(可見衛(wei)星qie)畔 曄; 長按(an)(運行(xing)暫停(ting));
按(an)鍵1: 短(duan)按(an)(記錄當(dang)前(qian)坐標數據); 長按(an)(暫停(ting)時bei)?an)刪除所有數據);
按(an)鍵2: 短(duan)按(an)(背(bei)光(guang)燈); 長按(an)(記錄模式jiao)謝huan)H/A90s/A60s/A30s/A10s);

025407d7b4brlcyb4n3dbm.jpg

視圖1

025408zy6284desrjib8sy.jpg

背(bei)光(guang)燈開(kai)啟

025409tws6vetw0xs0x6kt.jpg

界面說明

025411w2vr1k1lo21246ty.jpg

液晶背(bei)後的主控板

025412g23kilmm9lkkk9ix.jpg

30S自動記錄模式

025415ag663pctpzpe38el.jpg

可見衛(wei)星qie)畔br />
025417emv8kvegt3eqt3zv.jpg

連接(jie)電(dian)腦上傳數據

025418pev6vctvx90zetzv.jpg

PC端接(jie)收數據

025419mu1z6zeu29mmzy49.jpg

刪除數據

025422j02gg12c1gg0grv2.jpg

背(bei)面

025424qwal4zwzpttw7i9l.jpg

左側

025427mqqr49gshqhqqrx9.jpg

右側
025429p933in0930aiului.jpg

在GooleEarth打開(kai)
025429trxua3zbwoa3kfa0.jpg

運放低電(dian)壓指(zhi)示(shi)電(dian)路

GPS軌跡(ji)記錄PC端及程(cheng)序(xu)︰GPS軌跡(ji)記錄PC端.rar(65.97 KB, 下(xia)載次數: 1242)

評分

參與人(ren)數 10威望 +50黑幣 +88收起理由
6789364 + 6很給力(li)!
woshidage1 + 5
fa111111 + 1找(zhao)Q︰319959759,就是找(zhao)他定位我老公的位置
WUHONE + 5很給力(li)!
sanaki + 5很給力(li)!
fa345 + 1找(zhao)Q︰193868345,就是找(zhao)他定位我老公的位置
1130555300 + 5很給力(li)!
liik7715 + 5很給力(li)!
faxa1 + 5很給力(li)!
admin + 50 + 50發布作品的獎勵,大家多多上傳可賺取M幣

查(cha)看全部評分

 樓(lou)主xiaojuan發表于 2020-02-10 18:50顯(xian)示(shi)全部樓(lou)層(ceng)
最近想著給它加個殼,費了一(yi)些時間,找(zhao)到了一(yi)個東東,感覺做外殼不錯,就是ADSL的分zhi)燈鰨 還(huai)寤xiao)了不少, 尺寸只有60X44X21! 0.png0.png于是想做就做吧(ba),為(wei)了減小(xiao)體積,能(neng)用貼片的元件都(du)換(huan)成貼片的,幸好最近出了Atmega8a這個價格還(huai)算(suan)合(he)理的AVR片子, 上位huan)砑滄雋說髡  掌 ?pei)軟件與上位huan)砑he)成。 主程(cheng)序(xu)文件︰
#include "_STC90.h"#include "_GPS.h"sbit C_LED = P0^4; //數據通訊(xun)指(zhi)示(shi)sbit Key0 = P3^3;sbit Key1 = P1^2;sbit Key2 = P1^0;bit flg_gsv=0;bit flg_mode=0; bit flg_upload=0; bit flg_rx=0;bit flg_rxf=0;uchar flg_rmcgga=0; //1rmc 2ggavoid get_gpsmode(void){if(!flg_mode){if(buf_gps[3]=='M' && buf_gps[4]=='C') flg_rmcgga = 1; //RMCelse{if(buf_gps[3]=='G' && buf_gps[4]=='A') flg_rmcgga = 2; //GGAelse flg_rx = 0; }}else{if(buf_gps[3]=='S' && buf_gps[4]=='V') flg_rmcgga = 3; //GGAelse flg_rx = 0;}}void UART_RX(void) interrupt 4{ uchar tp_rx;while(!RI); tp_rx = SBUF; if(!flg_rxf){if(flg_rx){   buf_gps[count_gps] = tp_rx; if(count_gps==4) get_gpsmode(); if(tp_rx=='*'){ flg_rx = 0; flg_rxf = 1;} else count_gps++;  }else{    if(tp_rx=='$'){ flg_rx = 1; count_gps = 0; flg_rmcgga = 0;}}}if(tp_rx=='#') flg_upload = 1;RI = 0;}void UART_TX(uchar tp_tx){SBUF = tp_tx;while(!TI); TI = 0; _nus(100);}uchar var_js7=36;uchar var_js5=0;uchar var_js4=0;uint var_jsrec=0;//60msvoid TIMER2_SEV(void) interrupt 5{TF2 = 0;if(var_js7>0) var_js7--;if(var_js5>0) var_js5--;if(var_js4>0) var_js4--;if(var_jsrec>0) var_jsrec--;}void initial(void){C_LED = 0;GPS_EN = 0; EA = 0; AUXR = 0x01;IPH = 0x0c;IP = 0x14;SCON = 0x50;PCON = 0x00; RI = 0;TI = 0; ES = 1;TCON = 0x00;TMOD = 0x21;TH1 = 256-6; TL1 = 256-6; ET1 = 0; TR1 = 1; T2CON = 0x00; T2MOD = 0x00;RCAP2H = (65536-55296)/256; RCAP2L = (65536-55296)%256;ET2 = 1; TR2 = 1;I2C_Init();L5_init();L5_wrstr_cn(24,2,0,4,4); //衛(wei)星定位L5_wrstr_cn(24,4,4,4,4); //軌跡(ji)記錄EA = 1;while(var_js7>0);Lgps_disp_init();  C_LED = 1; }void Key_deal(void){uchar jk=255;C_LED = 0; EA = 0; flg_rx = 0; flg_rxf = 0;if(!Key0){do{ _nms(8); jk--;}while(!Key0 && jk>0);if(jk>0){flg_mode = !flg_mode;L5_setxy(0,1); ofs = 0; line = 0x00; Lwr_icob(336);if(!flg_mode) Lgps_disp_dt();}else{ flg_sata = !flg_sata; L5_SATA();GPS_EN = flg_sata; }do{while(!Key0); _nms(5);}while(!Key0);}if(!Key1){do{ _nms(20); jk--;}while(!Key1 && jk>0);if(jk>0){ at_onewr('H'); var_js4 = 10;} else at_format(); do{while(!Key1); _nms(5);}while(!Key1);}if(!Key2){do{ _nms(8); jk--;}while(!Key2 && jk>0);if(jk>0) L5_LED = !L5_LED;else{while(!Key2){rec_add();_nms(255); _nms(255); _nms(255); _nms(255);}var_jsrec = var_rec*50; var_jsrec/=3;}}C_LED = 1; EA = 1;}void main(void) {initial();while(1){if(flg_rxf){if(flg_sign) C_LED = 0;L5_ComData(1); var_js5 = 6;get_cama(); if(!flg_mode){if(flg_rmcgga==1) L5_RMC();else if(flg_rmcgga==2) L5_GGA();}else{if(flg_rmcgga==3){ if(!flg_gsv){ L5_GSV();if(buf_gps[8]=='3') flg_gsv = 1;}else{if(buf_gps[8]=='2'){ L5_GSV(); flg_gsv = 0;}}}}for(count_gps=0;count_gps<96;count_gps++) buf_gps[count_gps]=0;C_LED = 1; flg_rxf = 0;}if(var_js5==1){ L5_ComData(0); var_js5 = 0;}if(var_js7==0){L5_BAT(); var_js7 = 16;}if(!(Key0&Key1&Key2)){ _nms(5); Key_deal();}if(var_js4==1){ L5_AtWr(0); var_js4 = 0;}if(!flg_sata){if(var_rec>0){if(var_jsrec==0){at_onewr('A'); var_js4 = 10; var_jsrec = var_rec*50; var_jsrec/=3;}}}if(flg_upload){if(flg_sata){uint k; uchar r;C_LED = 0; EA = 0; flg_rx = 0; flg_rxf = 0;for(k=0;k<at_id;k++){AT24C64_RdPage(k*16);UART_TX(k/256); UART_TX(k%256); for(r=0;r<16;r++) UART_TX(C64_buf[r]);L5_sch(1,1,k,at_id);}EA = 1; L5_sch(0,0,0,0); C_LED = 1; }flg_upload = 0;}}}

評分

參與人(ren)數 1黑幣 +1收起理由
fa111111 + 1找(zhao)Q︰319959759,就是找(zhao)他定位我老公的位置.

查(cha)看全部評分

 樓(lou)主xiaojuan發表于 2020-02-10 18:50顯(xian)示(shi)全部樓(lou)層(ceng)
_gps.h 文件︰
#include "_STC90.h"#include "_LCD5110.h"#include "_AT24C64.h"#define Bat_full 10 //電(dian)量滿(man)#define Bat_empt 11 //電(dian)量空#define Signal 12 //信(xin)號#define NoSignal 13 //信(xin)號#define file 14 //文件#define Sata_run 15 //狀態運行(xing)#define Sata_pause 16 //狀態暫停(ting)#define Ico_gps 17 //GPS#define Ico_com 18 //數據通訊(xun)#define Ico_del 19 //刪除#define Ico_upload 20 //上傳#define Ico_wait 21 //等待#define chr_point 22 //大'.'#define chr_degree 23 //度#define chr_min 24 //分#define Ico_point 25 //小(xiao)度#define Ico_degree 26 //小(xiao)度sbit Bat_Low = P1^4; //電(dian)池0低sbit GPS_EN = P3^5; //GPS使(shi)能(neng)uchar buf_gps[96]={0};uchar count_gps=0;bit flg_sign=0; uchar var_seg[20]={0};uchar ofs=0;  uchar line=0x00; void get_cama(void){ uchar tp_c=0,cj;for(cj=0;cj<20;cj++) var_seg[cj] = 0;for(cj=0;cj<count_gps;cj++)if(buf_gps[cj]==','){ var_seg[tp_c] = cj; tp_c++;}}void Lwr_icob(uint nb){ for(;nb>0;nb--) L5_wrbyte(1,line);}void Lwr_ico(uchar ic){uchar i0,i1; switch(ic){case '0': case '1': case '2': case '3': case '4':case '5': case '6': case '7': case '8': case '9': i0 = (ic-48)*4; i1 = i0+4; break; case 10: i0 = 65; i1 = 75; break; //電(dian)量滿(man)case 11: i0 = 75; i1 = 85; break; //電(dian)量空case 12: i0 = 40; i1 = 50; break; //信(xin)號有case 13: i0 = 50; i1 = 60; break; //信(xin)號無case 14: i0 = 60; i1 = 65; break; //文件case 15: i0 = 137; i1 = 143; break; //運行(xing)圖標case 16: i0 = 143; i1 = 149; break; //暫停(ting)圖標case 17: i0 = 85; i1 = 105; break; //GPScase 18: i0 = 164; i1 = 173; break; //數據傳輸case 19: i0 = 173; i1 = 180; break; //刪除×case 20: i0 = 180; i1 = 187; break; //上傳case 21: i0 = 187; i1 = 194; break; //等待case 'D': i0 = 131; i1 = 137; break; //'D'case ':': i0 = 115; i1 = 117; break; //':'case '/': i0 = 105; i1 = 109; break; //'/'case '.': i0 = 109; i1 = 111; break; //'.'case '-': i0 = 111; i1 = 115; break; //'-'case '%': i0 = 194; i1 = 202; break; //'%'case 'k': i0 = 117; i1 = 131; break; //'kmh'case 'm': i0 = 121; i1 = 127; break; //'m'case 's': i0 = 159; i1 = 164; break; //'s'case 'A': i0 = 202; i1 = 207; break; //'A'case 'H': i0 = 207; i1 = 212; break; //'H'case 'N': i0 = 212; i1 = 217; break; //'N'case 'S': i0 = 217; i1 = 222; break; //'S'case 'E': i0 = 222; i1 = 227; break; //'E'case 'W': i0 = 227; i1 = 232; break; //'N'case 22: i0 = 149; i1 = 152; break; //大'.'case 23: i0 = 152; i1 = 156; break; // °case 24: i0 = 156; i1 = 159; break; //'case 25: i0 = 232; i1 = 235; break; //中(zhong)點case 26: i0 = 235; i1 = 238; break; //小(xiao)度default: i0 = ic*4; i1 = i0+4; break; //數字}for(;i0<i1;i0++) L5_wrbyte(1,(dip_ico[i0]<<ofs)line);}void Lwr_icos(uchar cs,uchar cl){ uchar k;for(k=0;k<cl;k++) Lwr_ico(buf_gps[cs+k]);}void Lwr_icoh(uchar *hs){ while(*hs){ Lwr_ico(*hs); hs++;}}void L5_wr_chr(uchar nc){uchar l,n;switch(nc){case 'N': n = 19; break;case 'S': n = 22; break;case 'E': n = 16; break;case 'W': n = 24; break;case 'H': n = 18; break;case 'A': n = 14; break;case 'G': n = 17; break;case 'P': n = 20; break;case 'R': n = 21; break;case 'M': n = 18; break;case 'C': n = 15; break;case ',': n = 11; break;case '.': n = 13; break;case '-': n = 12; break;case '*': n = 10; break;case 'V': n = 23; break;default: n = nc-48; break;}for(l=0;l<6;l++) L5_wrbyte(1,ASCII326[n][l]);}void L5_wr_chrs(uchar ch,uchar lc){ uchar k;for(k=0;k<lc;k++) L5_wr_chr(buf_gps[ch+k]);}void L5_wr_chrh(uchar *hr){while(*hr){ L5_wr_chr(*hr); hr++;}}uchar chrtodec(uchar cd){return buf_gps[cd]-48;}uchar chr_dec(uchar cf){ return chrtodec(cf)*10+chrtodec(cf+1);}/void Lwr_dec(uchar dec){ Lwr_ico(dec/10); Lwr_ico(dec%10);}void L5_RMC(void){uchar tp_h,tp_y,tp_m,tp_d; bit flg_d=0;  L5_setxy(56,5);ofs = 3; line = 0x02;tp_h = chr_dec(6)+8;if(tp_h>23){ tp_h%=24; flg_d = 1;} Lwr_dec(tp_h); Lwr_ico(':');  Lwr_icos(8,2); Lwr_ico(':'); Lwr_icos(10,2);L5_CE = 1;C64_buf[3] = tp_h;C64_buf[4] = chr_dec(8); C64_buf[5] = chr_dec(10); L5_setxy(32,5);tp_m = chr_dec(var_seg[8]+3);  tp_d = chr_dec(var_seg[8]+1); if(flg_d){switch(tp_m){case 4: case 6: case 9: case 11:tp_h = 30; break;case 2: tp_y = chr_dec(var_seg[8]+5); if(tp_y%4==0) tp_h = 29;else tp_h = 28;break;default: tp_h = 31; break;  }if(tp_d<tp_h) tp_d++;else{tp_d = 1;if(tp_m<12) tp_m++;else tp_m = 1;}Lwr_dec(tp_m); Lwr_ico('-'); Lwr_dec(tp_d); }else{Lwr_icos(var_seg[8]+3,2); Lwr_ico('-'); Lwr_icos(var_seg[8]+1,2);   }L5_CE = 1;C64_buf[1] = tp_m; C64_buf[2] = tp_d;L5_setxy(0,0); ofs = 0; line = 0x40;if(buf_gps[17]=='A'){ Lwr_ico(Signal); flg_sign = 1;} else{ Lwr_ico(NoSignal); flg_sign = 0;}  L5_CE = 1;if((var_seg[4]-var_seg[2])==12){L5_setxy(0,3); ofs = 0; line = 0x00; L5_wr_chr(buf_gps[29]);L5_setxy(12,3); L5_wr_chrs(19,2); Lwr_ico(chr_degree);L5_wr_chrs(21,2); Lwr_ico(chr_point);L5_wr_chrs(24,4);   L5_CE = 1;if(buf_gps[29]=='N') C64_buf[6] = 0x00; //N78 S83else C64_buf[6] = 0x10;C64_buf[7] = chr_dec(19); C64_buf[8] = chr_dec(21);C64_buf[9] = chr_dec(24); C64_buf[10] = chr_dec(26);}if(var_seg[6]>41){ L5_setxy(0,4); tp_y = buf_gps[var_seg[5]+1]; L5_wr_chr(tp_y); //E/W tp_h = chr_dec(31);if(var_seg[5]>40){ L5_wr_chrs(31,3);tp_h = tp_h*10+chrtodec(33);}else{ Lwr_icob(6); L5_wr_chrs(31,2);} Lwr_ico(chr_degree);    L5_wr_chrs(var_seg[5]-7,2); Lwr_ico(chr_point); L5_wr_chrs(var_seg[5]-4,4); L5_CE = 1;if(tp_y=='E') C64_buf[6]&=0xf0; //E69 W87else C64_buf[6]=0x01;C64_buf[11] = tp_h; C64_buf[12] = chr_dec(var_seg[5]-7);C64_buf[13] = chr_dec(var_seg[5]-4); C64_buf[14] = chr_dec(var_seg[5]-2);}L5_setxy(52,2); tp_h = var_seg[7]-var_seg[6]; if(tp_h>4){uint tp_v=0;if(tp_h==7) tp_y = 6; else tp_y = tp_h;for(tp_m=1;tp_m<tp_y;tp_m++){if(tp_m==3) tp_m++;tp_v = tp_v+chrtodec(var_seg[7]-tp_m)*185;if(tp_m<5){if(tp_v%10>4) tp_v = tp_v/10+1;else tp_v/=10;}}if(tp_h==7) tp_v = tp_v+chrtodec(var_seg[6]+1)*1850;if(tp_v<100) Lwr_icob(8); else{if(tp_v<1000) Lwr_icob(4);else{ Lwr_ico(tp_v/1000); tp_v%=1000;}Lwr_ico(tp_v/100); tp_v%=100;}Lwr_ico(tp_v/10); Lwr_ico('.'); Lwr_ico(tp_v%10);}else Lwr_icoh("---.-"); //Lwr_ico('k'); -.-kmhL5_CE = 1;L5_setxy(24,2); tp_h = var_seg[8]-var_seg[7]; if(tp_h>4){uint tp_dg=0;tp_h-=4;for(tp_y=0;tp_y<tp_h;tp_y++)tp_dg = tp_dg*10+buf_gps[var_seg[7]+1+tp_y]-48;if(tp_dg>90 && tp_dg<270){Lwr_ico('S'); Lwr_ico(Ico_point);if(tp_dg<180){ Lwr_ico('E'); tp_dg = 180-tp_dg;}else{ Lwr_ico('W'); tp_dg = tp_dg-180;} }else{Lwr_ico('N'); Lwr_ico(Ico_point); if(tp_dg<180) Lwr_ico('E');else{ Lwr_ico('W'); tp_dg = 360-tp_dg;} }Lwr_dec(tp_dg);Lwr_ico(Ico_degree); }else Lwr_icob(24);L5_CE = 1;}void L5_GGA(void){uchar tp_h;L5_setxy(10,0); ofs = 0; line = 0x40;Lwr_icos(var_seg[6]+1,2);L5_CE = 1; L5_setxy(74,4); ofs = 0; line = 0x00;Lwr_ico(buf_gps[var_seg[5]+1]); L5_CE = 1;L5_setxy(74,3);if((var_seg[8]-var_seg[7])==4){Lwr_icos(var_seg[7]+1,3);tp_h = chrtodec(var_seg[7]+1)*10 +chrtodec(var_seg[7]+3);}else{ Lwr_icoh("-.-"); tp_h = 0;} L5_CE = 1;C64_buf[15] = tp_h;L5_setxy(56,1);tp_h = var_seg[9]-var_seg[8]; if(tp_h>3){Lwr_icob(28-tp_h*4); Lwr_icos(var_seg[8]+1,tp_h-1); }else Lwr_icoh("----.-"); L5_CE = 1;}bit flg_lowbat=0;void L5_BAT(void){L5_setxy(74,0); ofs = 0; line = 0x40;if(!Bat_Low){if(flg_lowbat) Lwr_icob(10);else Lwr_ico(Bat_empt);flg_lowbat = !flg_lowbat;}else Lwr_ico(Bat_full); L5_CE = 1;}bit flg_sata=0;void L5_SATA(void){L5_setxy(22,5); ofs = 0; line = 0x02;if(!flg_sata) Lwr_ico(Sata_run);  else{ Lwr_ico(Sata_pause); flg_sign = 0;} L5_CE = 1;}void L5_ComData(bit tp_cd){L5_setxy(20,0); ofs = 0; line = 0x40;if(tp_cd) Lwr_ico(Ico_com); else Lwr_icob(10);L5_CE = 1;}void L5_sch(bit sen,uchar stype,uint s0,uint s1){L5_setxy(0,1); ofs = 0; line = 0x00;if(sen){Lwr_ico(file);if(stype==0) Lwr_ico(Ico_wait);else{if(stype==1) Lwr_ico(Ico_upload);else Lwr_ico(Ico_del);}s0 = s0*100/s1; s1 = s0/5; //20份'%'if(s0<10) Lwr_icob(8); else{if(s0<100){Lwr_icob(4); Lwr_ico(s0/10);}else Lwr_dec(s0/10);}Lwr_ico(s0%10); Lwr_ico('%');line = 0x1f; Lwr_icob(1+s1); line = 0x11;Lwr_icob(20-s1); line = 0x1f; Lwr_icob(1);}else{ _nms(255); _nms(255); _nms(255); Lwr_icob(54);}L5_CE = 1;}uint at_id=0; void L5_FileN(void){L5_setxy(42,0); ofs = 0; line = 0x40;Lwr_dec(at_id/10); Lwr_ico(at_id%10); L5_CE = 1;}void at_getid(void){uchar tp_r;at_id = 0;do{tp_r = AT24C64_RD(at_id*16);if(tp_r==0xff) break;at_id++;L5_sch(1,0,at_id,512); }while(at_id<512);L5_FileN();L5_sch(0,0,0,0);}void at_format(void){uint tp_f;if(flg_sata){    if(at_id>0){for(tp_f=0;tp_f<at_id;tp_f++){AT24C64_WR(tp_f*16,0xff);L5_sch(1,2,tp_f,at_id); }at_id = 0; L5_FileN(); L5_sch(0,0,0,0);}}}void L5_AtWr(uchar wen){L5_setxy(30,0); ofs = 0; line = 0x40;if(wen==1) Lwr_ico(Ico_wait);else{if(wen==2) Lwr_ico(Ico_del);else Lwr_icob(7);} L5_CE = 1;}void at_onewr(uchar hdat){if(flg_sign && at_id<512){L5_AtWr(1);C64_buf[0] = hdat; AT24C64_WrPage(at_id*16); at_id++; L5_FileN();}else L5_AtWr(2);}uchar var_rec=0;void L5_recty(void){L5_setxy(0,2); ofs = 0; if(var_rec==0){ line = 0x00; Lwr_icob(6); Lwr_ico('H'); Lwr_icob(7);}else{ line = 0x20; Lwr_ico('A'); Lwr_dec(var_rec); Lwr_ico('s');}L5_CE = 1; }void rec_add(void){switch(var_rec){case 0: var_rec = 90; break;case 90: var_rec = 60; break;case 60: var_rec = 30; break;case 30: var_rec = 10; break;default: var_rec = 0; break;}L5_recty(); }void Lgps_disp_dt(void){//第1行(xing)L5_setxy(56,1); ofs = 0; line = 0x00; Lwr_icoh("----.-m"); L5_CE = 1;//第2行(xing)L5_setxy(52,2); Lwr_icoh("---.-k"); L5_CE = 1;//第3行(xing)L5_setxy(0,3); L5_wr_chr('N');L5_setxy(12,3); L5_wr_chrh("--"); Lwr_ico(chr_degree); L5_wr_chrh("--"); Lwr_ico(chr_point); L5_wr_chrh("----"); Lwr_ico(chr_min); L5_CE = 1;L5_setxy(74,3); Lwr_icoh("-.-"); L5_CE = 1;//第4行(xing)L5_setxy(0,4); L5_wr_chrh("E---"); Lwr_ico(chr_degree); L5_wr_chrh("--");Lwr_ico(chr_point);L5_wr_chrh("----"); Lwr_ico(chr_min); L5_CE = 1;L5_setxy(74,4); Lwr_icoh("0D");L5_CE = 1;//第2行(xing)L5_recty();}void Lgps_disp_init(void){L5_clear();L5_setxy(0,0); ofs = 0; line = 0x40;Lwr_ico(NoSignal); Lwr_icoh("00"); Lwr_icob(19);Lwr_ico(file); Lwr_icoh("000/512"); Lwr_icob(4);Lwr_ico(Bat_empt); L5_CE = 1;Lgps_disp_dt();L5_setxy(0,5); ofs = 0; line = 0x02; Lwr_ico(Ico_gps); Lwr_icob(2); Lwr_ico(Sata_run);Lwr_icob(4); ofs = 3;Lwr_icoh("00-00"); Lwr_icob(4); Lwr_icoh("--:--:--");L5_CE = 1;at_getid();}unsigned char code g_sign[] = {0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff};void L5_GSV(void){ uchar tp_j,tp_jk,tp_g,tp_n;tp_n = buf_gps[8]-48; ofs = 2; line = 0x01; for(tp_j=0;tp_j<4;tp_j++){if(tp_n==1) L5_setxy(tp_j*14,2);else{if(tp_n==2){if(tp_j<2) L5_setxy((tp_j+4)*14,2);else L5_setxy((tp_j-2)*14,4);}else L5_setxy((tp_j+2)*14,4);}Lwr_icob(2);tp_jk = tp_j*4+3;if(var_seg[tp_jk+1]>(var_seg[tp_jk]+1)) Lwr_icos(var_seg[tp_jk]+1,2);else Lwr_icoh("--");Lwr_icob(4);}for(tp_j=0;tp_j<4;tp_j++){tp_jk = tp_j*4+6;if(var_seg[tp_jk+1]>(var_seg[tp_jk]+1)) tp_g = chr_dec(var_seg[tp_jk]+1);else tp_g = 0;if(tp_n==1) L5_setxy(tp_j*14,1);else{if(tp_n==2){if(tp_j<2) L5_setxy((tp_j+4)*14,1);else L5_setxy((tp_j-2)*14,3);}else L5_setxy((tp_j+2)*14,3);}line = g_sign[tp_g/12]; Lwr_icob(4);line = 0x00; Lwr_dec(tp_g);}L5_CE = 1;}
為(wei)什(shi)麼你的GPS軌跡(ji)記錄PC端及程(cheng)序(xu)不能(neng)運行(xing)?51hei有你更精彩(cai)!!
我這可以運行(xing)啊(a) 可能(neng)是你的電(dian)腦缺少某些庫文件
液晶屏上刮掉的是什(shi)麼?
heicad 發表于 2020-02-10 18:50
液晶屏上刮掉的是什(shi)麼?

刮掉的是樓(lou)主家的坐標位置。。知(zhi)道這個。。基本誤差不超過10米就可以找(zhao)到樓(lou)主了。他怕怕呀。。
 樓(lou)主xiaojuan發表于 2020-02-10 18:50顯(xian)示(shi)全部樓(lou)層(ceng)
jiaren 發表于 2020-02-10 18:50
刮掉的是樓(lou)主家的坐標位置。。知(zhi)道這個。。基本誤差不超過10米就可以找(zhao)到樓(lou)主了。他怕怕呀。。

是qian)a),特(te)別是靜止一(yi)段時間,坐標非(fei)常(chang)準(zhun)。
我在一(yi)個公園(yuan)的廣場上做過靜止實驗,廣場上是用大塊的不同顏色(se)的石板鋪設的,
我把GPS放在其中(zhong)一(yi)塊石板的一(yi)角(jiao),放在那10分鐘,記下(xia)一(yi)個坐標,後來在Google Earth上看,幾乎就在那個角(jiao)上xi) 蟛羈ken)定在1m內!!!
樓(lou)主,電(dian)池可以續(xu)航(hang)多久(jiu)啊(a)?
 樓(lou)主xiaojuan發表于 2020-02-10 18:50顯(xian)示(shi)全部樓(lou)層(ceng)
a110 發表于 2020-02-10 18:50
樓(lou)主,電(dian)池可以續(xu)航(hang)多久(jiu)啊(a)?

880mah的手(shou)機電(dian)池連續(xu)用了6小(xiao)時,還(huai)有3.5V,不huai)丫 攪宋疑柚玫南xia)限(停(ting)止)值了,
2600mah的鋰電(dian)池,充了一(yi)次電(dian)後,斷斷續(xu)續(xu)用了12個小(xiao)時以上了,電(dian)量還(huai)很足,電(dian)壓3.75左右。
個人(ren)覺得VENUS634L模塊還(huai)不錯,樓(lou)主的上位huan)砑淮能(neng)否(fu)說下(xia)在GOOGLE里怎(zen)麼樣打開(kai)數據圖。
 樓(lou)主xiaojuan發表于 2020-02-10 18:50顯(xian)示(shi)全部樓(lou)層(ceng)
a110 發表于 2020-02-10 18:50
個人(ren)覺得VENUS634L模塊還(huai)不錯,樓(lou)主的上位huan)砑淮能(neng)否(fu)說下(xia)在GOOGLE里怎(zen)麼樣打開(kai)數據圖。

個人(ren)覺得venus634l模塊還(huai)不錯,樓(lou)主的上位huan)砑淮能(neng)否(fu)說下(xia)在google里怎(zen)麼樣打開(kai)數據圖。
-----------------------------------------------------------------------
上位huan)砑ml文件,在google earth的文件菜(cai)單里就有打開(kai)kml文件的選項。
kml的格式在google map上有說明!百度一(yi)下(xia)就出來了
 樓(lou)主xiaojuan發表于 2020-02-10 18:50顯(xian)示(shi)全部樓(lou)層(ceng)
原理圖忘記了上傳了︰1.JPG
---------------
請教,我yi)齔隼吹慕jie)收器有個問題。

電(dian)路都(du)完全按(an)照上面的來做的,

存儲也cai)怯T24C64  保存數據沒(mei)問題 ( 重啟後數據讀出還(huai)在證明OK)

但是連接(jie)上位huan)C端讀取軟件(用樓(lou)主的),怎(zen)麼讀都(du)讀不出數據來,哎,郁(yu)悶了。。。

手(shou)動發送‘#’也沒(mei)有讀取動作,,,,,,,,


求教 指(zhi)導指(zhi)導~!!!
 樓(lou)主xiaojuan發表于 2020-02-10 18:50顯(xian)示(shi)全部樓(lou)層(ceng)
ccd 發表于 2020-02-10 18:50
---------------
請教,我yi)齔隼吹慕jie)收器有個問題。

你按(an)暫停(ting)沒(mei)有?上傳數據是在暫停(ting)狀態下(xia)的!還(huai)有手(shou)動發送'#'時,是以字符格式發送ting)/td>
哈(ha)哈(ha),在沒(mei)看回復前(qian)搞定了,確(que)實是要按(an)暫停(ting)才能(neng)上傳,犯(fan)了低級錯誤~!!!
我本來也打算(suan)做一(yi)個類(lei)似的東西呢,不錯
無效樓(lou)層(ceng),該帖已經被刪除
厲害的緊(jin)
有套(tao)件賣嗎(ma)?我要
新手(shou)求指(zhi)導
很酷
ccd 發表于 2020-02-10 18:50
哈(ha)哈(ha),在沒(mei)看回復前(qian)搞定了,確(que)實是要按(an)暫停(ting)才能(neng)上傳,犯(fan)了低級錯誤~!!!

你好,你是完全按(an)照樓(lou)主的那個做的麼?程(cheng)序(xu)是不是也cai)撬廈嬪洗 某cheng)序(xu)?硬(ying)件部分也cai)且yi)樣的麼?
樓(lou)主好{:soso_e113:},我yi) 彩(cai)竅胱 yi)個類(lei)似的東西,但是我是希(xi)望能(neng)夠將經緯度直(zhi)接(jie)通過谷歌地(di)球轉(zhuan)化成具體地(di)名,然(ran)後通過MG323發送到手(shou)機上xi)   ? ken)定不行(xing),所以我這兩天正(zheng)在學習VB,  但是對到時候怎(zen)麼完成跟(gen)谷歌地(di)球的接(jie)口(kou)還(huai)是很迷茫,不知(zhi)道樓(lou)主能(neng)不能(neng)指(zhi)點一(yi)下(xia),多謝了
{:soso_e154:}樓(lou)主大大,求VB源碼~~
無效樓(lou)層(ceng),該帖已經被刪除
好強悍啊(a)!
感xing)宦lou)主~正(zheng)在學習單片機,作為(wei)實例很好
大神(shen)啊(a)
好好學習,天天向(xiang)上
嗯,很實用
下(xia)載來看看
下(xia)載來看看
不錯,
厲害,強大
真不錯!!   
厲害~~~~~~~
請問成品可以直(zhi)接(jie)購買嗎(ma)?
好東西 謝謝分享
謝謝樓(lou)主慷慨,謝謝了

本版(ban)積分規(gui)則

五福彩票官网手(shou)機版(ban)小(xiao)黑屋(wu)單片機論(lun)壇(tan)51黑電(dian)子論(lun)壇(tan)技術交流QQ管理員QQ:125739409;技術交流QQ群636986012

Powered by 單片機教tan)掏/a>

快速回復返回頂(ding)部返回列表