PICAXE PRIMER
SHARPENING YOUR TOOLS OF CREATIVITY
■ BY RON HACKETT
IMPLEMENTING A SERIAL DATA
LINK WITH THE IR MULTI-BOARD
IN THE TWO PREVIOUS INSTALLMENTS OF THE PRIMER, we constructed a
stripboard version of the IR Multi-Board: an I/O module that can implement the
full range of PICAXE IR capabilities. We also developed a simple IRMB-based
object detection circuit for use in a robot or a home control system, as well as
an interface that received and decoded the signals from a universal TV remote
programmed to transmit the Sony IR Control (SIRC) protocol.
This month, we're going to resolve
the problem of the missing key-presses that we had last time with our
SIRC system and then move on to
accomplishing our final goal for the
IR Multi-Board: using two IRMB modules
to implement a wireless serial data link
for use in our projects. We'll be using
the same setup we worked with last
time, which consists of our standard
28X1 Master Processor circuit with
one IRMB set up as a peripheral
input device and a second IRMB
installed on a mobile battery-powered
breadboard for range testing. In
addition, we'll make use again of a
TV remote capable of transmitting in
the SIRC protocol. Our experiments
will involve the following programs:
• Hserin TestAll.bas
• Hserin TestInt.bas
• RMBrxSIRC.bas
• IRMBserin.bas
• IRMBserout.bas
To save you the trouble of typing
them into the Programming Editor,
these programs are all contained in
one ZIP file that is available on the
Nuts & Volts website (
www.nuts
volts.com). If you prefer, you can
email me at Ron@JRHackett.net and
I'll send you the file. In order to make
our discussion here easier to follow,
it would be a good idea to get the
file and print out the five programs
before you read much further.
CAPTURING THE
MISSING SIRC
KEY-PRESSES
■ FIGURE 1. IR Multi-Board
schematic.
In our last experimental setup we
programmed an IRMB to receive IR
signals from a SIRC TV remote and
relay the data to our 28X1 Master
Processor. The 28X1's program was
fairly simple and somewhat limited in
that it was only capable of capturing a
single key-press in the background; any
additional key-presses that occurred
during one blink of the LED were lost.
Our first setup this month will
fix that problem. In order to do so,
we will use the same physical setup
with new (and improved) software.
Output1 of the IRMB is again
connected via a 4.7K resister to
input 7 (the hserin input) of the
28X1. Its program ( IRMBrxSIRC.bas)
is essentially the same as the
IRMB_Remote.bas software that we
used last time. The improved
functionality is implemented in the
28X1's Hserin TestAll.bas software,
which requires a brief explanation
before we actually try it out.
To begin with, you may want to
review the material we discussed last
time about the 28X1's scratchpad
16
February 2009