www.nutsvolts.com/index.php?/magazine/article/february2012_PICAXEPrimer
PICAXE PRIMER
10 digits, as well as a few other
control functions (enter, clear, etc.)
Since we’ll be using almost all the
20M2’s I/O lines to drive the LED
display, I only wanted to dedicate one
I/O pin to this function. Fortunately,
the 20M2’s irin command now
includes a timeout parameter that can
allow our program to move on to other
tasks if the IR input is not received
within the time that we specify.
This means that we can use an
inexpensive TV remote control for
input, without needing to dedicate a
second processor as we did before the
M2 processors became available. Best
of all, we only need one input pin to
implement a very convenient input
function. On the 20M2, pin C. 6 is
input only, so that’s the pin I chose to
implement the “user input” function.
Serial Input from Another Processor:
The 20M2’s Serin pin cannot be used
as a general-purpose input pin; its sole
function is the reception of serial data.
Since we can’t use this pin for any
other purpose anyway, we’ll devote it
to the function of receiving serial input
from another PICAXE processor.
Similarly to our earlier four-digit LED
display project, our two-digit board
will also be able to function as a stand-alone output device for any PICAXE
processor, including the 08M2.
■ FIGURE 1. Standard labels for a
seven-segment display.
Figure 2 presents the schematic
for my final project design, which I’ve
decided to call the LED-2x7 board.
(Clever, huh?) The first thing you may
notice about the schematic is that the
specific connections that I have made
■ FIGURE 2. LED-2x7 schematic.
February 2012 15