MRF24J40MA radio transceiver
Lucky
Posts: 98
···· Does anybody have experience with the MRF24J40MA·2.4 GHz IEEE 802.15.4 radio transceiver module? The MRF24J40MA has an integrated PCB antenna and oscillator, so you can connect it directly to the prop via a 4-wire SPI interface. It supports the ZigBee and MiWi protocols. I'm mainly interested in it because it is cheap ($10), but I have no idea in how to interface it. I have had experience with SPI (MCP3208), but I don't know any of the terms they use like FIFO or packets. There's something about addressing stacks I think. From what I've seen, its easy to interface for PIC users, so it should be a breeze for the prop right?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"You do not really understand something unless you can explain it to your grandmother."
-Lucky[size=-1][/size]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"You do not really understand something unless you can explain it to your grandmother."
-Lucky[size=-1][/size]
Comments
Unfortunately I don't have any experience to offer for your particular usage. I checked the Object Exchange and I didn't see an object. Perhaps you can partner with someone here to write an object to use the radio device. I glanced at the data sheet and there appears to be a lot of setting of values and registers, but I bet any sample library code provided by Microchip could be ported and rewritten to work with the Propeller.
I'd recommend getting a couple modules and then start working through a design. Through the forum we can help offer design ideas, term definitions, etc. The first thing you will want to write is a basic toggling of the pins for the SPI protocol. Do this in SPIN. Then take another baby step and abstract that toggling of pins to accept data as a method and then clock that data out with SPI. Then from there you can start learning what the register and memory functions are of the radio IC and start to put together what is needed to transmit data.
FIFO = first in, first out. This is usually a register or stack structure where the first data into the register is the first data to come out of the register/stack.
Packet = is a group of data (bytes/words/longs) that are transmitted together. Usually a packet consist of some sort of structure such that there is a header, payload and data/crc check.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
"
·· #define RFSTATE (0x20f)
·· #define RSSI (0x210)
·· #define CLKIRQCR (0x211)...·· "
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"You do not really understand something unless you can explain it to your grandmother."
-Lucky[size=-1][/size]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"You do not really understand something unless you can explain it to your grandmother."
-Lucky[size=-1][/size]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"You do not really understand something unless you can explain it to your grandmother."
-Lucky[size=-1][/size]
The first four diagrams to study would be on page 12 and 13. There four diagrams show the relationship of /CS, SCK, SDI and SDO for read and write operations. You will notice that one set of diagrams is for reading/writing the "short" address registers - that is registers with 6 bits. Note how the least significant bit is 0 or 1 based on a read or write operation being performed. Also the packet begins with a 0 to indicate a short address to follow.
Similarly on page 13 are the diagrams for read/write of the "long" address registers or 10-bit address registers. The packet begins with a 1 to indicate a long address to follow.
So an SPI sequence looks to be something like this:
1 bit - indicates if it the next set of bits is a short or long address.
6 or 10 bits - the short or long address of the registers to operate on
1 bit - indicates if it is a read or write operation
some amount of dummy clocks - we should review the data sheet to verify what the diagram is trying to show here.
8 bits of data. You may be able to keep clocking more than 8-bits out, we just need to review the data sheet more to see what it says.
As for what registers need to be set and in what sequence for operation.....that looks to be a much larger task to study. I'd review sample code and perhaps any applicable application notes.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"You do not really understand something unless you can explain it to your grandmother."
-Lucky[size=-1][/size]
I can see both data sheets listed here: www.microchip.com/wwwproducts/Devices.aspx?dDocName=en535967
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"You do not really understand something unless you can explain it to your grandmother."
-Lucky[size=-1][/size]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com