68 January 2014
multiplexed. Enough of the select I/O pins have been
terminated at headers to support I2C, SPI, and UART
portals. In the case of the UART, there is a pair of portals.
In addition, the LMX Wi-Fi exposes analog-to-digital
converter (ADC) pins. A number of additional PIC32
general-purpose I/O pins are also made available to the
The part count for the LMX Wi-Fi is kept at a
minimum by employing the services of the PIC32’s
internal processor clock. An onboard LDO voltage
regulator allows an external supply that lies between + 3. 7
VDC and + 5.0 VDC to power the Wi-Fi module.
The PIC32’s versatile I/O layout allows the LMX Wi-Fi
module to be programmed to perform many functions
that are hard-coded into other Wi-Fi units. The LMX
module can be programmed to act as a serial-to-WiFi
device, a remote sensor platform, and a remote control
device. The sensor and control applications are extendable
to the Internet. Basically, if an external device can use one
of the LMX Wi-Fi’s SPI or I2C portals, that device has the
capability to go worldwide via the ‘net.
For debugging and programming purposes, the LMX
module lays out a PICkit 3 compatible set of header pads
which (in correct order) includes the RST, 3V3, GND, IOD,
and IOC header positions. This arrangement allows easy
access to the programming and debugging resources
offered by MPLAB X and the PICkit 3. The physicals that I
have described here are graphically detailed in Schematic 1.
Embedded Web Server Mechanics
The web pages that are served by the Wi-Fi module
are processed by the Microchip MPFS2 Utility. If the web
pages are to be stored in external EEPROM, the MPFS2
Utility spits out a binary file that contains the web page
content. If the web pages are to be contained within
program Flash, the MPFS2 Utility creates an HTTPPrint.h
file and an MPFS2 Image.c file. The contents of the
HTTPPrint.h file include all of the references and indices to
the callback functions. The CustomHTTPApp.c file is the
heart of the web application.
The programmer must manually build a callback
function for each of the references in the
CustomHTTPApp.c file. The Image.c file contains a
■ Schematic 1. The LMX Wi-Fi
module is perfectly suited for
remote monitor and control
applications that need to have
access to the web.