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: Receive data in asynchronous mode / set the threshold

Part Number: CC1101

Hello!

As I found out in another thread of mine, I'll need to implement and use the "asynchronous" communication method with the CC1101.

I want to know how the data is returned, when it's supposed to be "raw data". What is "raw data"? Do I get amplitude values (0-255 or so) or will it be kind of demodulated into "high / low" already?

If the chip already maps the signal to 1 and 0, how can I set the threshold? When using synchronous communication, I already encountered the issue that it would detect random noise as data, because probably the threshold was too low.

Thanks in advance!
Dave

  • Hi ,
    The detail of how async mode operates is located in section 27.1 of this doc www.ti.com/.../cc1101.pdf
    Essentially, the packet handling capability of the device is disabled and whatever the demodulator sees is output on a pin. If a valid packet it received you will be able to see it on the Oscope otherwise you will see random bit stream.

    This implementation requires an external MCU to do the packet handling on the received bit stream that is available on the GDOx pins.

    Some relevant threads might be of help here:
    e2e.ti.com/.../619331
    e2e.ti.com/.../15886
    e2e.ti.com/.../1110397
  • Thanks, I read the documentation already. What would you recommend on the external MCU? Try to match the baud rate of my signal when reading the pin (GDO2) or read all the time..? (In that case I probably read way too many values in a very short timeframe)

    My current issue is that I do get data from my off-the-shelf 433MHz transmitter, but either I'm too slow and can't record the whole signal of one button press or I read a few bits of the actual signal so often that I see only 1s or only 0s in my result array.

  • If possible, read with 3 times oversampling with a majority vote. This to suppress any glitches on the output signal. 

  • Does this mean to read 3x as frequently as the signals baud rate like this?

    while True:
       #do something
       delay(1/(3*baudrate))

  • Okay thanks, I will try it! And then take the median of each of 3 measurements or...?
  • In my original signal, a data symbol is 3 bits (and the baudrate is adapted to match that), so I will simply ending up having instead of "110" for a ONE, "111111000" and instead of "100" for a ZERO, I will have "111000000". Correct?
    How would I notice a "glitch"? A bit flip in one of these 2 sequences? Or a different value other than 0/1 ?
    If It's a bit flip, I would probably read the signal in packets of 3 bits and set it to the bit value that the "majority" of the 3 bits has, right?
  • If you do 3x oversampling, a logic high will look like 111 and logic low 000. If you have a glitch a bit could look like 010 (logic zero). Hence you do a majority vote (if you get more '1' than '0' you have a logic '1')
  • Hmm either I have a huge lot of glitches or something's wrong.

    I recorded the signal with 2M samples per second and after analysing with Octave I found out that around 2000 samples make up one pulse. So one pulse takes 0,001 seconds. The pulse consists of 3 thirds which can each be a 1 or a zero (at least I set the data rate up like this in TX mode and didn't change the setup). So a logical "high" pulse is 110 and a "low" is 100. If these 3 data points take 0,001 seconds and we oversample by a factor of 3, we will get a "delay" value of around 0,0001.

    Does this make sense or do I have an error in this logic?

    Here's the output of a 4000 bit "recording" from the antenna.

    11000000000000011000000000010000000000110000000000100000000000100000000000000000000000000000000000000000000110000111111111101111111111001111111110111111100111111001101111110111011011111110011110011110001111111001111101110011110001001101100110000111111101101100110001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101111110110111111011011111101111111110111011111011101111110110111110011011111001100001000100011100111000111001111111111111111111111111111011111111101111111110111111111111110111111111011111110011111111111111011011111011100011111101100111110110111100110001111110011110010000111111011000011000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100101111101110111100100111101111111111111111101100111101101111101101000001101110001100001001001111001001111001000010001000000011111111111111111111111111110101111111111111111111111111111101111011111101111011110111111111111111111111110111110111011111101111001100111001111111111111111111111111111101111111101111001001000010011000011110100111101101111011011110111111110111111101101111011011110010110100101111101001100011001100110011001000001011000000000000001000011110000001100000000000010000001110110111101000111111011110110011111111110110111101101111011001111110111001000111100111111111111111111011110001001100101000100000000011101011101011110110111001010110110111101000010010011101101110010011101001110010101001000100010010000000010010100100000011100000111000001000001111001111110111101000111101111011101111111111111111101101111010001100110100111100111111110111110011110000100110001101010101110101111011111101111110110111101011100101111010111101011000100010010011001101110010101011000000100000010000000000111100111111111111111111111111110111001001111101111110101111101001110110100110100101110011111111111111111111110101111001000000111111111101111111111111010111011111100101110110111010110101011111101110110111010000001001001100100101110100011111111111111111111111111111111111111110111111101011110011110011111111111111011111111110000000000001111111111101111111111110111111011111011111101011101111110101110100010010011110001111001111000110000000100000001110110111111111011111010111110111111111111111111111111000000111111111111011101111010010000010100101100111100011100011100000000000000001111111101101110111011111011111110111101101001100111111111111111111111000101101011110111111011011101001110011100000111111111111101111111111111110111111111111111111110100111101111001111011101001111001111111111111001111001110000111111111111111110111101000010001100010000101000110010011110111111111110111111110110111111110100111100011001111001111111111110010000000101000100111110010010011111000100000011100000000001000000001011111111111111111101011010011110011111111111111111111111111111111111111111110110101010101110111111111111110011000110000000110101010000011110010111111111010111111111111011001100110101111111101011110110111011111010110010010000110011001100100100000010011101101111100110010001011111101111000001001111011110100111010000000000101001100011101111110111111101110101010110000010100110111111001100010001001011111000001001111111111111111111111100110111111011110100001101111010101010011010100010100001010100100000000001011101101011111010101111100101110101100100011110101011001010000000000111111111011111011111111111111111111111111111101111011111111010001000110010001111111001111101001011101111010010000101011011110101111111111111001101110011111101111101011111111111111001110100111111011111100100001001100011001111010110011111111010011010101000101100010000000001101001011100101111011010111110100011111101010001010111111101010010100000100011111111001111111111111111111111110010111101111110101010100001011000010101111111110010101011111010100111010111010111001000010001011101111111111110101101000101111110100101110011111010000011101110001110000111111101011001111110100001111111101011111011100010000000101111101111111

  • Another question: How could I "sync" the loop (that includes a very specific delay) so that it aligns with the signal? Maybe read the pin with a very short time delay until a "1" is received and start the main loop after that?
    Also, I am getting inverse values (1 all of the time when there's no signal). Is that an issue (I currently just flip the bits after the whole reception etc.) and if so how do I tell the CC1101 to invert the signal?

  • I'm pretty sure this entire thing isn't going to work out, because my micro controller can't read that fast :(
  • Closing this thread since you are trying to solve the issue differently now.
  • Yup, sure!