FIGURE 1. The expansion base we built earlier utilizes the U2TX and U2RX I/O
pins for the RS-232 interface. That leaves the SPI0 portal I/O pins which are shared
with UART1 — clear and available for our MRF24J40MB.

or Mi Wi (see Sidebar) templates to work from. So, we’ll
have to do some investigative work to determine if we can
actually drive an MRF24J40MB using this PIC. First, let’s try
to attack the problem from the hardware perspective.

A quick scan of the MRF24J40MB datasheet tells us
that we need to feed it with a 3. 3 volt power supply that
can supply a minimum of 130 mA. No sweat as a 500 mA

3. 3 volt regulated power source is part
of the base Trainer system. The
MRF24J40MB’s data I/O subsystem
consists of a standard four-wire SPI
portal. I know I don’t normally read
magazine articles and datasheet
simultaneously (and you probably don’t
either), so I’ve posted Figure 1 for your
convenience. A trip around the
PIC24FJ128GA006 graphic you see in
Figure 1 reveals a pair of four-wire SPI
portals. Since every member of the
PIC24FJ128GA006 family has the
maximum of a pair of SPI portals, we
can get up on our donkey and conclude
that we have the necessary SPI resources
to move data between an MRF24J40MB
and our PIC.

Going with the positive educated
guess about the power of our
PIC24FJ128GA006’s SPI engines, let’s go
one step further and prove our
conclusion. The MRF24J40MB can be
had in a PICtail Plus package. That
means there’s most likely a schematic
diagram we can get some ideas from in
the MRF24J40MB PICtail Plus User

Guide. Our donkey ride pays off in Figure 2. The
MRF24J40MB’s active-low CS (Chip Select) line designation
matches up perfectly with the PIC24FJ128GA006. Likewise
for the MRF24J40MB’s SCK (SPI Clock) RF6 pin assignment.
Then, it seems that the PIC24FJ128GA006 runs out of
PORTF pins. No worries! We’ll simply modify the SDI1 and
SDO1 definitions in the Mi Wi firmware. The active-low

RESET line looks to be on the spot as does
the WAKE trigger line. There is no RE8 I/O
pin shown in Figure 1. So, we’ll look at the
function that RE8 provides and match up
that function with the appropriate
PIC24FJ128GA006 I/O pin. In this case,
we’ll redefine RE8 as RD8 in the Mi Wi
hardware definitions. You can get down off
that donkey as we have positive proof that
this project can be realized.

MRF24J40MB 101

FIGURE 2. When you’re unsure about how to wire up a part, PICtail Plus
schematics are of great value as they normally outline the use of a particular part
for multiple microcontrollers and demo boards.

The MRF24J40MB transceiver you see
in Photo 3 is the long bow version of this
transceiver. The MRF24J40MA transmits at
0 dBm which equates to one milliwatt. The
MRF24J40MB can emit a + 20 dBm or 100