# TRW-24G cc5x code not working

**URL:** <https://community.sparkfun.com/t/trw-24g-cc5x-code-not-working/1901>\
**Category:** Wireless & IoT\
**Created:** [May 16, 2006, 4:39pm UTC](https://community.sparkfun.com/t/trw-24g-cc5x-code-not-working/1901 "2006-05-16T16:39:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mango4u](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@mango4u](https://community.sparkfun.com/u/mango4u)\
**Post date:** [May 16, 2006, 4:39pm UTC](https://community.sparkfun.com/t/trw-24g-cc5x-code-not-working/1901/1 "2006-05-16T16:39:02Z")

</div>

Hi! below is the code Im sending from module to another. The same code lives in both modules and well in theory this should work. Can anyone see why this wouldnt work. the code works with both modules connected to 1 pic but when I isolate the modules with their respective pics and run the program it doesnt work. 😢

thanx in advance

mango4u

```auto
while(1)
    {
      
        
       if(SW==0)
        {
        delay_ms(250); 
        delay_ms(250); 
        configure_transmitter();
        receiveLED=0;
        data_array[0] = 0x31;
        data_array[1] = 0x32;
        data_array[2] = 0x33;
        data_array[3] = counter;
        DelayUs(); // delay 100uS
        transmit_data();
        delay_ms(10);
        configure_receiver();        
       }
        
        
        if(RX_DR == 1) //We have data!
          { 
            DelayUs();
            receive_data();
            receiveLED=1;
          }

```

---

<div class="post-metadata">

**Author:** ![ggallant](https://avatars.discourse-cdn.com/v4/letter/g/51bf81/32.png) [@ggallant](https://community.sparkfun.com/u/ggallant)\
**Post date:** [May 16, 2006, 5:32pm UTC](https://community.sparkfun.com/t/trw-24g-cc5x-code-not-working/1901/2 "2006-05-16T17:32:49Z")

</div>

I am not able to view your entire code so here are some observations:

1. When both radios are on a single pic the tx/rx is very synchronized.

2. When Sw != 0 there is no configure\_receiver().

3. I would put one unit in continuous tx mode and the other in rx.

4. If you have the hardware, configure one pic with your orininal 2 radio

setup and put a third radio on the second pic in rx only.

George[/quote]

---

<div class="post-metadata">

**Author:** ![Wireless\_Nothing](https://avatars.discourse-cdn.com/v4/letter/w/a5b964/32.png) [@Wireless\_Nothing](https://community.sparkfun.com/u/Wireless_Nothing)\
**Post date:** [May 16, 2006, 7:03pm UTC](https://community.sparkfun.com/t/trw-24g-cc5x-code-not-working/1901/3 "2006-05-16T19:03:27Z")

</div>

More than likely what’s happening is BOTH transceivers are configured as a transmitter and receiver at the same time. To avoid this, setup one end to act like a slave (only send when he receives).
