This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problems with Nordic nRF24E1 and serial protocol

Hey out there,

finally I'm at my PC again and can post my code if needed.
Here's the situation: I've bought me a nRF24E1-EVKIT from nordic because I want to transmit an extern generated serial realtime protocol wireless. The protocol has 8 data bits and 1 start and stop bit, just like the serial interface. the baudrate is 31.25 kBaud. the problem is that i'm not that into programing 8051 and need a little help from my friend ;)
Here's what I got so far:

/* init the serial I/O */
SM0 = 0; SM1 = 1; /* serial port MODE 1 */
SM2 = 0;
REN = 1; /* enable serial receiver */

TI = 0;	/* clear transmit interrupt */
RI = 0;	/* clear receiver interrupt */

ES = 1;	/* enable serial interrupts */
PS = 0; /* set ints to low priority */

/* init timer1 as baudrate generator */

TR1 = 0;  /* stop timer 1 */
ET1 = 0;  /* disable timer 1 interrupt */

PCON |= 0x80;  /* 0x80=SMOD: set serial baudrate doubler */

TMOD &= ~0xF0;  /* clear timer 1 mode bits */
TMOD |= 0x20;  /* put timer 1 into MODE 2 */

TH1 = 248; /* 31250@16MHz is that value correct?*/

TR1 = 1;  /* start timer 1 */

/* ISR for Rx and Tx serial data*/

static void com_isr (void) interrupt 4 using 1
{
  if (RI != 0)  /* Received data interrupt */
  {
    RI = 0;
    // problem: put the recieved data to the wireless SFR to be transmitted
  }
}

Is that code correct so far? it took me a long time to understand all that. ;) if so, what need i to do to put the received data to the RF? should i use a buffer?
thanks for your help! i realy apreciate.

regards,

b. morgenthaler

0