Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 21, 2024, 09:59:31 09:59


Login with username, password and session length


Pages: [1]
Print
Author Topic: nrf24L01p code for 8051?  (Read 6197 times)
0 Members and 1 Guest are viewing this topic.
max
Senior Member
****
Offline Offline

Posts: 321

Thank You
-Given: 1659
-Receive: 52


« on: March 06, 2021, 11:29:03 11:29 »

Hi,

Can someone share a working code for nrf24l01 with 8051.

Thanks
Logged

Fate arrived and made the conscious unconscious It silenced the activity of life.
madhan7710
Junior Member
**
Offline Offline

Posts: 74

Thank You
-Given: 48
-Receive: 155


« Reply #1 on: March 06, 2021, 11:56:48 11:56 »

See if this is ok for you... Uses STC 8051 MCU but you can easily port to any other 8051...
Logged
Poty
Junior Member
**
Offline Offline

Posts: 57

Thank You
-Given: 52
-Receive: 10


« Reply #2 on: March 07, 2021, 12:00:54 00:00 »

I am working with this module, it uses a SPI connection protocol, and you need to specify a clear timing when sending and receiving information btw uc and nrf. I am using it whit a PIC18F4620. I understand that there are different uc, but I´m developing libraries in C, so, maybe, you can use and try connection between your uc and nrf, maybe adapting some elements. Let me know if you feel this adequate, and I´ll post those ones.
Regards.
Logged

You can't have your cake and eat it too... except if you do.
max
Senior Member
****
Offline Offline

Posts: 321

Thank You
-Given: 1659
-Receive: 52


« Reply #3 on: March 07, 2021, 06:28:09 06:28 »

Hi Poty

I am using the c compiler for 8051, if your pic c lib is working then please share it.

Regards
Logged

Fate arrived and made the conscious unconscious It silenced the activity of life.
Poty
Junior Member
**
Offline Offline

Posts: 57

Thank You
-Given: 52
-Receive: 10


« Reply #4 on: March 07, 2021, 10:30:49 22:30 »

Hi there!. Well, I was reading my libraries, and seems a little messy, but I got this thing connecting to the uc. I must warn you... all comments and tags are in spanish (spanglish sometimes), but it was working. Hardware was pretty simple: one port to connect to nrf, one to connect to a 2x16 LCD display, and 2 pushbuttons.
The entire schema is based on the program logic that MPLAB imposes to programmers, but I made some changes, so that, I post all header files and source files, plus main.c one. You need to have patience, and follow the flow (I had to do the same).
Basically, I created some calls to read and write though SPI and be able to configure NRF. Sill not implemented input/output transmission data, but this is easy, once you connect to NRF to read/write registers. Just follow NRF datasheet, and, of course, I´m available to help you to the best of my ability.
Regards.
Logged

You can't have your cake and eat it too... except if you do.
Poty
Junior Member
**
Offline Offline

Posts: 57

Thank You
-Given: 52
-Receive: 10


« Reply #5 on: March 22, 2021, 02:48:22 02:48 »

Good evening max. How are you doing with your project? were my libraries useful, or at least, a begining of a guide? let me know, please. Those are working fine to me.
Regards.
Logged

You can't have your cake and eat it too... except if you do.
max
Senior Member
****
Offline Offline

Posts: 321

Thank You
-Given: 1659
-Receive: 52


« Reply #6 on: April 01, 2021, 09:02:32 09:02 »

Hi Poty,

I use the code given by madhan7710 and is working fine,
thanks to madhan7710.
I will upload the code sooner.

Regards
Logged

Fate arrived and made the conscious unconscious It silenced the activity of life.
max
Senior Member
****
Offline Offline

Posts: 321

Thank You
-Given: 1659
-Receive: 52


« Reply #7 on: April 04, 2021, 12:59:57 12:59 »

Hi,

See the attached zip file NRF24_8051.zip

Following are the changes to the original NRF code by madhan7710

* uses software SPI instead of hardware SPI
* IRQ pin not used
* the software can be adapted to any flavor of 8051

Regards
Logged

Fate arrived and made the conscious unconscious It silenced the activity of life.
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC