资源简介

这是基于STC12C5A60S2和GSMTC35I的发送与接收信息程序,本人已经把发送与接收功能一体化,集中于一个程序,串口1输入,串口2通过GSM模块发送到指定的号码。

资源截图

代码片段和文件信息

#include “STC_NEW_8051.H“
#include “string.h“
#include 

#define S2RI 0x01
#define S2TI 0x02
#define uchar unsigned char
#define uint unsigned int

#define len 100


unsigned int i;//全局用 I


unsigned char flag1=0Flag=0;
unsigned char flag2=0;

void printf1 (uchar *p);
void printf2 (uchar *p);

void UART_1SendOneByte(unsigned char c);
void UART_2SendOneByte(unsigned char c);

uchar  usart1buf[len]={0};
uchar  usart2buf[len]={0};


void delay_ms(unsigned int i)   // -0.018084490741us
{
while(i--)
{
unsigned char ab;
for(b=18;b>0;b--)
for(a=152;a>0;a--);
_nop_();  //if Keilrequire use intrins.h
}
}
////////////////////////////////////////////////////


/////////////////GSM模块测试连接函数////////////////
//测试指令:AT        

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        224  2013-03-15 13:16  STC12C5A60S2发送与接收GSM\delay.h

     文件      13301  2014-08-12 19:01  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST

     文件     134461  2014-02-15 22:57  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST.Administrator

     文件       4356  2014-08-12 19:10  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST.c

     文件       3622  2014-08-12 19:01  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST.hex

     文件         66  2014-08-12 19:01  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST.lnp

     文件      10030  2014-08-12 19:01  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST.LST

     文件      13897  2014-08-12 19:01  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST.M51

     文件      15231  2014-08-12 19:01  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST.OBJ

     文件       9606  2014-08-12 19:01  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST.plg

     文件      69470  2014-02-19 17:56  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST.uvgui.Administrator

     文件      69470  2014-02-19 17:55  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST.uvgui_Administrator.bak

     文件      56691  2014-08-12 19:10  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST.uvopt

     文件      13274  2014-08-11 22:24  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST.uvproj

     文件      56694  2014-08-12 19:10  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST_uvopt.bak

     文件      13429  2014-02-19 17:55  STC12C5A60S2发送与接收GSM\STC12C5A60S2_TEST_uvproj.bak

     文件      17733  2013-03-14 14:53  STC12C5A60S2发送与接收GSM\STC_NEW_8051.H

     目录          0  2014-08-12 19:10  STC12C5A60S2发送与接收GSM

----------- ---------  ---------- -----  ----

               501555                    18


评论

共有 条评论