开工做遥控器,用SI4432,讨论
开工做遥控器,用SI4432,讨论开工做遥控器,用SI4432,讨论
板子焊好了,调了一周,现在用模块卖家的例程1.2K/35khz频偏 通信 最低功率在家里可以穿2肚墙
1.2K的速率还是太慢,控制更新只有几hz
改到更高速率就接收不到了SI4432 100多个寄存器看的还是蛮头疼,看了2天,用SI的EXCLE算了好几天对照数据手册
FSk发送 比较简单
//set the center frequency to 433 MHz
SpiWriteRegister(0x75, 0x53); //write data to the Frequency Band Select register
SpiWriteRegister(0x76, 0x4B); //write data to the Nominal Carrier Frequency1 register
SpiWriteRegister(0x77, 0x00); //write data to the Nominal Carrier Frequency0 register
//set the desired TX data rate (1.2kbps)
SpiWriteRegister(0x6E, 0x09); //write data to the TXDataRate 1 register
SpiWriteRegister(0x6F, 0xD5); //write data to the TXDataRate 0 register
SpiWriteRegister(0x70, 0x2C); //write data to the Modulation Mode Control 1 register
SpiWriteRegister(0x58, 0x80);
//set the TX power to MAX. dBm
SpiWriteRegister(0x6D, 0x1F); //write data to the TX Power register
//set the Tx deviation register (+-20kHz)
SpiWriteRegister(0x72, 0x20);
//接收部分用Q-I解调ADC数字滤波,手册也没详细讲,设置不对可能收不到
调整了数据发送速率发送带宽,EXLEC 表算出来都变了
/*set the modem parameters according to the exel calculator(parameters: 1.2 kbps, deviation: 20 kHz*/
SpiWriteRegister(0x1C, 0x2C); //write data to the IF Filter Bandwidth register
SpiWriteRegister(0x20, 0x41); //write data to the Clock Recovery Oversampling Ratio register
SpiWriteRegister(0x21, 0x60); //write data to the Clock Recovery Offset 2 register
SpiWriteRegister(0x22, 0x27); //write data to the Clock Recovery Offset 1 register
SpiWriteRegister(0x23, 0x52); //write data to the Clock Recovery Offset 0 register
SpiWriteRegister(0x24, 0x00); //write data to the Clock Recovery Timing Loop Gain 1 register
SpiWriteRegister(0x25, 0x04); //write data to the Clock Recovery Timing Loop Gain 0 register
SpiWriteRegister(0x1D, 0x40); //write data to the AFC Loop Gearshift Override register
SpiWriteRegister(0x1E, 0x0A);
SpiWriteRegister(0x2A, 0x0F); //write data to the AFC Limiter register
SpiWriteRegister(0x1F, 0x03);
SpiWriteRegister(0x69, 0x60);
FIFO模式,设置引导头,同步字什么的,CRC 什么的看得也比较晕,引导头不知道设多少,对性能有什么影响
/*set the packet structure and the modulation type*/
//set the preamble length to 10bytes if the antenna diversity is used and set to 5bytes if not
SpiWriteRegister(0x34, 0x0C); //write data to the Preamble Length register
//set preamble detection threshold to 20bits
SpiWriteRegister(0x35, 0x2A); //write data to the Preamble Detection Controlregister
//Disable header bytes; set variable packet length (the length of the payload is defined by the
//received packet length field of the packet); set the synch word to two bytes long
SpiWriteRegister(0x33, 0x02); //write data to the Header Control2 register
//Set the sync word pattern to 0x2DD4
SpiWriteRegister(0x36, 0x2D); //write data to the Sync Word 3 register
SpiWriteRegister(0x37, 0xD4); //write data to the Sync Word 2 register
//enable the TX & RX packet handler and CRC-16 (IBM) check
SpiWriteRegister(0x30, 0x8D); //write data to the Data Access Control register
//Disable the receive header filters
SpiWriteRegister(0x32, 0x00 ); //write data to the Header Control1 register
//enable FIFO mode and GFSK modulation
SpiWriteRegister(0x71, 0x63); //write data to the Modulation Mode Control 2 register
/*set the GPIO's according the testcard type*/
SpiWriteRegister(0x0B, 0xCA); //Set GPIO0 output
SpiWriteRegister(0x0C, 0xCA); //Set GPIO1 output
SpiWriteRegister(0x0D, 0xCA); //Set GPIO2 output Rx Data
//setCrystal Oscillator Load Capacitance register
SpiWriteRegister(0x09, CRYSTAL_CAPACITANCE);
收不到数据还真让人抓狂晶振误差?AFC?同步字或者包结构不对?同步字不对?接收器设置不对? 还是发射不对?
无从下收分析,手里就一颗万用表
这芯片不错。。有中文资料 建议买个成品的串口SI4432模块,在那基础上刷自己的程序,这样可以避免自己设计的硬件问题 关注楼主的进展。{:time:} niba 发表于 2013-4-27 12:50 static/image/common/back.gif
建议买个成品的串口SI4432模块,在那基础上刷自己的程序,这样可以避免自己设计的硬件问题 ...
这个考虑过,问题是串口模块成本太高,且不能跳频频,协议开销大
设置不能随意,用spi的模块挺好的
发现改了发射频率 接收部分20-30的参数是不改变的
波特率变化 接收部分需要重新设置,平率变化却不需要,或许是变频到固定的中频上再解调
现在很多成品的不带MCU的模块的,直接SPI控制的 SI4432只要bps一高, 距里下降很严重, 特别是天线不怎么匹配过的.
配置参数可以到百度文库里搜索, 有很多现成的. 给你个我用的例子参考. 参数确实麻烦,不过基本上execl算出来的都能用的
// IFBW, COSR, CRO2, CRO1, CRO0, CTG1, CTG0, TDR1, TDR0, MMC1, FDEV,FDEV,B_TIME, AFC ,AFCLimiter
{0x1B, 0x83, 0xC0, 0x13, 0xA9, 0x00, 0x03, 0x09, 0xD5, 0x2D, 0x3A,0x3A, 0x0a,0x80, 0x40,0x1E}, //DR: 1.2kbps,DEV: +-36kHz,BBBW: 77.1kHz
{0x1B, 0x41, 0x60, 0x27, 0x52, 0x00, 0x07, 0x13, 0xA9, 0x2D, 0x3A,0x3A, 0x0a,0x80, 0x40,0x1E}, //DR: 2.4kbps,DEV: +-36kHz,BBBW: 77.1kHz
{0x1B, 0xA1, 0x20, 0x4E, 0xA5, 0x00, 0x17, 0x27, 0x52, 0x2D, 0x3A,0x3A, 0x0a,0x80, 0x40,0x1E}, //DR: 4.8kbps,DEV: +-36kHz,BBBW: 77.1kHz
{0x1C, 0xD0, 0x00, 0x9D, 0x49, 0x00, 0x56, 0x4e, 0xA5, 0x2D, 0x3A,0x3A, 0x0a,0x80, 0x40,0x1E}, //DR: 9.6kbps,DEV: +-36kHz,BBBW: 85.1kHz
{0x16, 0x68, 0x01, 0x3A, 0x93, 0x02, 0x5F, 0x9D, 0x49, 0x2D, 0x20,0x20, 0x0a,0x80, 0x40,0x1E}, //DR: 19.2kbps, DEV: +-20kHz,BBBW: 64.1kHz
{0x02, 0x68, 0x01, 0x3A, 0x93, 0x04, 0xBC, 0x09, 0xD5, 0x0D, 0x20,0x20,0x0a,0x80, 0x40,0x1E}, //DR: 38.4kbps, DEV: +-20kHz,BBBW: 83.2kHz
vividbmw 发表于 2013-7-14 10:16 static/image/common/back.gif
现在很多成品的不带MCU的模块的,直接SPI控制的
我这里有带mcu控制的,串口透传。 双向调通了,当航模遥控器用了几个月了
说下经验
1 照官方模板改,只改 载波频绿 波特率 载波带宽,很容易改错不通
2 发送完记得清FIFO 开中断,由于发完没开中断 导致发完不能收,郁闷好久
3 新的B1板 发完就可以切到接收
总的来说,设置很麻烦 谢谢分享经验 2 发送完记得清FIFO 开中断,由于发完没开中断 导致发完不能收,郁闷好久
----------------------
请问发完清发送FIFO,开接收中断吗?
3 新的B1板 发完就可以切到接收
-----------------------------
这个怎么配置?我开XTON | TX 发送完,就是回到 XTON状态的。
开XTON | RX 接收完,也是回到XTON状态。
而且很诡异的是开了XTON | RX,经常会在无ipkvalid就自动回到XTON了。。。 我的4432也调通了,目前在加功放的问题上卡住~~ 很好的经验 正准备用,买了SPI接口的成品模块,不知在设计电路时要考虑什么不。 {:lol:}{:lol:}{:lol:}SI4438 走起 SI4010 有做过吗?? 随着数据速率升高通信距离真的会急剧下降吗? yuri_su 发表于 2013-10-23 17:44
我的4432也调通了,目前在加功放的问题上卡住~~
怎么卡住了?功率够了距离不够?
页:
[1]