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.

CC1101 and ASK/OOK

Other Parts Discussed in Thread: CC1101, TEST2

Hello,

I have successfully used my CC1101's with different frequencies (433/868) and modulations (gfsk, 2gsk, 4fsk) so far.

All except ASK/OOK.

I have read the DNO22 note : i have done all my settings with GFSK, then switched to ASK/OOK and adapted AGCCTRL 0/1/2, FREND1, TEST 2/1 and FIFOTHR.

My sender seems ok (aka sending without issues) but my receiver remains silent.

Futhermore, I have lots of ASK/OOK 433mhz devices around me so my receiver should pick them up but still no luck.

Below my settings from SmartRF, any idea/help?

Thank you.

Erwan

# Sync word qualifier mode = 30/32 sync word bits detected

# CRC autoflush = false

# Channel spacing = 199.951172

# Data format = Normal mode

# Data rate = 2.39897

# RX filter BW = 58.035714

# PA ramping = false

# Preamble count = 4

# Whitening = false

# Address config = No address check

# Carrier frequency = 433.999969

# Device address = 0

# TX power = 0

# Manchester enable = false

# CRC enable = true

# Deviation = 5.157471

# Packet length mode = Variable packet length mode. Packet length configured by the first byte after sync word

# Packet length = 255

# Modulation format = ASK/OOK

# Base frequency = 433.999969

# Channel number = 0

# PA table

#define PA_TABLE {0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,}

void config()

