This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

76.8kbps // 150kbps datalink problem

Other Parts Discussed in Thread: TEST2

Hi all,

I have two set of CC1101s.

i try to test the distance compare with the datarate.

i set the power to 0xC0(10db), frequence 866M

with datarate below 38.4kbps, it can works well with >200m.

However, once i increase  the datarate to

76.8kbps // 60m line of sight

150kbps // 10m line of sight

can anyone spot out my error or problem, many thanks

Below is the basic setting of the register:

RF_SETTINGS rfSettings = {
    0x06,   // FSCTRL1   Frequency synthesizer control.
    0x00,   // FSCTRL0   Frequency synthesizer control.
//    0x21,   // FREQ2     Frequency control word, high byte.
 //   0x65,   // FREQ1     Frequency control word, middle byte.
 //   0x6A,   // FREQ0     Frequency control word, low byte.
    0x21,   // FREQ2     Frequency control word, high byte.
   0x4A,   // FREQ1     Frequency control word, middle byte.
   0xD4,   // FREQ0     Frequency control word, low byte.

    0xF5,   // MDMCFG4   Modem configuration.
    0x83,   // MDMCFG3   Modem configuration.
    0x13,   // MDMCFG2   Modem configuration. //ook

 //   0x72,   // MDMCFG1   Modem configuration.  **** 7 = 24preamble byte
    0x22,   // MDMCFG1   Modem configuration.  **** 7 = 24preamble byte



    0xF8,   // MDMCFG0   Modem configuration.
   0x00,   // CHANNR    Channel number.
//  0x9F //default
    0x35,   // DEVIATN   Modem deviation setting (when FSK modulation is enabled).
    0x56,   // FREND1    Front end RX configuration.
    0x10,   // FREND0    Front end RX configuration.
    0x18,   // MCSM0     Main Radio Control State Machine configuration.
    0x16,   // FOCCFG    Frequency Offset Compensation Configuration.
    0x6C,   // BSCFG     Bit synchronization Configuration.
    0x03,   // AGCCTRL2  AGC control.
    0x40,   // AGCCTRL1  AGC control.
    0x91,   // AGCCTRL0  AGC control.
    0xE9,   // FSCAL3    Frequency synthesizer calibration.
    0x2A,   // FSCAL2    Frequency synthesizer calibration.
    0x00,   // FSCAL1    Frequency synthesizer calibration.
    0x1F,   // FSCAL0    Frequency synthesizer calibration.
    0x59,   // FSTEST    Frequency synthesizer calibration.
    0x81,   // TEST2     Various test settings.
    0x35,   // TEST1     Various test settings.
    0x09,   // TEST0     Various test settings.
    0x29,   // IOCFG2    GDO2 output pin configuration.
    0x06,   // IOCFG0    GDO0 output pin configuration. Refer to SmartRF?Studio User Manual for detailed pseudo register explanation.
    0x05,   // PKTCTRL1  Packet automation control.
    0x04,   // PKTCTRL0  Packet automation control.
    77,   // ADDR      Device address. 'M'
    0x02    // PKTLEN    Packet length.
};

//========

datarate change setting:

if(datarate>7)
 {
     datarate = 0;
 }
  ccxxx0_Write(CCxxx0_MDMCFG4,0xF5+datarate); //F5 = 12 F6 = 24 F7 =48 F8 = 96 F9 = 192

//======================================================

For RX side:

RF_SETTINGS rfSettings = {
    0x06,   // FSCTRL1   Frequency synthesizer control.
    0x00,   // FSCTRL0   Frequency synthesizer control.
    0x21,   // FREQ2     Frequency control word, high byte.
    0x4A,   // FREQ1     Frequency control word, middle byte.
    0xD4,   // FREQ0     Frequency control word, low byte.
//    0xF5,   // MDMCFG4   Modem configuration. //58
 //   0xA5,   // MDMCFG4   Modem configuration.    //for crystal ppm 58 to 135 Channel filter BW 09020214
//   0xA5,   // MDMCFG4   Modem configuration.    //for crystal ppm 58 to 135 Channel filter BW 09020214
   0xA5,   // MDMCFG4   Modem configuration.    //for crystal ppm 58 to 135 Channel filter BW 09020214


    0x83,   // MDMCFG3   Modem configuration.
    0x13,   // MDMCFG2   Modem configuration.
    0x22,   // MDMCFG1   Modem configuration.
    0xF8,   // MDMCFG0   Modem configuration.
    0x00,   // CHANNR    Channel number.
    0x35,   // DEVIATN   Modem deviation setting (when FSK modulation is enabled). // 0x35 20K
    0x56,   // FREND1    Front end RX configuration.
    0x10,   // FREND0    Front end RX configuration.
    0x18,   // MCSM0     Main Radio Control State Machine configuration.
    0x16,   // FOCCFG    Frequency Offset Compensation Configuration.
    0x6C,   // BSCFG     Bit synchronization Configuration.
    0x03,   // AGCCTRL2  AGC control.
    0x40,   // AGCCTRL1  AGC control.
    0x91,   // AGCCTRL0  AGC control.
    0xE9,   // FSCAL3    Frequency synthesizer calibration.
    0x2A,   // FSCAL2    Frequency synthesizer calibration.
    0x00,   // FSCAL1    Frequency synthesizer calibration.
    0x1F,   // FSCAL0    Frequency synthesizer calibration.
    0x59,   // FSTEST    Frequency synthesizer calibration.
    0x81,   // TEST2     Various test settings.
    0x35,   // TEST1     Various test settings.
    0x09,   // TEST0     Various test settings.
    0x29,   // IOCFG2    GDO2 output pin configuration.
    0x06,   // IOCFG0    GDO0 output pin configuration. Refer to SmartRF?Studio User Manual for detailed pseudo register explanation.
    0x05,   // PKTCTRL1  Packet automation control.
//	0x04,
    0x04,   // PKTCTRL0  Packet automation control.
    77,   // ADDR      Device address. 'M'
    0x02    // PKTLEN    Packet length.
};

