www.pudn.com > C8051f020MC45LCD240128.rar > SMSTABLE.h, change:2009-06-06,size:5078b


#define SmsWD 0    // 温度: 
#define SmsSW 1    // 水位: 
#define SmsLS 2    // 流速: 
#define SmsJY 3    // 降雨: 
#define SmsMs 4    // 单位:M/S 
 
#define SmsZ  10    // + 
#define SmsF  11    // - 
#define SmsC  12    // ℃ 
#define SmsKz 13    // ( 
#define SmsKy 14    // ) 
#define SmsMi 15    // 米 
#define SmsMM 16    // m 
#define SmsD  17    // . 
 
// 短信息内容数组定义            数组下标  对应字符 
unsigned char code SmsOne[][4] = {/*-- 0 --'0'--*/ 
                                  {'0','0','3','0'}, 
                                  /*-- 1 --'1'--*/ 
                                  {'0','0','3','1'}, 
                                  /*-- 2 --'2'--*/ 
                                  {'0','0','3','2'}, 
                                  /*-- 3 --'3'--*/ 
                                  {'0','0','3','3'}, 
                                  /*-- 4 --'4'--*/ 
                                  {'0','0','3','4'}, 
                                  /*-- 5 --'5'--*/ 
                                  {'0','0','3','5'}, 
                                  /*-- 6 --'6'--*/ 
                                  {'0','0','3','6'}, 
                                  /*-- 7 --'7'--*/ 
                                  {'0','0','3','7'}, 
                                  /*-- 8 --'8'--*/ 
                                  {'0','0','3','8'}, 
                                  /*-- 9 --'9'--*/ 
                                  {'0','0','3','9'}, 
                                  /*-- 10 --'+'--*/ 
                                  {'0','0','2','B'}, 
                                  /*-- 11 --'-'--*/ 
                                  {'0','0','2','D'}, 
                                  /*-- 12 --'℃'--*/ 
                                  {'2','1','0','3'}, 
                                  /*-- 13 --'('--*/ 
                                  {'0','0','2','8'}, 
                                  /*-- 14 --')'--*/ 
                                  {'0','0','2','9'}, 
                                  /*-- 15 --'米'--*/ 
                                  {'7','C','7','3'}, 
                                  /*-- 16 --'m'--*/ 
                                  {'0','0','6','D'}, 
                                  /*-- 17 --'.'--*/ 
                                  {'0','0','2','E'}}; 
 
unsigned char code SmsThree[][12] ={/*-------- 0 -------- "温度:" --------*/ 
                                    {'6','E','2','9','5','E','A','6','F','F','1','A'}, 
                                    /*-------- 1 -------- "水位:" --------*/ 
                                    {'6','C','3','4','4','F','4','D','F','F','1','A'}, 
                                    /*-------- 2 -------- "流速:" --------*/ 
                                    {'6','D','4','1','9','0','1','F','F','F','1','A'}, 
                                    /*-------- 3 -------- "降雨:" --------*/ 
                                    {'9','6','4','D','9','6','E','8','F','F','1','A'}, 
                                    /*-------- 0 -------- "M/S" --------*/ 
                                    {'0','0','4','D','0','0','2','F','0','0','5','3'}}; 
 
xdata unsigned char TxBuffer[256];       // 发送缓冲区 
xdata unsigned char RxBuffer[256];       // 接收缓冲区 
 
// 命令数组定义 
unsigned char code PhonePerfix[8] = "11000D91";  // 手机号码前加前缀字符 
unsigned char code PhoneSuffix[6] = "000800";    // 手机号码后加后缀字符 
unsigned char code PhoneOnly[14] = "683154133741F5";                  // 指定发送的号码 
unsigned char PhoneStoch[];                     // 随机的发送号码 
unsigned char PhoneSMS[18] = "0891683110701005F0";                     // 中心号码 
 
unsigned char code AT_Cmd[3] = "AT\r";           // 联机命令  
unsigned char code ATE_Cmd[] = "ATE\r";      // 关闭回显 
unsigned char code CLIP_Cmd[10] = "AT+CLIP=1\r";      // 设置来电显示 
unsigned char code CMGS_Cmd[11] = "AT+CMGS=89\r";    // 发送短消息命令+数据长度+回车 
// +8613010701500 太原联通短息中心号码 
// 8613010701500F 去掉+号 不是偶数在后面加F 
// 683110701005F0 把奇位和偶位互换 
// 0891683110701005F0 在号码前加91(国际化)+字符长度/2=08 
 
// (温度:+55.0℃)(水位:44米)(流速:44m/s)(降雨:77mm)   = 38个字符汉字单转换成Unicode码*4=152  152/2=4C 
// 0891683110701005F011000D91683154133741F50008004C00286E295EA6FF1A002B00300030002E00302103002900286C344F4DFF1A003000307C73002900286D41901FFF1A00300030004D002F005300290028964D96E8FF1A00300030006D006D0029 
// 0891683110701005F011000D91683154133741F5000E00300030002E00302103002900286C344F4DFF1A003000307C73002900286D41901FFF1A00300030004D002F00530029(                     964D96E8FF1A00300030006D006D0029 
// 0891683110701005F011000D91683154133741F50008004C00286E295EA6FF1AE  00300030002E00302103002900286C344F4DFF1A003000307C73002900286D41901FFF1A00300030004D002F00530029 
//unsigned char code  Command[8] = "AT+CMGR="; 
//unsigned char code  Command[8] = "AT+CMGD="; 
//unsigned char code SMSPhone[] = "";         // 短消息中心号码 
//xdata unsigned char SMS_Buffer[140];     // 短信缓冲区 
unsigned char PhoneFlag = 0;