{

cc1101.writeReg(CC1101_IOCFG0,0x06);

cc1101.writeReg(CC1101_FIFOTHR,0x47);

cc1101.writeReg(CC1101_PKTCTRL0,0x05);

cc1101.writeReg(CC1101_FSCTRL1,0x06);

cc1101.writeReg(CC1101_FREQ2,0x10);

cc1101.writeReg(CC1101_FREQ1,0xB1);

cc1101.writeReg(CC1101_FREQ0,0x3B);

cc1101.writeReg(CC1101_MDMCFG4,0xF6);

cc1101.writeReg(CC1101_MDMCFG3,0x83);

cc1101.writeReg(CC1101_MDMCFG2,0x33);

cc1101.writeReg(CC1101_DEVIATN,0x15);

cc1101.writeReg(CC1101_MCSM0,0x18);

cc1101.writeReg(CC1101_FOCCFG,0x16);

cc1101.writeReg(CC1101_AGCCTRL2,0x04);

cc1101.writeReg(CC1101_AGCCTRL1,0x00);

cc1101.writeReg(CC1101_AGCCTRL0,0x92);

cc1101.writeReg(CC1101_WORCTRL,0xFB);

cc1101.writeReg(CC1101_FREND0,0x11);

cc1101.writeReg(CC1101_FSCAL3,0xE9);

cc1101.writeReg(CC1101_FSCAL2,0x2A);

cc1101.writeReg(CC1101_FSCAL1,0x00);

cc1101.writeReg(CC1101_FSCAL0,0x1F);

cc1101.writeReg(CC1101_TEST2,0x81);

cc1101.writeReg(CC1101_TEST1,0x35);

cc1101.writeReg(CC1101_TEST0,0x09);

}

  • Hi,

    Your settings looks ok, but I noticed that you have a very small RX filter bandwidth. Have you tested the frequency accuracy of your transmitter or a bigger RX filter bandwidth? The small RX band width is not an issue given that the frequency offset between the transmitter and receiver is small. Also, what is the distance between your transmitter and receiver? Have you tested several distances? Have you tested using your own HW or have you also tested our EMs?

  • Hi,

    Thanks for this quick answer.

    I will try with different RX filter bandwidth later today. 

    My two CC1101 are about 50 cms away from each other : i will try different distances later today as well.

    But in my surroundings, I have half a dozen RF433 devices using ASK/OOK modulation whitin 10/20 meters so I expected to pick these up.

    My two CC1101 have the same registers.

    Regards,

    Erwan

  • When having the receiver that close to the transmitter, you risk saturating the receiver. So increasing the distance or decreasing the output power is worth a try.

  • Hi,

    I have followed your advice and it works :)

    I increased the rx filter bw and lowered the tx power and here comes my signal !

    Thanks a lot : great chip, great support !

    Here below my settings. Maybe it can help others to send/receive with ASK/OOK modulation at 433 FR.

    # Sync word qualifier mode = 30/32 sync word bits detected

    # CRC autoflush = false

    # Channel spacing = 199.951172

    # Data format = Normal mode

    # Data rate = 249.939

    # RX filter BW = 541.666667

    # PA ramping = false

    # Preamble count = 4

    # Whitening = false

    # Address config = No address check

    # Carrier frequency = 433.919830

    # Device address = 0

    # TX power = -15

    # Manchester enable = true

    # CRC enable = true

    # Deviation = 126.953125

    # Packet length mode = Variable packet length mode. Packet length configured by the first byte after sync word

    # Packet length = 255

    # Modulation format = ASK/OOK

    # Base frequency = 433.919830

    # Channel number = 0

    # PA table

    #define PA_TABLE {0x00,0x1d,0x00,0x00,0x00,0x00,0x00,0x00,}

    void config2()

    {

    cc1101.writeReg(CC1101_IOCFG0,0x06);

    cc1101.writeReg(CC1101_PKTCTRL0,0x05);

    cc1101.writeReg(CC1101_FSCTRL1,0x0C);

    cc1101.writeReg(CC1101_FREQ2,0x10);

    cc1101.writeReg(CC1101_FREQ1,0xB0);

    cc1101.writeReg(CC1101_FREQ0,0x71);

    cc1101.writeReg(CC1101_MDMCFG4,0x2D);

    cc1101.writeReg(CC1101_MDMCFG3,0x3B);

    cc1101.writeReg(CC1101_MDMCFG2,0x3B);

    cc1101.writeReg(CC1101_DEVIATN,0x62);

    cc1101.writeReg(CC1101_MCSM0,0x18);

    cc1101.writeReg(CC1101_FOCCFG,0x1D);

    cc1101.writeReg(CC1101_BSCFG,0x1C);

    cc1101.writeReg(CC1101_AGCCTRL2,0x04);

    cc1101.writeReg(CC1101_AGCCTRL1,0x00);

    cc1101.writeReg(CC1101_AGCCTRL0,0x92);

    cc1101.writeReg(CC1101_WORCTRL,0xFB);

    cc1101.writeReg(CC1101_FREND1,0xB6);

    cc1101.writeReg(CC1101_FREND0,0x11);

    cc1101.writeReg(CC1101_FSCAL3,0xEA);

    cc1101.writeReg(CC1101_FSCAL2,0x2A);

    cc1101.writeReg(CC1101_FSCAL1,0x00);

    cc1101.writeReg(CC1101_FSCAL0,0x1F);

    cc1101.writeReg(CC1101_TEST0,0x09);

    }

  • Great to hear that you made it work! In order to get the best sensitivity and thus performance you might be able to reduce the RX filter bandwidth a little more depending on your XTAL accuracy. See more in DN005 http://www.ti.com/litv/pdf/swra122c.

  • I have two cc1101 located at a distance of 50 cm. With 433,92 Mhz, GFSK modulation I send and receive data, all ok. With the settings listed below:

    RF_SETTINGS = {
    'FSCTRL1':0x0C, # FSCTRL1 Frequency synthesizer control.
    'FSCTRL0':0x00, # FSCTRL0 Frequency synthesizer control.
    'FREQ2':0x10, # FREQ2 Frequency control word, high byte.
    'FREQ1':0xA7, # FREQ1 Frequency control word, middle byte.
    'FREQ0':0x62, # FREQ0 Frequency control word, low byte.
    'MDMCFG4':0x2D, # MDMCFG4 Modem configuration.
    'MDMCFG3':0x3B, # MDMCFG3 Modem configuration.
    'MDMCFG2':0x13, # MDMCFG2 Modem configuration.
    'MDMCFG1':0x22, # MDMCFG1 Modem configuration.
    'MDMCFG0':0xF8, # MDMCFG0 Modem configuration.
    'CHANNR':0x00, # CHANNR Channel number.
    'DEVIATN':0x62, # DEVIATN Modem deviation setting (when FSK modulation is enabled).
    'FREND1':0xB6, # FREND1 Front end RX configuration.
    'FREND0':0x10, # FREND0 Front end TX configuration.
    'MCSM0':0x18, # MCSM0 Main Radio Control State Machine configuration.
    'FOCCFG':0x1D, # FOCCFG Frequency Offset Compensation Configuration.
    'BSCFG':0x1C, # BSCFG Bit synchronization Configuration.
    'AGCCTRL2':0xC7, # AGCCTRL2 AGC control.
    'AGCCTRL1':0x00, # AGCCTRL1 AGC control.
    'AGCCTRL0':0xB0, # AGCCTRL0 AGC control.
    'FSCAL3':0xEA, # FSCAL3 Frequency synthesizer calibration.
    'FSCAL2':0x2A, # FSCAL2 Frequency synthesizer calibration.
    'FSCAL1':0x00, # FSCAL1 Frequency synthesizer calibration.
    'FSCAL0':0x1F, # FSCAL0 Frequency synthesizer calibration.
    'FSTEST':0x59, # FSTEST Frequency synthesizer calibration.
    'TEST2':0x88, # TEST2 Various test settings.
    'TEST1':0x31, # TEST1 Various test settings.
    'TEST0':0x09, # TEST0 Various test settings.
    'FIFOTHR':0x07, # FIFOTHR RXFIFO and TXFIFO thresholds.
    'IOCFG2':0x29, # IOCFG2 GDO2 output pin configuration.
    'IOCFG0D':0x06, # IOCFG0D GDO0 output pin configuration. 
    'PKTCTRL1':0x04, # PKTCTRL1 Packet automation control.
    'PKTCTRL0':0x05, # PKTCTRL0 Packet automation control.
    'ADDR':0x00, # ADDR Device address.
    'PKTLEN':0xFF, # PKTLEN Packet length.
    'PATABLE':'0x1D'
    }

    But with 433,92 Mhz, ASK/OOK modulation, only silence. With the settings listed below:

    RF_SETTINGS2 = {
        'IOCFG0':0x06,
        'PKTCTRL0':0x05,
        'FSCTRL1':0x0C,
        'FREQ2':0x10,
        'FREQ1':0xB0,
        'FREQ0':0x71,
        'MDMCFG4':0x2D,
        'MDMCFG3':0x3B,
        'MDMCFG2':0x3B,
        'DEVIATN':0x62,
        'MCSM0':0x18,
        'FOCCFG':0x1D,
        'BSCFG':0x1C,
        'AGCCTRL2':0x04,
        'AGCCTRL1':0x00,
        'AGCCTRL0':0x92,
        'WORCTRL':0xFB,
        'FREND1':0xB6,
        'FREND0':0x11,
        'FSCAL3':0xEA,
        'FSCAL2':0x2A,
        'FSCAL1':0x00,
        'FSCAL0':0x1F,
        'TEST0':0x09,
        'PATABLE':0x1D
    }

    Help me plz, where I'm wrong.
  • havn't looked at the settings yet, but initial though is to increase the distance between the transmitter and receiver.

  • Did not see anything very wrong with your settings, but I noticed that you used different frequency in the two set-ups, have you tested more frequencies? Have you tested more AGC settings like described in DN022 http://www.ti.com/litv/pdf/swra215e?

  • Thanks for the reply. I made a mistake with the configuration PATABLE. It must be thus ['0x0', '0x1d', '0x0', '0x0', '0x0', '0x0', '0x0', '0x0'].

  • Hello guys. Help please a working example for Arduino. How it is possible to work and configure this module? I need work 433 ASK/OOK

    This code dont work.

    #include "EEPROM.h"
    #include "cc1101.h"
    
    // The LED is wired to the Arduino Output 4 (physical panStamp pin 19)
    #define LEDOUTPUT 4
    
    // The connection to the hardware chip CC1101 the RF Chip
    CC1101 cc1101;
    
    byte b;
    byte i;
    byte syncWord = 199;
    long counter=0;
    byte chan=0;
    
    // a flag that a wireless packet has been received
    boolean packetAvailable = false;
    
    void blinker(){
    digitalWrite(LEDOUTPUT, HIGH);
    delay(100);
    digitalWrite(LEDOUTPUT, LOW);
    delay(100);
    }
    
    /* Handle interrupt from CC1101 (INT0) gdo0 on pin2 */
    void cc1101signalsInterrupt(void){
    // set the flag that a package is available
    packetAvailable = true;
    }
    
    
    void config()
    
    {
    
    cc1101.writeReg(CC1101_IOCFG0,0x06);
    cc1101.writeReg(CC1101_PKTCTRL0,0x05);
    cc1101.writeReg(CC1101_FSCTRL1,0x0C);
    cc1101.writeReg(CC1101_FREQ2,0x10);
    cc1101.writeReg(CC1101_FREQ1,0xB0);
    cc1101.writeReg(CC1101_FREQ0,0x71);
    cc1101.writeReg(CC1101_MDMCFG4,0x2D);
    cc1101.writeReg(CC1101_MDMCFG3,0x3B);
    cc1101.writeReg(CC1101_MDMCFG2,0x3B);
    cc1101.writeReg(CC1101_DEVIATN,0x62);
    cc1101.writeReg(CC1101_MCSM0,0x18);
    cc1101.writeReg(CC1101_FOCCFG,0x1D);
    cc1101.writeReg(CC1101_BSCFG,0x1C);
    cc1101.writeReg(CC1101_AGCCTRL2,0x04);
    cc1101.writeReg(CC1101_AGCCTRL1,0x00);
    cc1101.writeReg(CC1101_AGCCTRL0,0x92);
    cc1101.writeReg(CC1101_WORCTRL,0xFB);
    cc1101.writeReg(CC1101_FREND1,0xB6);
    cc1101.writeReg(CC1101_FREND0,0x11);
    cc1101.writeReg(CC1101_FSCAL3,0xEA);
    cc1101.writeReg(CC1101_FSCAL2,0x2A);
    cc1101.writeReg(CC1101_FSCAL1,0x00);
    cc1101.writeReg(CC1101_FSCAL0,0x1F);
    cc1101.writeReg(CC1101_TEST0,0x09);
    cc1101.writeReg(CC1101_PATABLE, 0x1d);
    
    }
    void setup()
    {
    Serial.begin(38400);
    Serial.println("start");
    
    // setup the blinker output
    pinMode(LEDOUTPUT, OUTPUT);
    digitalWrite(LEDOUTPUT, LOW);
    
    // blink once to signal the setup
    blinker();
    // initialize the RF Chip
    cc1101.init();
    config();
    
    
    Serial.print("CC1101_PARTNUM "); //cc1101=0
    Serial.println(cc1101.readReg(CC1101_PARTNUM, CC1101_STATUS_REGISTER));
    Serial.print("CC1101_VERSION "); //cc1101=4
    Serial.println(cc1101.readReg(CC1101_VERSION, CC1101_STATUS_REGISTER));
    Serial.print("CC1101_MARCSTATE ");
    Serial.println(cc1101.readReg(CC1101_MARCSTATE, CC1101_STATUS_REGISTER) & 0x1f);
    
    attachInterrupt(0, cc1101signalsInterrupt, FALLING);
    
    Serial.println("device initialized");
    }
    
    void ReadLQI()
    {
    byte lqi=0;
    byte value=0;
    lqi=(cc1101.readReg(CC1101_LQI, CC1101_STATUS_REGISTER));
    value = 0x3F - (lqi & 0x3F);
    Serial.print("CC1101_LQI ");
    Serial.println(value);
    }
    
    void ReadRSSI()
    {
    byte rssi=0;
    byte value=0;
    
    rssi=(cc1101.readReg(CC1101_RSSI, CC1101_STATUS_REGISTER));
    
    if (rssi >= 128)
    {
    value = 255 - rssi;
    value /= 2;
    value += 74;
    }
    else
    {
    value = rssi/2;
    value += 74;
    }
    Serial.print("CC1101_RSSI ");
    Serial.println(value);
    }
    
    void loop()
    {
    if(packetAvailable){
    Serial.println("packet received");
    // Disable wireless reception interrupt
    detachInterrupt(0);
    
    ReadRSSI();
    ReadLQI();
    // clear the flag
    packetAvailable = false;
    
    CCPACKET packet;
    
    if(cc1101.receiveData(&packet) > 0){
    if(!packet.crc_ok) {
    Serial.println("crc not ok");
    }
    
    if(packet.length > 0){
    Serial.print("packet: len ");
    Serial.print(packet.length);
    Serial.print(" data: ");
    for(int j=0; j<packet.length; j++){
    Serial.print(packet.data[j],HEX);
    Serial.print(" ");
    }
    Serial.println(".");
    }
    }
    // Enable wireless reception interrupt
    attachInterrupt(0, cc1101signalsInterrupt, FALLING);
    }
    }

    #include "EEPROM.h"#include "cc1101.h"
    // The LED is wired to the Arduino Output 4 (physical panStamp pin 19)#define LEDOUTPUT 4
    // The connection to the hardware chip CC1101 the RF ChipCC1101 cc1101;
    byte b;byte i;byte syncWord = 199;long counter=0;byte chan=0;
    // a flag that a wireless packet has been receivedboolean packetAvailable = false;
    void blinker(){digitalWrite(LEDOUTPUT, HIGH);delay(100);digitalWrite(LEDOUTPUT, LOW);delay(100);}
    /* Handle interrupt from CC1101 (INT0) gdo0 on pin2 */void cc1101signalsInterrupt(void){// set the flag that a package is availablepacketAvailable = true;}

    void config()
    {
    cc1101.writeReg(CC1101_IOCFG0,0x06);cc1101.writeReg(CC1101_PKTCTRL0,0x05);cc1101.writeReg(CC1101_FSCTRL1,0x0C);cc1101.writeReg(CC1101_FREQ2,0x10);cc1101.writeReg(CC1101_FREQ1,0xB0);cc1101.writeReg(CC1101_FREQ0,0x71);cc1101.writeReg(CC1101_MDMCFG4,0x2D);cc1101.writeReg(CC1101_MDMCFG3,0x3B);cc1101.writeReg(CC1101_MDMCFG2,0x3B);cc1101.writeReg(CC1101_DEVIATN,0x62);cc1101.writeReg(CC1101_MCSM0,0x18);cc1101.writeReg(CC1101_FOCCFG,0x1D);cc1101.writeReg(CC1101_BSCFG,0x1C);cc1101.writeReg(CC1101_AGCCTRL2,0x04);cc1101.writeReg(CC1101_AGCCTRL1,0x00);cc1101.writeReg(CC1101_AGCCTRL0,0x92);cc1101.writeReg(CC1101_WORCTRL,0xFB);cc1101.writeReg(CC1101_FREND1,0xB6);cc1101.writeReg(CC1101_FREND0,0x11);cc1101.writeReg(CC1101_FSCAL3,0xEA);cc1101.writeReg(CC1101_FSCAL2,0x2A);cc1101.writeReg(CC1101_FSCAL1,0x00);cc1101.writeReg(CC1101_FSCAL0,0x1F);cc1101.writeReg(CC1101_TEST0,0x09);cc1101.writeReg(CC1101_PATABLE, 0x1d);
    }void setup(){Serial.begin(38400);Serial.println("start");
    // setup the blinker outputpinMode(LEDOUTPUT, OUTPUT);digitalWrite(LEDOUTPUT, LOW);
    // blink once to signal the setupblinker();// initialize the RF Chipcc1101.init();config();

    Serial.print("CC1101_PARTNUM "); //cc1101=0Serial.println(cc1101.readReg(CC1101_PARTNUM, CC1101_STATUS_REGISTER));Serial.print("CC1101_VERSION "); //cc1101=4Serial.println(cc1101.readReg(CC1101_VERSION, CC1101_STATUS_REGISTER));Serial.print("CC1101_MARCSTATE ");Serial.println(cc1101.readReg(CC1101_MARCSTATE, CC1101_STATUS_REGISTER) & 0x1f);
    attachInterrupt(0, cc1101signalsInterrupt, FALLING);
    Serial.println("device initialized");}
    void ReadLQI(){byte lqi=0;byte value=0;lqi=(cc1101.readReg(CC1101_LQI, CC1101_STATUS_REGISTER));value = 0x3F - (lqi & 0x3F);Serial.print("CC1101_LQI ");Serial.println(value);}
    void ReadRSSI(){byte rssi=0;byte value=0;
    rssi=(cc1101.readReg(CC1101_RSSI, CC1101_STATUS_REGISTER));
    if (rssi >= 128){value = 255 - rssi;value /= 2;value += 74;}else{value = rssi/2;value += 74;}Serial.print("CC1101_RSSI ");Serial.println(value);}
    void loop(){if(packetAvailable){Serial.println("packet received");// Disable wireless reception interruptdetachInterrupt(0);
    ReadRSSI();ReadLQI();// clear the flagpacketAvailable = false;
    CCPACKET packet;
    if(cc1101.receiveData(&packet) > 0){if(!packet.crc_ok) {Serial.println("crc not ok");}
    if(packet.length > 0){Serial.print("packet: len ");Serial.print(packet.length);Serial.print(" data: ");for(int j=0; j<packet.length; j++){Serial.print(packet.data[j],HEX);Serial.print(" ");}Serial.println(".");}}// Enable wireless reception interruptattachInterrupt(0, cc1101signalsInterrupt, FALLING);}}