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.

Problem to interface CC2500 with PIC

Other Parts Discussed in Thread: CC2500, SIMPLICITI, MSP430F5419A, CC1101

Pls help me to interface CC2500 with PI32 .

I config PIC32 with CCC2500 on SPI1 Bus Protocols.

Pls send me Sample working code........

  • Hi,

    we don't have any example for interfacing CC2500 and PIC32. We do have example for interfacing CC2500 and MSP430. Please refer to the eZ430-RF2500 board, and SimpliciTI software package.

  • If you search for "spi cc2500 pic32" on google it looks like it's some resources out there you may look at.

  • Hi,

    we have developed SPI code for interfacing and it seems to be working fine.

    we have configured the register of CC2500 and then read it and got the same as written using code.

    I have changed the default  frequency(132-138) of GDO0 pin and only one time it is changed. 

    But now as we change the value of  IOCFG0 register  (e.g. 0x30) and read it back. It is changed to the written value and the frequency is measure by DSO, but not changed.

    And, how can i check that my CC2500 is sending data to receiver end or not?

    is there any procedure to follow before transmitting ?

    thanks in advance..

  • It is unclear from your post what you expect to output on GDO0 pin.

    The software examples here http://www.ti.com/lit/zip/swrc021 shows what is needed for transmitting,

  • i am able to communicate with CC2500 registers and also able to confige them. The problem we encounter here is when we try to change the frequency of GDO0 pin using IOCFG0 register, the value written to the register is ok (i have verified that by reading the same register) but the output frequency is same as before that is 132-138 KHz i.e. the frequency is not changing as per the command given. Please guide me on this

  • 132 - 138 kHz is the default output on this pin (XOSC/192) eq you have not been able to write to this register. Are you sure that you have written to the correct address? If you read the PARTNUM and VERSION registers, do you read the expected value?

  • Now We try on MSP430F5419A.  Do you send me sample code for MSP430 with CC2500?

  • Not directly, the software examples here http://www.ti.com/lit/zip/swrc021 was written for something else. Or you can take a look at this post: http://e2e.ti.com/support/low_power_rf/f/155/p/251144/878771.aspx#878771 CC1101 and CC2500 have the same SPI interface and registers so porting the code to CC2500 should be straight forward.

  • Hi, There is some problems to communicates CC2500 with PIC32. In our code, No data Transmit/receive i.e. CC2500 does not responding.

    Either, IF you wants  to really support me then i will Post my code?  Or pls send me Example ccode for MSP430+CC2500 Source Code (Not a software like SimpleTI).

    Rply Must.

  • Have you looked at the code (http://e2e.ti.com/support/low_power_rf/f/155/p/251144/878771.aspx#878771) I sent? This is the closest we have to a MSP + CC2500 code.

    We could support you by looking at MSP+CC2500 code but if you use a PIC32 we are not able to help you debug the MCU code.

  • Hi,

    we know that you can't help us in debugging the pic32 mcu, but we want help regarding  cc2500 functionality.

    we have developed the code for SPI communication in pic32.and we think its working properly. because ew are able to read and write registers of cc2500.

    we have read the cc2500 register first and then write the register in our code and when again read it back using same function .then it shows value as per our code.

    every time we send command to the cc2500 it gives "0F" back and when we have send "TX STROBE" and then cc2500 starts giving "2F".

    IS it ok or any problem with response of cc2500.

    Is it necessary to do specific change in registers for it to work cc2500.

    attached is the configuration register setting in our code

    #define VAL_IOCFG2           0x29//default chip ready
    #define VAL_IOCFG1           0x2E//default high impedence
    #define VAL_IOCFG0           0x06//0x03// //Asserts when word has sent/receive,de-asserts at end.In RX, pin will de-assert when address check fails or  RX 							FIFO overflows. In TX pin will de-assert if TX FIFO underflows.
    #define VAL_FIFOTHR          0x07//33/32 in TX/RX
    #define VAL_SYNC1            0xD3//default 8 MSB
    #define VAL_SYNC0            0x91//default 8 LSB
    #define VAL_PKTLEN           0xFF//0x06//6 length packet
    #define VAL_PKTCTRL1         0x05//no addres check
    #define VAL_PKTCTRL0         0x05//whitening off,CRC on, fix packet
    #define VAL_ADDR             0x01//default no address
    #define VAL_CHANNR           0x00//default channel no 0
    #define VAL_FSCTRL1          0x07//IF freq 199.95
    #define VAL_FSCTRL0          0x00//default freq offset
    #define VAL_FREQ2            0x5D//carrier freq 2432.M  5D93B1=6132657.
    #define VAL_FREQ1            0x93//carrier freq 2432.M
    #define VAL_FREQ0            0xB1//carrier freq 2432.M
    #define VAL_MDMCFG4          0x2D//BW 203k
    #define VAL_MDMCFG3          0x3B//data rate 2.3989k
    #define VAL_MDMCFG2          0x73//30/32 detect 2-FSK
    #define VAL_MDMCFG1          0x22//0x22//default 4 preamble  		 
    #define VAL_MDMCFG0          0xF8//default 199.95 spacing
    #define VAL_DEVIATN          0x00//deviation 38.085k
    #define VAL_MCSM2            0x07//default time out untill packet end
    #define VAL_MCSM1            0x3F//default If RSSI below threshold unless currently receiving packet
    #define VAL_MCSM0            0x18//64 expire , IDLE to TX/RX
    #define VAL_FOCCFG           0x1D//gate disable
    #define VAL_BSCFG            0x1C//default 
    #define VAL_AGCCTRL2         0xC7//default 33 db
    #define VAL_AGCCTRL1         0x00//default relative carrier sense disable
    #define VAL_AGCCTRL0         0xB2//default normal operation, channel filter sample 16
    #define VAL_WOREVT1          0x87//default 876B=34667 appx. 1 s time out
    #define VAL_WOREVT0          0x6B//default 1 s time out
    #define VAL_WORCTRL          0xF8//default RC calibration on
    #define VAL_FREND1           0xB6//default 
    #define VAL_FREND0           0x10//default 
    #define VAL_FSCAL3           0xEA//default 
    #define VAL_FSCAL2           0x0A//default
    #define VAL_FSCAL1           0x00//
    #define VAL_FSCAL0           0x11//
    #define VAL_RCCTRL1          0x41//default
    #define VAL_RCCTRL0          0x00//default
    #define VAL_FSTEST           0x59//default
    #define VAL_PTEST            0x7F//default
    #define VAL_AGCTEST          0x3F//default
    #define VAL_TEST2            0x88//default
    #define VAL_TEST1            0x31//default
    #define VAL_TEST0            0x0B//default

  • Please Must be rply for our developments.

  • hi,

    we had already seen that table.

    but cc2500 gives responses which are not match with it.

    for example whenever i am reading "marcstate" register some time it gives 0x5f.

    also my cc2500 gives 0xff when we read part no. of the chip.

    we want to make rf transceiver where 2 modules one as a master and other as a slave communicate with each other.

    please any one suggest the configuration register and flow for the same.

    thanks in advance.!!

  • The table gave answers to the reported status in the previous mail.

    If you are reading 0xFF from the PARTNUM register it is something wrong with your SPI interface since this register is a ROM and has the value given in the documentation.