产品主要特点:
单片全集成
频段:315, 433, 868, and 915 MHz bands.
高精度锁相环(PLL),
多通道频率捷变功能
调制模式: FSK,支持OOK
传输速率: 0~ 256k bps
发射功率:3dBm(IA4220)、8dBm (IA4221) (2mW、6.5mW)
接收灵敏度: -109 dBm @BER 10-3, BW=67 kHz
自适应天线调谐。(非常重要,生产时无需统调)
SPI接口
支持EEPROM模式
极低的待机电流:0.3uA
接收工作电流:6-10mA
具备低电池检测功能
定时唤醒功能 (1ms-几天)
电压范围: 2.2V to 5.4 V
工作频率为国际通用的ISM频段,采用低发射功率、高接收灵敏度的设计,所以使
用时对周围干扰很小,无需申请许可证,传输距离一般在几十米到2百米。与蓝芽
产品相比,具有成本更低、功耗更低、协议简单、软件开发更简易等特点。
www.mcurf.com
陈先生
hotmail: besroice@hotmail.com
void setup_tx (void)
{
set_tx_config ();
set_tx_freq (0);
set_tx_pwr ();
tx_pwr_mng_start_osc ();
cChipStatus = 0x00;
low_batt_cntl();
wakeup_time_cntl();
}
void set_tx_config ()
{
send_spi_cntl(0x9F71); // CLK 10M, CAP 12PF; Deviation 60K/90 //915 Century frequece //
}
void set_tx_freq (unsigned char i)
{
int cntl;
cntl = FreqGroup[i];
send_spi_cntl (cntl);
}
void set_tx_pwr (void)
{
unsigned char c0;
c0 = tx_buf[0];
tx_buf[0] = 0xB0;
spi_master (1);
tx_buf[0] = c0;
}
void tx_pwr_mng (unsigned char mode)
{
switch (mode) {
case NORMAL:
#ifdef Manule_Power_Mangaer
Globe_Pwr_mng_cntl = 0xC03E; // normal mode = ea + es + ex + ET + EB
#else
Globe_Pwr_mng_cntl =0xc0c6; // Auto Power Amplify Clear ET, In order for Wakeuptime continue to work.
#endif
break;
case STANDBY:
#ifdef Manule_Power_Mangaer
Globe_Pwr_mng_cntl = 0xC036; // standby mode = es + ex + ET + EB // disable power amplifier
#else
Globe_Pwr_mng_cntl=0xc0c6; // Auto Power Amplify Clear ET, In order for Wakeuptime continue to work.
#endif
break;
}
send_spi_cntl(Globe_Pwr_mng_cntl);
}
void tx_pwr_mng_start_osc (void)
{
// enable oscillator & sythesizer: es + ex +ET +EB
wait (1); // wait 1ms
#ifdef Manule_Power_Mangaer
send_spi_cntl(0xc034); //Clear ET, In order for Wakeuptime continue to work. (Maybe Mcu is rest , IA4220 still work).
send_spi_cntl(0xc036); //Enable ET,
#else
send_spi_cntl(0xc0c4); // Auto Power Amplify Clear ET, In order for Wakeuptime continue to work.
send_spi_cntl(0xc0c6); //
#endif
}
void low_batt_cntl (void)
{
send_spi_cntl(0xC207); //2.9V
}
void wakeup_time_cntl ()
{
send_spi_cntl(0xE232); // 50ms=500ms
}
void wait (unsigned char millisec)
{
int cnt;
while (millisec--)
for (cnt = 0; cnt < TC_1MS; cnt++)
;
}
void send_spi_cntl (int cntl)
{
unsigned char c0 = tx_buf[0];
unsigned char c1 = tx_buf[1];
tx_buf[0] = (unsigned char) (cntl > > 8);
tx_buf[1] = (unsigned char) (cntl & 0xFF);
spi_master (2);
tx_buf[0] = c0;
tx_buf[1] = c1;
}
void status_read (void)
{
send_spi_cntl(TX_STATUS_RD);
cChipStatus = rx_buf[1];
}
1. 4个按键中断
2. 低电池检测中断 (2.2-5.4可以编程)
3. WakeUP中断 (从1ms-几天可以设定)
4. Reset中断