SHARPENING YOUR TOOLS OF CREATIVITY
■ BY RON HACKETT
CONSTRUCTING A TWO-DIGIT
Discuss this article in the
Nuts & Volts forums at
A couple of years ago, we explored the basics of interfacing seven-segment
LED displays with PICAXE processors (N&V PICAXE Primer, 12/09, 2/10,
and 4/10). At that time, the PICAXE-20M processor (which includes eight
digital outputs) enabled us to drive a single-digit LED display as a simple
demonstration of the basics. In order to interface more than one digit with
a PICAXE processor, we had two options: multiplexing the display, or using
a dedicated LED display driver such as the MAX7219. However, with the
recent introduction of the 20M2 processor, we are now able to drive a
two-digit LED display without the complication of multiplexing or the
expense of a separate LED display driver.
Atwo-digit LED display may not seem like much, but it can be
very useful in a variety of projects,
especially in the areas of timing and
temperature monitoring and control.
I’m currently working on three projects
of my own in those areas, and all three
of them only require a two-digit display.
I’ve already developed a couple of
stripboard circuits for two of my
projects, and have started working on
a design for the third one.
In the process, it dawned on me
that the three different circuits I
designed are actually very similar.
This realization prompted me to start
thinking about a flexible two-digit
LED display board that could be
easily adapted to a variety of
projects. This month’s column is the
result of all the fun I’ve been having.
DESIGNING A FLEXIBLE
In the past, I’ve experimented
14 February 2012
with driving a multiplexed two-digit
LED display with a 20M processor. It
can certainly be done, but the 20M is
kept so busy with the multiplexing
function that it’s not able to
simultaneously attend to many other
tasks. Now that the 20M2 is available,
I decided to switch my focus to a non-multiplexed display.
Of course, a non-multiplexed two-digit display requires twice as many
output lines, so the vast majority of
the 20M2’s I/O lines need to be
dedicated to the display. Consequently,
any additional functions of the board
have to be implemented with a minimum
number of I/O lines. Keeping that in mind,
the following is a list of the additional
functions that I decided to include:
Timing: One of my projects is
what’s referred to as a “shot-timer” for
an espresso machine. This is
essentially a count down timer which,
of course, is a readily available kitchen
gadget. However, I wanted to include
a couple of custom features in my
shot-timer, and it’s much more fun to
design and build one anyway.
Fortunately, the 20M2’s built-in time
variable allowed me to include this
feature without any additional
hardware requirements at all.
Temperature Measurement and
Control: Another one of my projects is
a temperature alarm for the freezer in
my basement. As you probably know,
PICAXE Basic includes two commands
(readtemp and readtemp12) that work
in conjunction with the Dallas-Maxim
DS18B20 digital temperature sensor, so
that’s what I’m using for this project.
What you may not know is that
the 08M2, 14M2, and 20M2 processors
also have an additional temperature
measurement capability. Their new
readinternaltemp command can be used
to determine the internal temperature
of the processor without any
additional hardware. We’ll get into the
details when we get to the software
portion of our project next time.
User Input: Of course, we need
some form of user input for our board.
Setting a timer or an “alarm”
temperature is simplified by having a
keypad that includes buttons for the