analyzing the packets that carry the data. As for my
kindred bit detectives out there, that’s all well and good
for us. However, on the other hand, it is important for all
of us to understand how the MRF24J40MB interface is
manipulated to allow transmission and reception of those
bits within the data packets.
Keep your eye on Figure 2 as we shuffle around the
MRF24J40MB package. The MRF24J40MB active-low
RESET pin is aptly named as it functions as a radio reset
input. Any 802.15.4 radio worth its salt can hibernate like
a fat bear in winter. The WAKE input drags a sleepy
MRF24J40MB out of hibernation. The MRF24J40MB is a
world class 802.15.4 radio module that can be put to
sleep to conserve power.
Today’s typical microcontroller is fast enough to
forego interrupts and poll external communications
resources like the MRF24J40MB. However, those fast PICs
are designed that way to allow them to get more work out
of those quick CPU cycles. It is advantageous for a
microcontroller to use its compute power as much
as possible, and only be drawn off its main
processing activity to service a device when
required to do so. That’s where the MRF24J40MB’s
INT (interrupt) output pin shines. The INT pin is an
output that can be tied to one of the PIC’s external
interrupt inputs. When the MRF24J40MB needs to
perform data I/O or do something the host
microcontroller needs to know about, the
MRF24J40MB activates its INT pin. The activation of
the INT output forces the host microcontroller to
run an interrupt handler routine to service the INT-initiated request.
The MRF24J40MB’s four-wire SPI portal is
comprised of the SDO, SDI, SCK, and CS I/O pins.
If you’re old school, that’s MOSI (Master Out Slave
In), MISO (Master In Slave Out), Master Clock, and
Chip Select, respectively. There is only one correct
■ FIGURE 1. The MRF24J40MB is simply an MRF24J40MA
with a PA and LNA between the MRF24J40 802.15.4
IC and antenna.
way to interface a Master SPI portal to the MRF24J40MB
slave portal signals. If you build your application and
hardware using one of the wireless protocol examples
included in the MAL (Microchip Application Libraries), the
SPI portal, INT, and I/O connections shown in Figure 3
are already defined for you.
SOME BASIC 802.15.4 HARDWARE
It doesn’t take much hardware to send and receive
802.15.4 packets. All we need is an SPI-enabled PIC
and an MRF24J40MB. The bulk of the circuitry you
see in Schematic 1 is mounted on an EDTP Electronics,
■ FIGURE 2. The pinouts of the MRF24J40MA and
MRF24J40MB are identical. The MRF24J40MB
comes in a larger and wider package.
June 2012 69