南通大学毕业设计
附 录
附信息的收发程序:
void SMS_Format(unsigned char *s) //设置GSM短信的格式 {
ES = 0; REN = 0;
Print_Str(s); //发送设置指令
delay(800); }
void SMS_Send(unsigned char *pre, unsigned char *t) //发送短信 {
ES = 0; REN = 0; ES = 1; REN = 1;
Print_Str(pre);
delay(800);
Print_Str(t);
Print_Char(0x1a); //发送短息内容结束符对应的ASCII为0x1a delay(5000); }
35
delay(5000); ES = 1; REN = 1;
南通大学毕业设计
void SMS_Read(unsigned char ch) {
Print_Str(\ //发送设置指令
Print_Char(ch); }
void SMS_Format_Init(unsigned char *t) Print_Str(\ //发送回车
{ ES = 0; REN = 0;
Print_Str(t); //发送设置指令 delay(800); ES = 1; REN = 1;
}
void SMS_Del(unsigned char ch) { ES = 0; REN = 0;
Print_Str(\ Print_Char(ch);
Print_Str(\ //发送回车 delay(800); ES = 1; REN = 1; }
36

