Microchip Technology DM183037 Data Sheet

Page of 10
TB3094
DS90003094A-page 2
 2013 Microchip Technology Inc.
IEEE 802.15.4 RADIO
Wireless communication is provided through an
MRF24J40MA module, and uses the MiWi
®
 P2P
protocol. The MRF24J40MA transceiver allows for
easy wireless interfacing and communicates with the
microcontroller through an SPI interface.The software
stack for the MiWi protocol is available as part of the
Microchip Library for Applications. It should be noted
that the software stack has some modifications from
the standard library release, so the files provided in the
downloaded (source code package) directory should
not be replaced with files in the MLA release. More
information can be found on the MRF24J40MA product
page.
ACCELEROMETER (MOTION 
SENSING)
A 3-axis accelerometer ST #LIS331DL is used for
motion sensing. Deltas in acceleration are recorded
and flagged as an event, if the magnitude is above a
certain threshold (SIGMA). Motion is detected when a
change in acceleration (delta) occurs. If the delta is
above a predetermined threshold (SIGMA), it is flagged
as an event. Acceleration deltas are used instead of
using acceleration directly because acceleration due to
the force of gravity is always present. If the readings
were used directly, the measurement of gravity would
interfere with comparison of the measurements.
The accelerometer data is read out via an SPI
interface. The SPI signals (CS, SCK, SDI, SDO) are
available through test points on the board. The
accelerometer is configured to generate an interrupt on
the INT1 pin when accelerometer data is available.
Accelerometer data is available at a 100 Hz sample
rate.
USB HID BOOTLOADER
To allow ease of reprogramming, the development
board supports a USB HID bootloader. The USB
bootloader is available separately, as a part of the
Microchip Library for Applications, “Device –
Bootloader – HID” demonstration project. The HID
bootloader application will run on Windows
®
, Mac
®
,
and Linux systems and allows programming of new
firmware through a USB cable. 
To put the development board into Bootloader mode,
simply connect a USB cable. Rapid blinking of LEDs
D3 and D4 indicate that the USB connection is
successful. The screenshot below shows bootloader
messages after successful reprogramming of the
PIC18F67J94 development board.
FIGURE 2:
USB BOOTLOADER 
WINDOW
The bootloader code resides in the lower part of
program memory (locations 0–0x0FFF). If the
bootloader is mistakenly overwritten, it can be
reprogrammed into the device through the
programming connector, by programming the “HID
Bootloader PIC18F67J94.hex
” file into the device. This
file can be found in the “HID bootloader” project
directory.
It should be noted that the bootloader application code
provided with the PIC18F67J94 demonstration board
has been slightly modified from the bootloader that is in
the Microchip Library for Applications release. The
bootloader is not entered with a key press, but is
entered by connecting the USB cable. When a USB
cable is connected, it causes a high signal to be
present on the RF7 pin. Be sure to use only the
bootloader (.hex file) that is contained in the project
directory.
PROGRAMMING/DEBUG INTERFACE
As an alternative to the bootloader, full programming
and debug support is available through header J2.
Developers will need to install the header pins in order
to connect using one of Microchip’s programmers
(PICkit™ 3, MPLAB
®
 REAL ICE, or MPLAB ICD3). If
the bootloader is accidentally deleted from memory, the
bootloader can only be reprogrammed with the use of
an external programmer through the J2 programming
header.