nRF24L01 fast TX

Discussion about wireless devices

Re: nRF24L01 fast TX

Postby domen » Wed Dec 24, 2008 5:08 pm

Ugh :-(

Thank you
domen
 
Posts: 7
Joined: Mon Dec 22, 2008 12:49 pm

Re: nRF24L01 fast TX

Postby SteveD » Tue Feb 10, 2009 8:59 pm

brennen wrote:According to the datasheet, the reason for that is that the PLL runs in open-loop mode while you are in active TX mode. Therefore, it has no feedback to ensure that it is keeping the proper clock time, so you could get out of sync if you go longer than 4 ms. I really wish they would fix this, personally. :x


Is this lack of feedback the reason there is no "oscillator ready" register? Is there a way to know when the oscillator has settled, instead of just delaying 1.5 ms after turning the radio on? Also, how will the 1.5 ms settling time and the 4 ms max transmit time change with temperature? Are these times based off the worst case scenarios?

Thanks for your help,

Steve
SteveD
 
Posts: 3
Joined: Mon Nov 24, 2008 7:13 pm

Re: nRF24L01 fast TX

Postby brennen » Tue Feb 10, 2009 10:14 pm

SteveD wrote:Is this lack of feedback the reason there is no "oscillator ready" register?

That would be my guess, but I'm not sure.

SteveD wrote:Is there a way to know when the oscillator has settled, instead of just delaying 1.5 ms after turning the radio on?

Not that the datasheet describes.

SteveD wrote:Also, how will the 1.5 ms settling time and the 4 ms max transmit time change with temperature?

Not really sure, as they don't give any curves in the datasheet.

SteveD wrote:Are these times based off the worst case scenarios?

I can't really say for sure, but I would assume that they probably are. Or at least I would imagine they're based on the worst case that you would find under normal operating conditions.

You could probably get much better answers from Nordic's technical support for these questions, and I've found that they're really responsive.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: nRF24L01 fast TX

Postby Hemanth » Thu May 14, 2009 4:27 am

Hi i am Hemanth i have written a code for nRf24l01 using PIC16f877A and microbasic compiler i have written procedures for SPI read(r_register) and SPI write(w_register) ,i have made portb.5 as input which is Rx/Tx select(portb.5=1 Tx else Rx),
any one please check this code and reply why it is not working or else please send the code for nRF24l01 written in microc or microbasic compiler to my email id hemanthnt@gmail.com,hemanthnt@yahoo.com



program hhh

dim out_byte as byte[33]
dim in_byte as byte[33]
dim statu as byte
dim required as byte
dim ax,ay,ax1,ay1 as integer
dim che,intcheck,tru,check as byte
sub procedure w_register(dim comm_and as byte, dim c_byte as byte)
clearbit(portc,1) 'clear ce
clearbit(portc,2) 'clear csn
ax=c_byte
if ax<>0 then
ax1=0
spi_write(comm_and)
do
spi_write(out_byte[ax1])
ax1=ax1+1
ax=ax-1
loop until ax<>0
setbit(portc,2)
else
spi_write(comm_and)
end if
setbit(portc,2) 'set csn
end sub


sub procedure r_register(dim rcommand as byte,dim r_c_byte as byte)
clearbit(portc,1) 'clear ce
clearbit(portc,2) 'clear csn
ay1=$1
ay=r_c_byte
statu= spi_read(rcommand) 'status
trisc=$31
required=spi_read($ff) 'required data from fifo
if r_c_byte<>0 then
in_byte[0]=required
do
in_byte[ay1]=spi_read($ff)
ay1=ay1+1
ay=ay-1
loop until ay<>0
trisc=$11
end if
setbit(portc,2)
end sub

sub procedure interrupt
check = intcon
check = check and $02
if portb.5<>%0 then
if check=$02 then
intcheck=$ff
intcon=$90
end if
else
intcheck = $aa
intcon=$90
end if
end sub

main:
trisc=$11 'make rc0=irq and rc4=sdi as input
trisd=$00
trisb.0=%1 'ext interrupt
trisb.5=%1 'tx/rx select
tru=$ff
Spi_Init_Advanced(MASTER_OSC_DIV4, DATA_SAMPLE_MIDDLE, CLK_IDLE_LOW, LOW_2_HIGH)
intcon = $90 'enable external int0 interrupt
pie1 = pie1 xor pie1
pie2 = pie2 xor pie2

setbit(portc,1) 'ce=1
delay_ms(10) '10ms delay
clearbit(portc,1)
setbit(portc,2) 'make csn=1
if portb.5<>%0 then
w_register($e1,$00) 'flush tx 'flush tx tx mode
out_byte[0]=$70
w_register($27,$01) 'reset irq in status
out_byte[0]=$0A
w_register($20,$01) 'write config
delay_ms(2)
out_byte[0]=$bb 'write TX_ADDR
out_byte[1]=$bb
out_byte[2]=$bb
out_byte[3]=$bb
out_byte[4]=$bb
w_register($30,$05)

out_byte[0]=$bb 'write RX_ADDR_P0
out_byte[1]=$bb
out_byte[2]=$bb
out_byte[3]=$bb
out_byte[4]=$bb
w_register($2a,$05)



out_byte[0]=$01 'write EN_AA
w_register($21,$01) 'enable data pipe 1

out_byte[0]=$02 'writr RX_ADDR
w_register($22,$01) 'enable address for data pipe 0

out_byte[0]=$0f 'write RF_CH
w_register($25,$01) 'select channel 4

out_byte[0]=$05 'RX_PW_P0
w_register($32,$01) '5 bytes

out_byte[0]=$05
w_register($24,$01) 'auto retransmit

out_byte[0]=$0F 'RF_steup
w_register($26,$01) '2 mbps ,LNA gain on


out_byte[0]=$0A 'write config
'out_byte[11]=$0a 'Setup CONFIG-> PRX=0(TX_device), PWR_UP=1, CRC 2bytes, Enable CRC
w_register($20,$01)
else
out_byte[0]=$0b 'write config
w_register($20,$01)
delay_ms(2)
out_byte[0]=$bb 'write RX_ADDR_P1
out_byte[1]=$bb
out_byte[2]=$bb
out_byte[3]=$bb
out_byte[4]=$bb
w_register($2f,$05)

out_byte[0]=$02 'write EN_AA
w_register($21,$01) 'enable data pipe 1

out_byte[0]=$02 'writr RX_ADDR
w_register($22,$01) 'enable address for data pipe 0

out_byte[0]=$0f 'write RF_CH
w_register($25,$01) 'select channel 4

out_byte[0]=$05
w_register($24,$01) 'auto retransmit

out_byte[0]=$05 'RX_PW_P1
w_register($36,$01) '5 bytes

out_byte[0]=$0F 'RF_steup
w_register($26,$01) '2 mbps ,LNA gain on


out_byte[0]=$0B 'write config
'out_byte[11]=$0a 'Setup CONFIG-> PRX=0(TX_device), PWR_UP=1, CRC 2bytes, Enable CRC
w_register($20,$01)

end if

while tru<>0
if portb.5<>%0 then
out_byte[0]=$ff
out_byte[1]=$00
out_byte[2]=$ff
out_byte[3]=$00
out_byte[4]=$ff
w_register($a0,$05) 'write TX_PLD
setbit(portc,1)
delay_us(20)
clearbit(portc,1)
r_register($07,$00)
che=statu
'portd= che
'delay_ms(3000)
che = che and $70
'portd=che
'delay_ms(3000)
if intcheck=$ff then
select case Che
case $20
intcheck=$ff
out_byte[0]=$70
w_register($27,$01) 'clear interrupt

case $40
w_register($e1,$00) 'flush tx
out_byte[0]=$70
w_register($27,$01)
case else
w_register($ff,$00)
end select
else
portd=$ff
delay_ms(3000)
end if

else
portc.1=1 'receive enable
delay_us(160)
portc.1=0
r_register($07,$00)
che = statu
'portd=che
'delay_ms(3000)

che = che and $70
'portd=che
'delay_ms(3000)

if intcheck=$aa then
select case che
case $40
intcheck=$aa
out_byte[0]=$70
w_register($27,$01)
case else
w_register($ff,$00)
end select
else
portd= $bb
delay_ms(3000)
end if
end if


if intcheck=$ff then
portd=$ff
delay_ms(5000) 'flush tx
else
if intcheck = $aa then
R_register($61,$05) 'read rx payload
portd=in_byte[0]
delay_ms(1000)
portd=in_byte[1]
delay_ms(1000)
portd=in_byte[2]
delay_ms(1000)
portd=in_byte[3]
delay_ms(1000)
portd=in_byte[4]
delay_ms(1000)
end if
end if
WEND
end.
Hemanth
 
Posts: 1
Joined: Tue May 05, 2009 7:49 am

Re: nRF24L01 fast TX

Postby barghi.armin » Tue Jan 13, 2015 10:07 pm

Hi
I am student and i want transmitting the data with NRF24L01.
I can get 20Kb/s.
I want more data rate
can you email your code for me?
thank you
Barghi.armin@gmail.com
barghi.armin
 
Posts: 1
Joined: Tue Jan 13, 2015 9:59 pm

Previous

Return to Wireless

Who is online

Users browsing this forum: No registered users and 1 guest

cron