同时在定义头文件中定义:
#pragma idata
//*****************************待发发送的32字节数据
unsigned char RXTxBuf[32]= //接收和发送数据的缓冲区
{
0x32,0x32,0x33,0x34,0x35,0x36,0x37,0x38,
0x39,0x40,0x41,0x42,0x43,0x44,0x45,0x46,
0x47,0x48,0x49,0x50,0x51,0x52,0x53,0x54,
0x25,0x26,0x27,0x28,0x29,0x30,0x31,0x32,
};
//************************************************************************
unsigned char RFConf[11]= // RF905 的配置数据
{
0x00, //配置命令 WC
0x4c, //CH_NO,配置频段在430MHZ
0x2C, //输出功率为10db,不重发,节电为正常模式
0x44, //地址宽度设置,为4字节
0x20,0x20, //接收发送有效数据长度为32字节
0x57,0x31,0x30,0x31, //接收地址 自己的本机地址 w101 主机为0号
// 0xCC,0x31,0x30,0x31,
0x58, //CRC充许,8位CRC校验,外部时钟信号不使能,16M晶振
};
//
unsigned char TxAddress[4]={0,0,0,0 }; //接收地址,另一端的地址
#pragma idata
文章评论(0条评论)
登录后参与讨论