STC12C5204AD AD E2PROM GSM 混合充电项目
#include<reg52.h>
#include<stdio.h>
#include<intrins.h>
#define uchar unsigned char
#define uint unsigned int /*
串口中断函数
信息内容数组
*/
volatile char EFlag = -1; typedef unsigned char byte;
typedef unsigned int word;
unsigned char buff[5]; void delay(uint xms);
sbit DQ = P1^2; //DS18B20
byte TPH; //存放温度值的高字节
byte TPL; uint temp; //整型温度数据
float f_temp; //浮点型温度数据 /* G S M */
sbit GsmPin = P1^7; unsigned char RxData;
/*AT+CNMI=2,1 短信提示*/
code unsigned char ICMD1[13] = {0x41 ,0x54 ,0x2B ,0x43 ,0x4E ,0x4D ,0x49 ,0x3D ,0x32 ,0x2C ,0x31 ,0x0D ,0x0A};
/*AT+CMGF=1 英文方式发送*/
code unsigned char ICMD2[11] = {0x41 ,0x54 ,0x2B ,0x43 ,0x4D ,0x47 ,0x46 ,0x3D ,0x31 ,0x0D ,0x0A};
/*AT+CMGD=1,4 短信删除*/
code u