Shop OBEX P1 Docs P2 Docs Learn Events
Has anyone written an nRF24L01 Object? — Parallax Forums

Has anyone written an nRF24L01 Object?

WhelzornWhelzorn Posts: 256
edited 2007-10-22 16:56 in Propeller 1
I'm looking for an object that can handle the Nordic nRF24L01 (actually the MIRF v2 from SparkFun). It uses an SPI interface, but I'm running my prop @ 64MHz and the SPI stuff from the BS2 function object say to run them at 80MHz only, so i'm not sure what the issues will be and I'd rather not spend tons of time debugging something like that just to find out it's a problem with the speed.
I noticed the nRF2401(A) object in the exchange, but the nRF24L01 quite different because the 2401 didn't have an SPI interface.
Anyway, if someone's used one of these with ther Propeller project, I'd love to see anything that relates to driving these things.

Thanks

Comments

  • LeonLeon Posts: 7,620
    edited 2007-10-21 21:50
    I already have a couple of MiRF V2s interfaced to PIC18Fs communicating with a simple C program. I was thinking of putting an MiRF V2 on a Prop Proto board and writing a Spin program to receive data from one of the PIC systems.

    Leon
    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 10/21/2007 10:00:21 PM GMT
  • WhelzornWhelzorn Posts: 256
    edited 2007-10-21 22:19
    hmmm... all I've got for PIC's are 16F84A's and 16F628's.
    But like I said if you end up with any spin code to handle this thing at all, I'd love to see it. I really don't understand these chips too well yet.
  • WhelzornWhelzorn Posts: 256
    edited 2007-10-22 00:46
    At this point I think I understand how to communicate with the chip in terms of data sent/received, but I still need a general SPI driver.
    Somehow one doesn't exist yet in the object exchange...? I looked at the SD card objects, but the SPI driver with them seems to be very specific to SD cards
    So if anyone has/knows where a general SPI driver is, I'd love to see it.
  • simonlsimonl Posts: 866
    edited 2007-10-22 09:09
    I think there's one in the Object Exchange at http://obex.parallax.com/objects/112/

    I really should read ALL of the post before I reply! blush.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2007-10-22 11:01
    Whelzorn -
    My understand of SPI is that it is limited in speed on the top end (going too fast) and not the low end (going too slow).· In other words you should be able to use the SHIFT IN/SHIFT OUT from the BS2 library.· Your application may not get data in/out very fast, but it at least can get the device working and that is a good baby step to do before going for blistering speed.

    Hmmm....I wonder why a generalized SPI driver has not been written?· Maybe it is difficult to generalize?· I admit I don't have a lot of experience with SPI, but the items I have worked with seem like the same ASM code could have worked with them and then the difference would be configuration and what was placed in a buffer to send/receive.

    I too have a couple of the "Transceiver MiRF v2 - nRF24L01 Module RP-SMA" but I have not gotten around to doing anything with them yet. Unfortunately it is far down my list of items to play with.· I got my WIZnet module for the Circuit Cellar contest the other day and originally that was near the bottom of my list too, but the more I think about it the higher priority it becomes to get it working.· It could happen to the MiRF too!

    What is your application for using these items?· What functionality would a Propeller driver need to have?· (I should review the datasheet to see what is possible of the Nordic chip).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter
    tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • LeonLeon Posts: 7,620
    edited 2007-10-22 16:01
    My C18 programs are here:

    http://www.leonheller.com/MiRF%20V2/MIRF%20V2.zip

    They are based on the SFE examples for the PIC16F88 which were written for the CC5X compiler. I've tidied them up a lot, and incorporated someone's bit-banged SPI routine.

    It should be quite easy to convert them to Spin code. The Test program is useful for checking that your SPI software is working - you should be able to read from and write to the nRF24L01 registers with it. I used the ICD 2 and MPLAB debugger to examine the data, you could output the values to the PC com port.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • Kit MortonKit Morton Posts: 39
    edited 2007-10-22 16:03
    Beau Schwabe posted a general SPI driver here,
    http://forums.parallax.com/showthread.php?p=601870

    -Kit
  • WhelzornWhelzorn Posts: 256
    edited 2007-10-22 16:56
    Awesome that should do just fine, thank you! Why isn't that in the object exchange though???
Sign In or Register to comment.