Post Go back to editing

可否提供ADF7020-1芯片的配置软件?

我刚开始接触无线电,使用ADF7020-1做一个接收机,文档看了很多遍还是有很多不理解,管理员能否提供配置软件(可根据需求自动配置寄存器)?

  • 您好,您的问题已经提交给ADI相关专家,将邀请专家尽快回答您的问题。谢谢!

  • 您好!

    对于寄存器配置您可以使用ADF7XXX评估板软件,输入您的设计参数,评估板软件可以给出全部寄存器控制字。ADF7020-1评估板软件可以在不连接评估板硬件的情况下独立使用。ADF7020-1评估板软件可以从下面链接免费下载。

    http://www.analog.com/en/rfif-components/rfif-transceivers/adf7020-1/products/EVAL-ADF7020-1/eb.html#SOFTWARE_AND_TOOLS

    此外,我们这里有ADF7XXX的参考代码,可从下面链接下载。

    http://www.analog.com/zh/content/CIC_index_code_example/fca.html

  • 我之前整了一段时间ADF7020-1,找找代码,明天发给你

  • 你好,

         供你参考,注意我们的晶振=12Mhz,

    另外注意你的VCO电感及布线电感.

    /************************************************
    *File name: RFIC_soc.h
    *Function: RFIC soc ADF7020-1 interface
    *MCU: NxP LPC1112FHN33/202
    *Author: Tomtan, CoolRF all rights reserved
    *Date: 2013-07-17
    ************************************************/
    #ifndef _RFIC_SOC_H_
    #define _RFIC_SOC_H_

    extern void RFIC_IO_Init(void);
    extern void ADF7020_1_To_RXmode(unsigned char mode, unsigned char ch);
    extern void ADF7020_1_To_TXmode(unsigned char ch);

    #endif

    /************************************************
    *File name: RFIC_soc.c
    *Function: RFIC soc ADF7020-1 setting
    *MCU: NxP LPC1112FHN33/202
    *Author: Tomtan, CoolRF all rights reserved
    *Date: 2013-07-17
    ************************************************/
    #include "..\config.h"

    /*Public function define*/
    void RFIC_IO_Init(void);
    void ADF7020_1_To_RXmode(unsigned char mode, unsigned char ch);
    void ADF7020_1_To_TXmode(unsigned char ch);
    /*End public function define*/

    /*Static function define*/
    void static RFIC_Write_word(unsigned int RFIC_word);
    /*End static function define*/

    /************************************************
    Function:  RFIC(ADF7020-1) IO init
    In:    none
    Out:   none
    ************************************************/
    void RFIC_IO_Init(void)
    {
    /*RFIC IO direction setup*/
    GPIO0DIR  &= (~(1ul << 3));  /*P0.3 = RF_IO input*/
    GPIO0DIR  &= (~(1ul << 4));  /*P0.4 = RF_CLK input*/

    GPIO0DIR  &= (~(1ul << 5));  /*P0.5 = RF_MUXOUT input*/
    GPIO1DIR  &= (~(1ul << 9));  /*P1.9 = RF_INT input*/
             //SPI
    GPIO3DIR  |= (1ul << 4);  /*P3.4 = RF_SCLK output*/
    GPIO3DIR  &= (~(1ul << 5));  /*P3.5 = RF_SREAD input*/
    GPIO0DIR  |= (1ul << 6);  /*P0.6 = RF_DATA output*/
    GPIO0DIR  |= (1ul << 7);  /*P0.7 = RF_SLE output*/
    GPIO0DIR  |= (1ul << 8);  /*P0.8 = RF_CE output*/
    /*End RFIC IO direction setup*/

    /*RFIC IO level init, SPI port all set to low status, CE = high to Enable ADF7020_1*/
    GPIO3DATA  &= (~(1ul << 4));  /*P3.4 = RF_SCLK low level*/
    GPIO0DATA  &= (~(1ul << 6));  /*P0.6 = RF_DATA low level*/
    GPIO0DATA  &= (~(1ul << 7));  /*P0.7 = RF_SLE low level*/
    GPIO0DATA  |= (1ul << 8);  /*P0.8 = RF_CE high level*/
    }

    /************************************************
    Function:  init ADF7020_1 to Rx status
    In:    mode = 0 init,otherwise normally, Receive RF channel
    Out:   none
    Remark:
    R0
    R1
    R2
    R3
    R4
    R5
    R6
    R9
    R11
    ************************************************/
    const unsigned int RF_receive_channel_table[17]=
    {
    0x79413330,  /*NULL*/

    /*482M 483M 484M 485M */
    0x79413330, 0x7941DDE0, 0x79428890, 0x79433330,

    /*486M 487M 488M 489M */
    0x7943DDE0, 0x79448890, 0x79453330, 0x7953DDE0, /*0x7945DDE08,*/

    /*494M 495M 496M 497M*/
    0x79493330, 0x7949DDE0, 0x794A8890, 0x794B3330,

    /*498M 499M 500M 501M*/
    0x794BDDE0, 0x794C8890, 0x794D3330, 0x794DDDE0,
    };
    void ADF7020_1_To_RXmode(unsigned char mode, unsigned char ch)
    {
    unsigned int i;
    unsigned int temp;

    if(mode == 0)
    {
      while(!(GPIO0DATA & 0x00000020)); /*Wait for ADF7020_1 power good*/
              /*ADF7020-1 power good signal in init status*/
    }

    temp = RF_receive_channel_table[ch]; /*Muxout = Digital lock,*/
    RFIC_Write_word(temp);

    RFIC_Write_word(0x00439011);  /*IF = 150Khz, Icp = 0.875mA, Icp = 3.6Kohm,
              PLL_R = 1, Clkout = off*/ 
    for(i = 0; i < 48000; i++);
    RFIC_Write_word(0xC0227E12);  /*F_dev = 50Khz, Ipa = 11uA,
              Ppa = 13dbm*/
    RFIC_Write_word(0x00786893);  /*Data rate = 1.802885 Kbps,DEMOD CLK = 6Mhz*/
             
    RFIC_Write_word(0x01000054);  /*Post_BW = 0.75*1.802885Khz*/

    RFIC_Write_word(0xAAAAAA35);  /*Sync_head = 0xAAAAAA*/

    RFIC_Write_word(0x0F0801E6);  /* K = 200/50 = 4, R6[14] = 0,
              R6[29] = 0, Discriminator_BW = (6*10^6*4)/(8*10^5)*/
    for(i = 0; i < 48000; i++);
    RFIC_Write_word(0x00B231E9);  /*AGC = auto, AGC high threshold = 70
              AGC low threshold = 30*/
    RFIC_Write_word(0x00102BBB);  /*AFC = ON*/
    }

    /************************************************
    Function:  ADF7020_1 to tx status
    In:    RF TX channel
    Out:   none
    Remark:
    R0
    R1
    R2
    ************************************************/
    const unsigned int RF_tx_channel_table[17]=
    {
    0x79413330,  /*NULL*/

    /*482   483   484   485*/
    0x71415550, 0x71420000, 0x7142AAB0, 0x71435550,

    /*486   487   488   489*/
    0x71440000, 0x7144AAB0, 0x71455550, 0x71540000, /*0x71460000,*/

    /*494   495   496  497*/
    0x71495550, 0x714A0000, 0x714AAAB0, 0x714B5550,

    /*498   499   500   501*/
    0x714C0000, 0x714CAAB0, 0x714D5550, 0x714E0000,
    };
    void ADF7020_1_To_TXmode(unsigned char ch)
    {
    unsigned int i;
    unsigned int temp;

    temp = RF_tx_channel_table[ch];  /*Muxout = Digital lock,*/
    RFIC_Write_word(temp);

    RFIC_Write_word(0x00439011);  /*IF = 150Khz, Icp = 0.875mA, Icp = 3.6Kohm,
              PLL_R = 1, Clkout = off*/ 
    for(i = 0; i < 48000; i++);

    RFIC_Write_word(0xC0220212);  /*Power step 1*/
    for(i = 0; i < 48000; i++);

    RFIC_Write_word(0xC0221012);  /*Power step 2*/
    for(i = 0; i < 48000; i++);

    RFIC_Write_word(0xC0224012);  /*power step 3*/
    for(i = 0; i < 48000; i++);

    RFIC_Write_word(0xC0227E12);  /*Power step 4*/ 
    for(i = 0; i < 48000; i++);
              /*F_dev = 50Khz, Ipa = 11uA,
              Ppa = 13dbm*/
    }

    /************************************************
    Function:  RFIC write a word(32bits)
    In:    write word
    Out:   none
    ************************************************/
    void static RFIC_Write_word(unsigned int RFIC_word)
    {
    unsigned char i;

    /*Firstly, RF_SCLK = 0 RF_DATA = 0 RF_SLE = 0*/
    __nop();
    __nop();
    GPIO3DATA  &= (~(1ul << 4));  /*P3.4 = RF_SCLK low level*/
    GPIO0DATA  &= (~(1ul << 6));  /*P0.6 = RF_DATA low level*/
    GPIO0DATA  &= (~(1ul << 7));  /*P0.7 = RF_SLE low level*/

    for(i = 0; i < 32; i++)
    {
      if(RFIC_word & 0x80000000)
      {
       GPIO0DATA  |= (1ul << 6);  /*P0.6 = RF_DATA high level*/
      }
      else
      {
       GPIO0DATA  &= (~(1ul << 6));  /*P0.6 = RF_DATA low level*/
      }
      RFIC_word <<= 1;
      __nop();
      __nop();
      __nop();
      __nop();
      GPIO3DATA  |= (1ul << 4);  /*P3.4 = RF_SCLK high level*/
      __nop();
      __nop();
      __nop();
      __nop();
      __nop();
      __nop();
      __nop();
      __nop();
      __nop();
      __nop();
      __nop();
      __nop();
      __nop();
      __nop();
      __nop();
      __nop();
      GPIO3DATA  &= (~(1ul << 4));  /*P3.4 = RF_SCLK low level*/
      __nop();
      __nop();
    }

    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    GPIO0DATA  |= (1ul << 7);  /*P0.7 = RF_SLE high level*/
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    GPIO0DATA  &= (~(1ul << 7));  /*P0.7 = RF_SLE low level*/
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    __nop();
    GPIO0DATA  &= (~(1ul << 6));  /*P0.6 = RF_DATA low level*/
    __nop();
    __nop();
    }