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.

[SOLVED] nRF24L01 + ATmega328PB wireless communication

Status
Not open for further replies.

kekecjan

Newbie level 4
Joined
Jun 29, 2020
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
91
Hello, I am working on nRF24L01+ with ATmega328pb. I am using Atmel studio 7. I read pdf before: nrf24l01_tutorial_0.pdf.
i am trying to send data from transmitter to receiver. Well i did managed to send 1 byte of data and it worked well. Then i send 3 bytes and what happend is i got 3 bytes with the same payload. Payload consists of numbers : TX_BUF[0]=k++ (always counts just to see if it's still alive and sending), TX_BUF[1]=144; TX_BUF[2]=167; (two fixed values). On the receiver i get 3 bytes of TX_BUF[0].Plus i also get lost packages, that's probably my fault because i am not using IRQ pin (interrupts), and its not synchronized (only my guess, i am not for sure).
Screenshot_1.png


I didnt copy code here because it has a lot of lines soo i am just sharing main.c with you : nrf24l01_TX_RX.txt .
(i am not using ADC, i am using UART with interrupts for debugging, i wrote SPI in main.c)

Hope anyone can solve my problem cuse i am in dead end.
 

Attachments

  • Screenshot_1.png
    Screenshot_1.png
    38.5 KB · Views: 84
  • nrf24l01_tutorial_0.pdf
    503.1 KB · Views: 84
  • nrf24l01_tutorial_0.pdf
    503.1 KB · Views: 164
  • nrf24l01_TX_RX.txt
    14.4 KB · Views: 161

Ok i solved it on my own, in RX mode i just deleted nRF24L01_write_buffer(FLUSH_RX,0,1); . soo i belive when i recived 1 byte
i flush RX FIFO and flush other bytes, still not sure (i guess while in transmitting and receiving mode you must not flush RX nor TX FIFO)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top