“Min/Max” temperatures shown on the Hyper Terminal
screen are 100 more than their actual values. They are
stored on the PIC this way to accommodate negative
temperatures on a device that does not normally
understand negatives.
The Software
The program for the PIC12F683 is written in
PICBASIC PRO. The code (available at
www.nutsvolts.com) is well documented and should be
fairly easy to follow. You will also note that there are a
number of “SEROUT” commands. These send
information to the device’s serial port and were used for
debugging as they give information on the program’s
operation. If more program space is needed for
additional modes or features, the serial commands can
easily be removed.
■ FIGURE 2. Hyper Terminal
screen.
Reading the Temperature
The objectives state that the temperature must be
reported in a manner that is easily understood. Being an
amateur radio operator, my first inclination was to use
Morse Code for the numbers but the thought of teaching
the sequence of dots and dashes to my riding comrades
convinced me to search for another alternative. The
simplest code I could come up with has proven to be
easily understood by everyone who sees it.
A temperature report always starts with a rapidly
blinking sequence where the LEDs flicker for a half second
or so. Next, the number of hundreds of degrees is
displayed followed by a short pause, the number of tens,
another pause, and the number of ones. The software
suppresses the reporting of hundreds of degrees if the
temperature is below 100. When reporting numbers of
degrees, the LEDs flash at a rate of about 1/3 second on
and 1/3 second off. When reporting a zero, they flash on
and off much more rapidly. These rates can easily be
changed in the software but have worked well throughout
a full year of testing.
One Button Does It All!
A single SPST momentary switch takes care of all the
mode and configuration changes. The unit currently has
To Report 103 Degrees:
(Uncommon, but not unheard
of in Pittsburgh!)
• Flicker
• Flash once
• Pause
• Flash once very briefly to show a zero
• Pause
• Flash three times
• Repeat
To Report 48 Degrees:
August 2010 35