■ FIGURE 3.
hardware for supporting the embedded web server.
A thermostat daughter-board will contain all the
components unique to the physical thermostat functions.
This lined up neatly with the two lists of major
components. Not only will I end up with a compact
design, I will also have a TCP/IP development system I can
use in other projects.
Testing and Revision —
Using a Bootloader
All products go through a period of testing and
revision before final user acceptance. After several cycles
of mounting and dismounting the hardware to reprogram
it after testing and getting feedback, I decided to invest in
a bootloader that would work over the Ethernet
connection. This would allow me to update the software
without dismounting the thermostats. The only Ethernet
bootloader for the PIC24 I could find is the Encrypted
Ethernet Bootloader from Brush Electronics in Australia.
The author, Andrew Small, was quite patient and
responsive to my queries. He is active on both the
Microchip and CCS software forums, and I’ve learned a
lot from his posts over the years. The $100 cost is worth
the time it saves on this and other projects.
36 September 2011
To date, I’ve used either off-the-shelf web server
boards or connected pre-made ENC28J60 modules to my
processors of choice. Two of these modules are also
shown in Figure 1. One is at the left end of the
After some delays tracking down nearly invisible
typos in my configuration files, the bootloader took only
a few hours to set up for my hardware, including making
some minor changes to the linker scripts. It does not
require any changes to the application software. This was
my first experience with a bootloader, and if you’ve never
used one before, it’s really cool! I can update an
application anywhere in the universe, as long as it‘s
connected to the Internet. It’s not convenient for benchtop
testing because it adds a few steps to the typical
compile/load/go sequence. However, the same
application hex file the bootloader uses will run stand-alone on the hardware without the bootloader installed,
so you only need to compile a single version of the
application for testing both with and without the
bootloader. See the References for more information