Make Electronics

(nextflipdebug2) #1
What Next? 299

Experiment 34: Hardware Meets Software

330


10K


1


2


3


4 5


6


7


8


PICAXE


08M


b c


a


22K


Figure 5-131. The schematic of a test circuit for the PICAXE 08M shows the underside of
the stereo socket, the essential 10K and 22K resistors on the input pin, and an LED to
show an output from the chip.


Be aware that the PICAXE manual shows things differently (although I have
retained their labeling convention for the parts of the socket and the parts of
the plug, identified as a, b, and c).


One little detail about the socket that is commonly supplied for use with the
PICAXE: typically it has two pairs of contacts for the connections labeled b and
c in the manual, and in my diagram. When you solder a connection, your sol-
der joint should include both of the contacts in each pair, as shown in Figure
5-132.


Remember that the PICAXE must have 5 volts DC, and remember that your
voltage regular will deliver this voltage reliably only if you give it extra voltage
on its input side. If you provide it with 9 volts, that will provide a good amount
of headroom.


The 22K and 10K resistors are essential for using the chip; see the following
warning note for an explanation. My schematic also includes an LED and
a 330Ω resistor, but they are needed only for the test that we’ll be making
momentarily.


Pin 2 Pull-Down
Always include the 22K resistor and
the 10K resistor in the configura-
tion shown in Figure 5-131. These
resistors apply correct voltage to the
serial connection, and when you’re
using the PICAXE on its own, they pull
down the voltage on pin 2.
If pin 2 is left unconnected (floating),
it may pick up random voltages,
which the chip can misinterpret as a
new program or other instructions,
with unpredictable and undesirable
results.
The 22K and 10K resistors should be
regarded as permanent items ac-
companying your PICAXE regardless
of whether you have it attached to
your computer.
Free download pdf