430串口通信
代码说明:
#include "sim900c.h" uchar ATE0[]="ATE0 "; //关闭回显 uchar CREG_CMD[]="AT+CREG? "; //获取网络当前的注册状态 uchar SMS_send[]="AT+CMGS=32 "; uchar ATCN[]="AT+CNMI=2,1 "; //新短信提示命令 uchar CMGR[12]="AT+CMGR=1 "; //查看一号短信 uchar CMGD[12]="AT+CMGD=1 "; //删除一号短信 //add uchar CMGF0[]="AT+CMGF=0 "; //设置短信格式为PDU格式 uchar CMGF1[]="AT+CMGF=1 "; //设置短信格式为TEXT格式 uchar CSCA[]="AT+CSCA=+8613800290500 ";//短信中心号码 uchar CMGS[]="AT+CMGS=18706741665 ";//发送方手机号码 uchar Sms1_txt[]="wo shi hao ren"; uchar SEND_MESSA_CONTENT[20]="zhinengsushe";//消息发送内容 int g_timeout=0; void led(int i) { P3OUT |= (0x01
下载说明:请别用迅雷下载,失败请重下,重下不扣分!