TI CC1101 Radio Project


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    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

  2. #2
    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?

  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

    Hi

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

    BR
    Andy

  4. #4
    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

  5. #5
    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

  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

    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

  7. #7
    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

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