|
发表于 2010-3-10 20:30:18
|
显示全部楼层
我的发送程序中寄存器的配置如下:
CC1100_WriteReg(CC1100_FSCTRL1, 0x0A);//0x0A
CC1100_WriteReg(CC1100_FSCTRL0, 0x00);
CC1100_WriteReg(CC1100_FREQ2, 0x10);//载波435.999MHz
CC1100_WriteReg(CC1100_FREQ1, 0xC4);
CC1100_WriteReg(CC1100_FREQ0, 0xEC);
CC1100_WriteReg(CC1100_MDMCFG4, 0xC8);//0xC8
CC1100_WriteReg(CC1100_MDMCFG3, 0x93);
CC1100_WriteReg(CC1100_MDMCFG2, 0x03);//2-FSK,检测到 30/32 同步字位
CC1100_WriteReg(CC1100_MDMCFG1, 0x22);//前导字节数为4,关闭FEC
CC1100_WriteReg(CC1100_MDMCFG0, 0xF8);
CC1100_WriteReg(CC1100_CHANNR, 0x00);
CC1100_WriteReg(CC1100_DEVIATN, 0x74);
CC1100_WriteReg(CC1100_FREND1, 0x56);
CC1100_WriteReg(CC1100_FREND0, 0x10);//????????
CC1100_WriteReg(CC1100_MCSM1, 0x23);//发送结束之后进入RX状态,接收结束之后进入TX状态
CC1100_WriteReg(CC1100_MCSM0, 0x08);//0x18
CC1100_WriteReg(CC1100_FOCCFG, 0x15);
CC1100_WriteReg(CC1100_BSCFG, 0x6C);
CC1100_WriteReg(CC1100_AGCCTRL2, 0x03);
CC1100_WriteReg(CC1100_AGCCTRL0, 0x91);
CC1100_WriteReg(CC1100_FSCAL3, 0xA9);
CC1100_WriteReg(CC1100_FSCAL2, 0x29);
CC1100_WriteReg(CC1100_FSCAL0, 0x0D);
//CC1100_WriteReg(CC1100_FSTEST, 0x59);
CC1100_WriteReg(CC1100_TEST2, 0x86);
CC1100_WriteReg(CC1100_TEST1, 0x3D);
CC1100_WriteReg(CC1100_TEST0, 0x09);
CC1100_WriteReg(CC1100_IOCFG2, 0x09);
CC1100_WriteReg(CC1100_IOCFG0, 0x06);//0x06
CC1100_WriteReg(CC1100_PKTCTRL1, 0x04);//2个状态字节将附加在数
//据包的有效负载上
CC1100_WriteReg(CC1100_PKTCTRL0, 0x05);//CRC 校准开启,可变数据包长度模式
CC1100_WriteReg(CC1100_ADDR, 0x00);
CC1100_WriteReg(CC1100_PKTLEN, 0x0F);//数据包长度为15
请教高手在接收程序中寄存器该如何配置?或者说一下哪些寄存器的配置需要改一下? |
|