I'm struggling to get the Netduino talking with the RFM12B radio (http://www.sparkfun.com/products/9582) over SPI, and I'm running out of ideas. I based the code on the Arduino libraries (http://jeelabs.org/2...9/new-rf12demo/). Attached is my demo code.
I'm getting intermittent problems with the nIRQ line. It either never goes down or it never goes up.
If the interrupt handler fires (sometimes even before the radio setup is done), the data coming back is much larger than the buffer, and doesn't look right at all (something like 128, 128, 0, 0, 64, 8, 0, 4, 4, etc.)
Also, if I attach the interrupt handler, I get garbage reads before the radio is even initialized. It looks like port.DisableInterrupts doesn't actually disable the interrupts.
I've tried a bunch of variations on the SPI configuration, and I haven't gotten the radio to respond well at all.
Does anyone have any ideas?
RF12BTest.zip 1.99KB
31 downloads
RFM12B over SPI
Started by Foozinator, Jan 17 2011 07:00 AM
4 replies to this topic
#1
Posted 17 January 2011 - 07:00 AM
#2
Posted 17 January 2011 - 08:08 AM
I've read somewhere that the SPI (driver/hw) might be buggy on the Netduino. I can't remember the details though.
The user could make it work with the FEZ Panda, but not Netduino. Maybe I can find the thread again ...
#3
Posted 17 January 2011 - 04:31 PM
Hi Foozinator,
What firmware version are you using? v4.1.0.5 or one of the alpha/beta releases?
We've been adding some functionality to SPI in the v4.1.1, so it's possible that we've introduced a glitch which may be affecting you. Have you tried using SPI with any other devices?
Chris
#4
Posted 17 January 2011 - 07:14 PM
What firmware version are you using? v4.1.0.5 or one of the alpha/beta releases?
I'm using v4.1.0.5.
I haven't tried to use SPI with anything else, only I2C (which works with the 24LC256 EEPROM).
#5
Posted 14 June 2013 - 03:23 AM
Hi Foozinator,
Did you ever further develop your code? I am trying to setup some arduino motes using the rfm12b module.
I haven't got too deep, but I'm curious if anyone has had good success with this radio and netduino to arduino communication.
I've seen lowpowerlabs code and its amazing. I would hope to have something similar on .net
Thanks
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users