Make Electronics

(nextflipdebug2) #1

Experiment 34: Hardware Meets Software


298 Chapter 5


In the Programming Editor, go to View→Options and click the Mode tab, then
click the button to select the 08M chip.

Figure 5-127. This screenshot shows the options win-
dow of the PICAXE Program Editor, which you must use
to select the type of chip that you intend to program (in
our case, the 08M).

Figure 5-128. Another screenshot of the options window
shows the second essential choice that you must
make: selection of the COM port that the installer
chose on your computer.

Are we having fun yet? Obviously not, but you’re through with software has-
sles for the time being. The last step before you’re ready to use the PICAXE is to
mount it, and its socket, on your breadboard.

Setting up  the hardware
The PICAXE 08M looks like a 555 timer. (Other chips in the PICAXE range have
more pins and more features.) It requires a properly regulated 5 volts, just like
the logic chips you dealt with previously. In fact, the PICAXE people are rather
emphatic about protecting it from voltage spikes. They want you to use two
capacitors (one 100 μF, one 0.1 μF) on either side of an LM7805 regulator. This
seems like overkill, but the PICAXE is more inconvenient to replace than a 555
timer. You certainly can’t run down to RadioShack to buy one. So let’s do what
the manufacturer says, just in case, and set up a breadboard as shown in Fig-
ures 5-129 and 5-130.
Now for the chip itself. Note that the pins for positive and negative power are
exactly opposite to those for the 555 timer, so be careful!
Set up your breadboard following the schematic shown in Figure 5-131. Note
that I am showing the stereo socket on its underside, because I think that’s
how you’ll have to use it with the breadboard. If you try to stick its pins into the
holes in the board, they will fit, but when you insert the plug into the socket,
the thickness of the plug will tend to raise the socket up so that it loses con-
tact. I really think the way to go is to solder wires to the pins on the socket and
push the wires into the breadboard. See Figure 5-133.

9V DC input
(unregulated)


5V DC output
(regulated)

0.1uF

0.1uF

100uF

100uF

Figure 5-129. PICAXE documentation
specifies a 100 μF and 0.1 μF capacitor
on the input side of a 5-volt regulator, and
a similar pair of capacitors on its output
side. On a breadboard, they can be ar-
rayed like this.


Figure 5-130. The actual components for
power regulation, applied to a breadboard,
delivering 5 volts (positive and negative)
down each side.

Free download pdf