码迷,mamicode.com
首页 > 其他好文 > 详细

GPS控制指令-串口发送控制指令选择输出格式

时间:2014-10-27 12:54:30      阅读:1719      评论:0      收藏:0      [点我收藏+]

标签:单片机   gps   控制指令   输出指令   

我用的模块是Ublox的从设置软件上可以看到每一种设置的十六进制的命令格式:

具体可以上网查,网上有相关文章。

设置波特率为19200:

B5 62 06 00 14 00 01 00 00 00 D0 08 00 00 00 4B 00 00 07 00 03 00 00 00 00 00 48 57


设置输出频率为10HZ:

B5 62 06 08 06 00 64 00 01 00 01 00 7A 12


注意以上是十六进制,具体发送时要用加0x,如:0xB5


其他输出格式设置:

unsigned char  engga[]={
0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x00,0x00,0x01,0x00,0x00,0xFE,0x18// 使能GGA
 };
unsigned char  disgga[]={
0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0xFD,0x15// 取消GGA
};
unsigned char  engll[]={
0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x01,0x00,0x01,0x00,0x00,0xFF,0x1D// 使能GLL
};
unsigned char  disgll[]={
0xB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x01,0x00,0x00,0x00,0x00,0xFE,0x1A//,0x取消GLL
};
unsigned char  engsa[]={
0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x02,0x00,0x01,0x00,0x00,0x00,0x22// 使能GSA
};
unsigned char  disgsa[]={
0xB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x02,0x00,0x00,0x00,0x00,0xFF,0x1F// 取消GSA
};
unsigned char  engsv[]={
0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x03,0x00,0x01,0x00,0x00,0x01,0x27//使能GSV
};
unsigned char  disgsv[]={
0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x03,0x00,0x00,0x00,0x00,0x00,0x24// 取消GSV
};
unsigned char  enrmc[]={
0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x04,0x00,0x01,0x00,0x00,0x02,0x2C// 使能RMC
};
unsigned char  disrmc[]={
0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x04,0x00,0x00,0x00,0x00,0x01,0x29// 取消RMC 
};
unsigned char  envtg[]={
0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x05,0x00,0x01,0x00,0x00,0x03,0x31// 使能VTG
};
unsigned char  disvtg[]={
0xB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x05,0x00,0x00,0x00,0x00,0x02,0x2E// 取消VTG
};
unsigned char  engrs[]={
0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x06,0x00,0x01,0x00,0x00,0x04,0x36/// 使能GRS /
};
unsigned char  disgrs[]={
0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x06,0x00,0x00,0x00,0x00,0x03,0x33// 取消GRS
};
unsigned char  engst[]={
0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x07,0x00,0x01,0x00,0x00,0x05,0x3B/// 使能GST /
};
unsigned char  disgst[]={
0xB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x07,0x00,0x00,0x00,0x00,0x04,0x38// 取消GST
};
unsigned char  enzda[]={
0xB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x08,0x00,0x01,0x00,0x00,0x06,0x40// 使能ZDA /
};
unsigned char  diszda[]={
0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x08,0x00,0x00,0x00,0x00,0x05,0x3D// 取消ZDA
};



GPS控制指令-串口发送控制指令选择输出格式

标签:单片机   gps   控制指令   输出指令   

原文地址:http://blog.csdn.net/b5w2p0/article/details/40504303

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!