//=================================

datarate++;
                if(datarate>7)
                {
                    datarate = 0; //1.2k
                    comb    = 0xA5;
                }
                if(datarate == 1)
                {
                    comb    = 0xA6; //2.4k
                }
                if(datarate == 2)
                {
                    comb    = 0xA7; //4.8k
                }
                if(datarate == 3)
                {
                    comb    = 0xA8; //9.6k
                }

                if(datarate == 4)
                {
                    comb    = 0xA9; //19.2k
                }
                if(datarate == 5)
                {
                    comb    = 0xAA; //38.4k
                }
                if(datarate == 6)
                {
                    comb    = 0xAB; //76.8k //270 bad //203 bad
                }
                if(datarate == 7)
                {
                    comb    = 0x8C; //152.4k 9 nook 8bad 7 bad
                }

                ccxxx0_Write(CCxxx0_MDMCFG4,comb); //F5 = 12 F6 = 24 F7 =48 F8 = 96 F9 = 192

  • I haven't gone through your settings, but make sure you change frequency deviation and and RX filter BW when you change the data rate.

    Also, FREND1, AGCCTRL2,1,0, FSCTRL1 (IF frequency), FIFOTHR, TEST2, and TEST1 settings to use depend on the RX filter BW used.

    FREND1 = 0x56 for RX filter BW =< 100 kHz, else 0xB6

    TEST2 = 0x81 for RX filter BW =< 325 kHz, else 0x88

    TEST1 = 0x35 for RX filter BW =< 325 kHz, else 0x31

    FIFOTHR= 0x47 for RX filter BW =< 325 kHz, else 0x07

    To find AGCCTRL2,1, 0 and FSCTRL1 settings  select the "typical setting", which closest matches the RX filter BW you are going to use. If the RX filter BW you are using is not part of the typical settings choose the the one which is higher. As an example, assuming the desired RX BW is 162.5 kHz you should start with the the 76.8 kbps preferred setting (232 kHz RX filter BW) and change the data rate, deviation, RX filter BW, and modulation format manually you get the right settings. 

  • HI Sverre,

    Thanks

    As i don't have the RF Studio tools on hand, is it possible for me to obtain the value on other way ?

    Also, the deviation i used is 20K for datarate 1.2k~150kbps , am i correct ?

    Thanks

    Jeff

  • You need to download SmartRF Studio from TI web (http://www.ti.com/tool/smartrftm-studio). This is by far the easiest way of finding the register settings

    +/-20 kHz deviation is a bit low for 150 kbps. For  150 kbps I will suggest a modulation index close to 1 (i.e deviation close to +/-75 kHz). If you select 150 kbps and +/-65 kHz deviation you can use an RF filter BW of 325 kHz and still have room for crystal inaccuracies. Use FSCTRL 1 = 0x08, AGCCTRL2, 1, 0 = 0xC7 00 B2

  • Thank you Sverre again.

    I am not very familiar to the RF.

    Any brief or reference that i can find out the relationship of deviation and datarate?

    Thanks

    Jeff

  • Theoretically, there is an optimum separation/datarate setting if you simultaneously minimize the receiver filter bandwidth. Every halving of receiver filter bandwidth increases sensitivity with 3 dB whereas sensitivity vs separation/datarate decreases with about 1.5-2.5 dB per halving down to a certain limit where the loss increases very fast. In our experience a modulation index (=separation/datarate) = 1 is a good design compromise.

    The transmitted signal will have a certain signal bandwidth (BWsignal), which depends on the data rate and modulation format. This bandwidth can be approximated by Carson's rule:

    BWsignal = 2*fm + 2*fdev (= data rate + frequency separation)

    where

    - fm is the highest modulating frequency. 2*fm = data rate

    - fdev is the frequency deviation. 2*fdev = frequency separation

     On the receiver side there is a channel filter, which is centered on the down-converted received RF frequency, i.e. the intermediate frequency (IF). The channel filter has a programmable bandwidth BWchannel. The signal bandwidth has to be less than the receiver channel filter bandwidth, but we also have to take the frequency error of the transmitter and receiver into account.

    If there is an error in the transmitter carrier frequency and the receiver LO frequency, there will also be an error in the IF frequency. For simplicity assume the frequency error in the transmitter and receiver is equal (same type of crystal). If the receiver has an error of –X ppm and the transmitter has an error of +X ppm the IF frequency will have an error of +2*X ppm (CC11xx uses low side LO injection). Conversely, if the receiver has an error of +X ppm and the transmitter an error of -X ppm the IF frequency will have an error of -2*X ppm.

    BWchannel has to be larger than the maximum signal bandwidth BWsignal plus the maximum frequency error due to crystal inaccuracies. Worst case scenario will be for the crystal errors on Tx and RX side to be of opposite signs

    BWchannel > BWsignal + 4* XTALppm* fRF

    where

    - XTALppm is the total accuracy of the crystal including initial tolerance, temperature drift, loading, and ageing

    - fRF is the RF operating frequency.

    Assuming modulation index = 1, 10 ppm crystal crystal accuracy and fRF = 868 MHz

    58 kHz RX BW: Maximum data rate of 10 kbps and 10 kHz frequency separation (+/-5 kHz frequency deviation). 58 kHz > 10k + 10k + 4*10*868 = 55 kHz

    100 kHz RX BW: Maximum data rate of 32 kbps and 32 kHz frequency separation (+/-5 kHz frequency deviation). 58 kHz > 32k + 32k + 4*10*868 = 98.7 kHz