TI CC1101 Radio Project


Closed Thread
Results 1 to 23 of 23
  1. #1
    Join Date
    Jul 2013
    Posts
    41

    Default TI CC1101 Radio Project

    Anyone have experience interfacing to TI's CC1101 series of radios via SPI?

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    Hi Zebryk,
    I'm working on a project similar to yours so perhaps we can learn something from each other. My radio is a KFR transceiver from D6 Labs, and is based the SX1272 chip from Semtech. It uses SPI communications. I've searched this Forum and found the following thread which discusses SPI issues among other things:

    http://www.picbasic.co.uk/forum/show...ghlight=rfm22b

    Forum member Paul has posted some code at post #5 which I have found useful as a guide. Based on this info I have put together some code to just test the send and receive function of the Pic to the KFR radio via SPI. Unfortunately, it is not working as yet ... I'm still trouble shooting. If you are interested I can post my code ... it is very simple.

  3. #3
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    I found this whilst looking for someting else.....

    Maybe of use ? :

    http://www.squirrel-labs-files.co.uk...z-RF1100SE.zip

    BR
    Andy

  4. #4
    Join Date
    Jul 2013
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    Thanks Andy,

    Quite interesting but vast.
    Can you share any background?

  5. #5
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    Hi

    Sorry I haven't used the radio .... I was looking for something else and remembered your post here....So posted link!

    BR
    Andy

  6. #6
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    I used the 900MHz Anaren radio module that uses that chip and what a mental workout, but got it working.
    I found an article in Nutsvolts that helped me structure the sequence of events in order to get it working right. The code is in C+ but was able to decipher what to do.

    Attached is a copy of the article.

    Texas Instruments SmartRF Studio also helped with more insight. It provides all the info on every parameter that sucker uses.

    Let me know if this is relevant and need some sample code. I used it with a PIC16F685 and PBP 2.5 or so back then.
    Attached Images Attached Images
    Louie

  7. #7
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    LinkMTech-
    I was trying to use Microchip's 900MHz radio, but it whipped me - never got it to work (posted elsewhere on this forum) and now am looking for another radio.
    Would you post what you did so I can get a head start on this? I just want to xmit 3 byte packet...... The idea is a 1 to many design.
    Thanks in advance,
    Steve
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  8. #8
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    Sure!
    The A1101R09A module allows you to TX/RX data straight through using one of the GDO pins or using the SPI buffer depending on configuration. I found that using the SPI mode had better bandwidth efficiency with higher throughput.

    I never finished upgrading to its full potential because there's still a lot thats over my head but have plenty of code to get you started.
    I'll go through my files and dig up where I left off.
    Louie

  9. #9
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    Okay, I found the test code for the demo.
    It's old code probably using PBP2.5 so you'll need to adjust to your flavoring.

    I used this to just test the transmitter but it can be configured for RX too.

    Code:
    '****************************************************************
    '*  Name    : Anaren Air Module.PBP
    '*  Date    : 10/30/2010
    '*  Version : PIC12F683 on protoPCB, 1.0
    '*  Notes   : This routine uses DEBUGIN from PC to send SPI data to control
    '*  the Anaren Transceiver Module A1101R09*. The idea is to first load all
    '*  pertinent information to configure the module then using DEBUGIN to
    '*  control the transmitter ON/OFF, mod or w/o mod, baud rate and PA level.
    '*  
    '****************************************************************
    @ __config _INTRC_OSC_NOCLKOUT & _WDT_OFF & _MCLRE_OFF & _CP_OFF
    OSCCON = %01110001  ' Osc 8Mhz
    ANSEL = %00000000	  ' A/D turned OFF
    ADCON0 = %10000000  ' Right justified and OFF
    CMCON0 = 7		      ' Analog comparators off
    GPIO = %00001001    ' 
    TRISIO = %00001001  ' 
    
    DEFINE OSC 8
    INCLUDE "modedefs.bas"
    
    ' DEBUG Defines for Transmitter
    DEFINE DEBUG_REG GPIO   
    DEFINE DEBUG_BIT 1      ' GPIO 1 Pin#6
    DEFINE DEBUG_BAUD 19200
    DEFINE DEBUG_MODE 1 ' 1 = inverted, 0 = true
    
    ' DEBUG Defines for Receiver
    DEFINE DEBUGIN_REG GPIO
    DEFINE DEBUGIN_BIT 3    ' GPIO 3 Pin#4
    DEFINE DEBUGIN_BAUD 19200
    DEFINE DEBUGIN_MODE 1 ' 1 = inverted, 0 = true
    
    
    ' Alias pin assignments 
    SCLK VAR GPIO.4         ' SPI bus clock on Pin#3      
    MOSI VAR GPIO.5         ' SPI bus data to device on Pin#2
    MISO VAR GPIO.0         ' SPI bus data from module on Pin#7  
    _CSN VAR GPIO.2         ' SPI bus select on Pin#5
    
    ' Alias SPI variables
    Address VAR BYTE
    Add VAR BYTE
    mode var BYTE
    register VAR BYTE
    cnt VAR BYTE
    value VAR BYTE 
    
    ' Setup outputs
    _CSN = 1               ' S_SEL set to idle HIGH
    Add = $0
    Value = 0
    mode = $0
    
    PAUSE 500
    
    '/////////////////////////////////////////////////////////////////////////
    '                       Register setup
    ' This routine loads all the register values derived from the TI Smart RF
    ' calculations. Load all mode values here. Takes 19.6ms to load
    ' Highlights: (08:$32, Async transparent mode), (0A:$48, CH#72, 916.396MHz)
    ' (15:$43, Dev = 39KHz)
    '/////////////////////////////////////////////////////////////////////////
        FOR Address = 0 to $2E
            SELECT CASE Address
            CASE 0: mode = $0B : CASE 1: mode = $2E : CASE 2: mode = $0C
            
            CASE 3: mode = $47 : CASE 4: mode = $D3 : CASE 5: mode = $91
            
            CASE 6: mode = $3D : CASE 7: mode = $04 : CASE 8: mode = $22
            
            CASE 9: mode = $00 : CASE $0A: mode = $48 : CASE $0B: mode = $08
            
            CASE $0C: mode = $00 : CASE $0D: mode = $22 : CASE $0E: mode = $B1
            
            CASE $0F: mode = $3B : CASE $10: mode = $CA : CASE $11: mode = $83
            
            CASE $12: mode = $90 : CASE $13: mode = $22 : CASE $14: mode = $F8
            
            CASE $15: mode = $43 : CASE $16: mode = $07 : CASE $17: mode = $30
                   
            CASE $18: mode = $18 : CASE $19: mode = $16 : CASE $1A: mode = $6C
            
            CASE $1B: mode = $43 : CASE $1C: mode = $40 : CASE $1D: mode = $91
            
            CASE $1E: mode = $87 : CASE $1F: mode = $6B : CASE $20: mode = $F8
            
            CASE $21: mode = $56 : CASE $22: mode = $10 : CASE $23: mode = $E9
            
            CASE $24: mode = $2A : CASE $25: mode = $00 : CASE $26: mode = $1F
            
            CASE $27: mode = $41 : CASE $28: mode = $00 : CASE $29: mode = $59
            
            CASE $2A: mode = $7F : CASE $2B: mode = $3F : CASE $2C: mode = $81
            
            CASE $2D: mode = $35 : CASE $2E: mode = $09
            
            END SELECT
            
            _CSN = 0               ' Enable Select bit
        GOSUB chip_status      ' Allow data transfer when device ready
            SHIFTOUT MOSI,SCLK,1,[Address,mode] 
            _CSN = 1               ' Disable Select bit        
        NEXT Address
    ' Additional setups
            _CSN = 0               ' Enable Select bit
            GOSUB chip_status      ' Allow data transfer when device ready
            SHIFTOUT MOSI,SCLK,1,[$7E,$8E] ' Set PA output to 0dBm
            SHIFTOUT MOSI,SCLK,1,[$33]  ' Calibrate synthesizer then turn OFF 
            _CSN = 1               ' Disable Select bit        
        
    '/////////////////////////////////////////////////////////////////////////
    '                       Main test program loop
    ' Use DEBUG to monitor on Realterm set to Port 4 and 19200,8,1,N on laptop
    ' USB port nearest DVD player.
    ' Command type examples:    
    '   Turn ON TX:         0 53 0
    '   Turn OFF TX:        0 54 0
    '   Change CH#:         4 n 0       ' n=CH# 0~130
    '   Change mod type:    1 16 202    ' 38.4KB 1st entry
    '                       1 17 131    ' 38.4KB 2nd entry
    '
    '   Change PA level:    1 126 3      ' -30dBm
    '                       1 126 14     ' -20dBm
    '                       1 126 30     ' -15dBm
    '                       1 126 39     ' -10dBm
    '                       1 126 142    '  0dBm
    '                       1 126 205    ' +5dBm
    '                       1 126 199    ' +7dBm
    '                       1 126 192    ' +10dBm  
    '/////////////////////////////////////////////////////////////////////////
    Main:
        DEBUGIN 10000, Main,[add,Address,mode] ' Loop here until PC data RX'd.
            SELECT CASE Add
                CASE 0: GOTO single
                CASE 1: GOTO burst
                CASE 2: GOTO multi
                CASE 3: GOTO CH_change
                CASE 4: GOTO CH_change_mod
            END SELECT
            
    single: ' Sends only the Address value to the module. Takes 173us.
            _CSN = 0               ' Enable Select bit
            GOSUB chip_status      ' Allow data transfer when device ready
            SHIFTOUT MOSI,SCLK,1,[Address] 
            _CSN = 1               ' Disable Select bit
            DEBUG "Address value sent to module ",DEC Address,13,10    
    GOTO Main
    
    burst:  ' Sends Address and mode values together to the module. Takes 340us 
            _CSN = 0               ' Enable Select bit
            GOSUB chip_status      ' Allow data transfer when device ready
            SHIFTOUT MOSI,SCLK,1,[Address,mode] 
            _CSN = 1               ' Disable Select bit
            DEBUG "Address and Mode value sent to module ",DEC Address, " and ", DEC mode,13,10
    GOTO Main        
            
    multi:  ' Sends Address and mode values sequentually to the module
            _CSN = 0               ' Enable Select bit
            GOSUB chip_status      ' Allow data transfer when device ready
            SHIFTOUT MOSI,SCLK,1,[Address] 
            _CSN = 1               ' Disable Select bit
            PAUSEUS 50
            _CSN = 0               ' Enable Select bit
            WHILE MISO : WEND      ' Allow data transfer when device ready
            SHIFTOUT MOSI,SCLK,1,[mode] 
            _CSN = 1               ' Disable Select bit            
    GOTO Main
    
    CH_change:  ' Changes channel based on channel number input. Takes 1.19ms
            _CSN = 0               ' Enable Select bit
            GOSUB chip_status      ' Allow data transfer when device ready
            SHIFTOUT MOSI,SCLK,1,[$36]      ' Turn OFF TX
            SHIFTOUT MOSI,SCLK,1,[$12,$B0]  ' Setup for no modulation
            SHIFTOUT MOSI,SCLK,1,[$0A,Address]  ' Enter CH#
            SHIFTOUT MOSI,SCLK,1,[$31]  ' SFSTXON, Cal synth and stby
            SHIFTOUT MOSI,SCLK,1,[$35]  ' STX, turn ON transmitter         
            _CSN = 1               ' Disable Select bit
    GOTO Main
    
    CH_change_mod:  ' Changes channel and enables modulation. Takes 1.19ms 
            _CSN = 0               ' Enable Select bit
            GOSUB chip_status      ' Allow data transfer when device ready
            SHIFTOUT MOSI,SCLK,1,[$36]      ' Turn OFF TX
            SHIFTOUT MOSI,SCLK,1,[$12,$90]  ' Setup for modulation
            SHIFTOUT MOSI,SCLK,1,[$0A,Address]  ' Enter CH#
            SHIFTOUT MOSI,SCLK,1,[$31]  ' SFSTXON, Cal synth and stby
            SHIFTOUT MOSI,SCLK,1,[$35]  ' STX, turn ON transmitter         
            _CSN = 1               ' Disable Select bit
    GOTO Main
    
    chip_status:    ' Wait until module ready to accept new data
        IF MISO = 1 THEN chip_status
    RETURN
    
    END
    Here's the schematic to go with that code:

    Module demo.pdf



    This code was used on the keyfob using the PIC16F685. I was able to send a 22 byte message error free using the TX FIFO register. I think the module configuration is the same as above but don't have my hand written notes handy.

    Code:
    main:    
        m = m+1
        GOSUB TX_FIFO
        Grn = 1
        GOSUB transmit      ' Takes 176us to send command
        Grn = 0
        WHILE !GDO0: WEND   ' Goes High after Preamble and Sync Word sent 
        WHILE GDO0 = 1      ' and takes 2ms before sending packet. 
            Grn = 1         ' Wait for TX to complete
        WEND                ' 1 byte packet takes 233us to TX
        Grn = 0
        GOSUB Clear_TX_FIFO   
        PAUSE 100
    GOTO main
    
    '==========================  Data packet loading  ========================
    ' Burst data into TX FIFO register $3F by adding $40
    TX_FIFO:
        _CSN = 0               ' Enable Select bit
        GOSUB chip_status      ' Allow data transfer when device ready
        SHIFTOUT MOSI,SCLK,1,[$7F,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,_
        $0B,$0C,$0D,$0E,$0F,$10,$11,$12,$13,$14,$15,$16,$17,m]     
        _CSN = 1               ' Disable Select bit
    RETURN
    
    '========================  Transmit routine ==============================
    transmit:
        _CSN = 0               ' Enable Select bit
        GOSUB chip_status      ' Allow data transfer when device ready
        SHIFTOUT MOSI,SCLK,1,[$35]  ' STX, turn ON transmitter         
        _CSN = 1               ' Disable Select bit
    RETURN
    
    Clear_TX_FIFO:
        _CSN = 0               ' Enable Select bit
        GOSUB chip_status      ' Allow data transfer when device ready
        SHIFTOUT MOSI,SCLK,1,[$3B]  ' Flush out TX FIFO buffer             
        _CSN = 1               ' Disable Select bit
    RETURN
    Louie

  10. #10
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    Thanks Louie-
    I plan on using the A1101R09A00GM module, is that what you used? It should arrive tomorrow.
    My idea is more of using these modules as a transmitter and receiver application even though they are transceivers.
    How did you use the RSSI or did you? I would like to be able to see which transmitter is closest to which receiver. and then establish a link, send a few bytes and that pretty much it. More of a sensor transmission....
    Does this sound reasonable given your experience?
    -Steve
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  11. #11
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    I have successfully used the RSSI from a receiver for TPM testing at work while designing an AGC circuit for a TPM Transmitter program. just remember that if using ASK transmissions you will need a fast A/D and you should gather enough data during a xmission to see the PEAK level. I have used this to program an 8 bit attenuator at the frontend of the receiver using successive approximation routine I wrote. That way each of the test Transmitters have the same received signal strength to the receiver for timing verification purposes. It is NOT as critical for the A/D if you are using FSK mode. I wish I could share more but I wrote the software for the company I work for... Good Luck...
    Dave Purola,
    N8NTA
    EN82fn

  12. #12
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    You're welcome Steve,
    Yup, that's one of them. I also used the other where you have to connect an external antenna.
    The device has a digital RSSI register that can be read continuously. I never got to it in that last product where I was going to use for "clear channel search".
    The code provided sets the transmitter modulation to 4 level FSK at +-39KHz deviation if I recall.

    It can be configured to be a transmitter only, receiver only or switch between the two modes, it's up to you.
    Your application is feasible, keeping air time management in mind to avoid transmission collisions, just like you would anyways with direct data connections.

    Here's 1 data sheet on the RSSI you can go through. I couldn't upload the other because of it's size but can get it here.

    Dave- What is TPM?
    Attached Images Attached Images
    Louie

  13. #13
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    thanks Guys-
    My modules are due in tomorrow, however, I have to go out of town on business so it will have to wait a bit longer darn it.
    I really can't wait to see this work!
    The MRF module never did work nor could I find ANYONE who saif they got it to work in packets!
    Thanks again. Will keep you posted on progress - and code.
    Regards to All.
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  14. #14
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    Yeah, I bought a pair of them MRF's too but only ended up staring at them cuz they look cool.
    Louie

  15. #15
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    Yup. I should have my radios in waiting for me Monday. Then I can see about playing with them.......
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  16. #16
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    Steve,
    I remembered unsuccessfully trying to solder rework wire to the module's pads only to damage it.
    Do you make your PCBs?

    I have some older revision PCBs with footprints for these module if you're interested. No strings, just willing to help.
    Louie

  17. #17
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    I would REALLY appreciate that. I just looked at my radio development 'kits' (2) and all I got was the module with an antenna! It looks as if these plug into something else........
    So, it looks like I am going to make a cheap proto pcb....... I use Eagle, what do you use?
    Regards,
    Steve
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  18. #18
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    I use Express PCB and Pad2Pad for my boards.
    Which kits did you order?

    PM me your address so I can mail you some PCBs.
    Last edited by LinkMTech; - 6th July 2015 at 16:00. Reason: clarity
    Louie

  19. #19
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    I ordered the CC1101EMK868-915 from Mouser. Then just today I ordered the SOC-BB also from Mouser.
    The SOC-BB should (?) allow me to plug in the radio modules, power via battery which is kinda weird, but will allow me to SPI-communicate to the radio.
    I have been told the TI will work for me to do my coding, then move to the Anaren part which has the TI part and is FCC licensed.

    I don't think I could use the Pad2Pad file to create my foot print for the radio, I will double check.

    Thanks for the offer on the boards, but as I will need to generate my own with the radio, I think I should just muddle through and do it myself.

    I would like to know more about the RSSI and actually how to use the data, were you successful in doing this? The other post made it sound as if going FSK would be easier.
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  20. #20
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    I didn't get to the RSSI function but didn't see it a problem since it means reading a register during the RX mode. The level range is pretty good and linear.

    The RSSI value is available to be read from a register when the module is in RX mode. This value varies with the other transmitters signal strength reaching it. The value will of course be digital but have a minimum to maximum value. There will always be some value there due to noise or other transmitters on same channel.

    Here's a simplified example of using it in your app, keeping the timing between TX and RX from module to module in mind:

    Base changes to TX mode and sends addressed query message to sensor
    Base changes back to RX mode and begins reading RSSI register

    Addressed sensor receives message and changes to TX and sends an ACK of some sort
    Sensor module reverts back to RX mode

    Base monitoring the RSSI records the value during valid message from sensor.

    Since you want to "talk" to the closest sensor, query the others in the same way then choose the one with the highest RSSI value after comparing all RSSI's.

    This is a general description of the signal strength. There are other factors that will cause it to vary like interference, fading, etc. but it's a pretty good indicator to work with.
    Louie

  21. #21
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    Thanks Louie. What proc did you use with you radios?
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  22. #22
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    Hmmm, I never used PM so I have no experience with attaching PDFs. Try changing the extension name.
    Did you try the other email address I sent?
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  23. #23
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: TI CC1101 Radio Project

    Used a PIC16F677 or a PIC16F685 in my devices.

    PMs and PDF sent...
    Louie

Similar Threads

  1. Need Help with Radio Project
    By prstein in forum Off Topic
    Replies: 6
    Last Post: - 25th February 2011, 05:04
  2. Car radio (Car radio and electronics support forum)
    By freewillover in forum Forum Requests
    Replies: 1
    Last Post: - 1st July 2009, 19:41
  3. RS232 by Radio
    By Bill Legge in forum Serial
    Replies: 21
    Last Post: - 5th March 2009, 15:16
  4. radio pic connection
    By taos in forum General
    Replies: 3
    Last Post: - 25th February 2006, 00:55
  5. Help With Easy Radio Modules
    By hughgoodbody in forum General
    Replies: 5
    Last Post: - 25th May 2005, 09:14

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts