基于51的CC1101接收程序

(16页)

'基于51的CC1101接收程序'
#include <reg52.h>#include <intrins.h># defineINT8Uunsigned char# defineINT16Uunsigned int# defineWRITE_BURST0x40# defineREAD_SINGLE0x80# defineREAD BURSTOxCO#define BYTES_IN_RXFIFO 0x7F 字节数#define CRC OK 0x80〃连续写入〃读//连续读〃接收缓冲区的有效//CRC校验通过位标志************/ / ■立?二? ■立?匕?上■上■立■匕■立■立■上■立■立■上 ■上 ^3^ ■上?X* ?卜 ?上 ?卜 ?上 ?上 ?上?上 ?上?上 ?丄? ?i* ?丄?f / ■[? *1* 吟.*T* *T* 彳.彳.彳.彳.彳.彳.彳.彳.彳.*T* 彳.彳.<T* <T* <T* 哼? 哼? 吟.************?上 ?上 ?上 ?丄■^7W #T%//INT8U PaTabel[8] = {0x60 ,0x60 ,0x60 ,0x60 ,0x60 ,0x60 ,0x60 ,0x60);rjw rj^ rjw rjw rjw rjw rjw rjw rjw rjwsbit CSN=P2A0;sbit GDOO=P2A1;sbit GDO2=P2A3;sbit MISO=P2A4;sbit SCK=P2A5;sbit MOSI=P2A6;fkw fkw fVw F|w ^|w rTwsbit ledO=POAO;sbit led 1 二POT;sbit led2=P0A2;void Spilnit(void);void Cpulnit(void);void RESET_CC1100(void);void POWER_UP_RESET_CC1100(void);void halSpiWriteReg(INT8U addr, INT8U value);void halSpiWriteBurstReg(INT8U addr, INT8U ^buffer, INT8U count);void halSpiStrobe(INT8U strobe);INT8U halSpiReadReg(INT8U addr);void halSpiReadBurstReg(INT8U addr, INT8U ^buffer, INT8U count);INT8U halSpiReadStatus(INT8U addr);void halRfWriteRfSettings(void);void halRfSendPacket(INT8U *txBuffer, INT8U size); INT8U halRfReceivePcicket(INT8U *rxBuffer, INT8U ^length);************// CC1100 STROBE, CONTROL AND STATUS REGSITER#define CCxxxO_IOCFG20x00// GDO2 output pin configuration#define CCxxxOJOCFGl0x01// GDO1 output pin configuration#define CCxxxOJOCFGO0x02// GDOO output pin configuration#define CCxxxO_FIFOTHR0x03// RX FIFO and TX FIFO thresholds#define CCxxxO.SYNCl0x04// Sync word, high INT8U#define CCxxxO.SYNCO0x05// Sync word, low INT8U#define CCxxxO_PKTLEN0x06// Packet length#define CCxxxO_PKTCTRLl0x07// Packet automation control#define CCxxxO_PKTCTRLO0x08// Packet automation control#define CCxxxO_ADDR0x09// Device address#define CCxxxO.CHANNROxOA// Channel number#define CCxxxO_FSCTRL 1OxOB// Frequency synthesizer control#define CCxxxO_FSCTRLOOxOC// Frequency synthesizer control#define CCxxxO_FREQ2OxOD// Frequency control word, high INT8U#define CCxxxO_FREQ 1OxOE// Frequency control word, middle INT8U#define CCxxxO.FREQOOxOF// Frequency control word, low INT8U#define CCxxxO_MDMCFG40x10// Modem configuration#define CCxxxO_MDMCFG3Oxll// Modem configuration#define CCxxxO_MDMCFG20x12// Modem configuration#define CCxxxO.MDMCFGI0x13// Modem configuration#define CCxxxO.MDMCFGO0x14// Modem configuration#define CCxxxO_DEVIATN0x15// Modem deviation setting#define CCxxxO_MCSM20x16// Main Radio Control State Machineconfiguration#define CCxxxO.MCSM 10x17// Main Radio Control State Machineconfiguration#define CCxxxO_MCSMO0x18// Main Radio Control State Machineconfiguration#define CCxxxO_FOCCFG0x19// Frequency Offset C
关 键 词:
基于 51 CC1101 接收 程序
 剑锋文库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
关于本文
本文标题:基于51的CC1101接收程序
链接地址: //www.wenku365.com/p-43767957.html
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服点击这里,给剑锋文库发消息,QQ:1290478887 - 联系我们

本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有【成交的100%(原创)】。本站是网络服务平台方,若您的权利被侵害,侵权客服QQ:1290478887 欢迎举报。

1290478887@qq.com 2017-2027 //www.wenku365.com 网站版权所有

粤ICP备19057495号 

收起
展开