Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

cc2510 simple tx code help

Status
Not open for further replies.

hithesh123

Full Member level 6
Full Member level 6
Joined
Nov 21, 2009
Messages
324
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
lax
Visit site
Activity points
3,548
I got a CC2510 USB Mini Dev kit.
I am trying to write a very simple(non-simpliciti) TX/RX program. One board for tx and other for rx.
Tx begins when a button is pressed. It transmits one packet with 5 bytes. Address checking is enabled on the receiver.

The tx board seems to be transmitting. I can see it transmit when I use smartRF studio in continuous RX mode. But can't see any RF when I check packet RX mode.

Can anyone help me with the tx code -
Code:
[COLOR="#0000FF"]while(1) 
{
if (!P1_2) //button pressed(active low)
{
bcount+=1;                 //button press counter
RFST=0X03;              //Strobe TX
RFD=rx1_addr;         // Pkt ADDRESS


while(RFTXRXIF==1);              //wait for clear interrupt
RFTXRXIF=0;                // reset and write data
RFD=bcount;


//repeat with same or dummy data, bcoz pktlen is 05
while(RFTXRXIF==1);        //wait for clear interrupt
RFTXRXIF=0;                    // reset and write data
RFD=bcount;


while(RFTXRXIF==1);        //wait for clear interrupt
RFTXRXIF=0; // reset and write data
RFD=bcount;


while(RFTXRXIF==1);        //wait for clear interrupt
RFTXRXIF=0;                    // reset and write data
RFD=bcount; 

 P1_0 =1;
delay();                  //LED stays ON for a while
P1_0 =0;

}
//else enter low power mode with periodic wake up(1ms?)

}[/COLOR]

RF register config (using smartRF studio)
Code:
PKTLEN    = 0x05; // packet length  
PKTCTRL0  = 0x44; // packet automation control 
CHANNR    = 0x03; // channel number 
FSCTRL1   = 0x0A; // frequency synthesizer control 
FREQ2     = 0x5D; // frequency control word, high byte 
FREQ1     = 0x93; // frequency control word, middle byte 
FREQ0     = 0xB1; // frequency control word, low byte 
MDMCFG4   = 0x86; // modem configuration 
MDMCFG3   = 0x83; // modem configuration 
MDMCFG2   = 0x03; // modem configuration 
DEVIATN   = 0x44; // modem deviation setting 
MCSM0     = 0x14; // main radio control state machine configuration 
FOCCFG    = 0x16; // frequency offset compensation configuration 
FSCAL1    = 0x00; // frequency synthesizer calibration 
FSCAL0    = 0x11; // frequency synthesizer calibration 
TEST1     = 0x31; // various test settings 
TEST0     = 0x09; // various test settings 
PA_TABLE0 = 0xFE; // pa power setting 
IOCFG2    = 0x2E; // radio test signal configuration (p1_7) 
IOCFG0    = 0x06; // radio test signal configuration (p1_5)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top