Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

nRF24 simple to use, multilink library
Goto page Previous  1, 2
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here
View previous topic :: View next topic  
Author Message
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 1130

poland.gif
PostPosted: Tue May 13, 2025 6:23 am    Post subject: Reply with quote

A small update.
There is interesting module on the market. This is RF-Nano where nRF24 is integrated with Arduino Nano in the one small board. So making connection and 3V3 power supply is not needed.
With them you can have multilink or simple radiolink very fast.



One thing is that they dont use IRQ signal from nRF radio.



So I must modify library and make some improvements by the way.

First is that IRQ is not used. Instead Status register is readed where bit 6 meaning of new data received. So this is pulling.
Next improvement is adding pullup on MISO by setting Portb.4 = 1 after Hardware SPI is configured. This improve stability.
Then a bound is given for reading from radio into buffer. Because radio can receive some trash, number of bytes to read can exeed the buffer len (33 bytes here).
Then it could happen that some variables after buffer may have been overwritten. So I add checking and read only 33 bytes max.



In the example (and my project actually) Im using only 5 byes payload but you can use more. Simply if data arrived then data is in the buffer Rx_bytes(1-33)
If you want to send something then like in the attached sub simply call Tx_mode() and put data bytes into FiFo buffer.

This working fine for me. With them I have net of 13 modules where they can bidirectional communicate at once.

_________________
Check B-Flash -my MCS bootloader app for Android (updated)
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 6180
Location: Holland

blank.gif
PostPosted: Sat May 17, 2025 1:36 pm    Post subject: Reply with quote

thanks EDC. the polling options is great enhancement/option.
_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum