circuit board (PCB).
As you can see, there’s a lot
going on within our PIC trainer. In
fact, it seems so fancy that I should
probably remind you once again that
the whole shebang (apart from the
inexpensive PIC12F683) is built with
surplus parts. Just don’t let the
discounted nature of the trainer
deceive you. It’s possible to do some
serious work with this high quality
beast.
First Step:
Understand It
Let’s turn our attention to
how the PIC trainer works by
wending our way through the
schematic in Figure 3. You’ll
want to socket the PIC12F683,
of course, as well as make
provisions for connection to
its pins.
Notice that all six of the
I/O port lines are brought out
to sockets J7 and J8.
The LEDs have the typical
current-reducing resistors in place,
R3 through R8. The red ones
simply connect to ground, while
the bicolor LED makes both legs
available.
Turning to the serial port, J3,
you’ll notice the series protection
resistor, R37. This is needed since
RS-232 signals can swing as much
as 12 volts — positive or negative.
R24, on the other hand, is simply
a pull-down to keep the sensitive
input line from floating.
As for the switches, each has
a pull-up resistor, R11 through
R22. These ensure that the PIC
isn’t looking at input lines
bobbing about in an
indeterminate state. There’s a lot
of repetition here, but really it’s
nothing more than 12 switch
elements and 12 pull-ups.
Let’s check out the audio
stuff next. Keep in mind that a
typical port line on a PIC can
source or sink no more than 10
mA. For that reason, the
electromechanical buzzer is
buffered by transistor Q1. The piezo
is a low current device, however, so
it can connect to the PIC directly.
The line output features a 10K
volume control and blocking
capacitor C3. Easy to miss is series
resistor R1. With this in place, it is
■ FIGURE 3.
safe to connect an ordinary 8Ω
loudspeaker. The line output may
also go to an external amplifier if
desired.
The DAC is the trusty old R-2R
affair, so called due to the values of
the resistors employed. Remember,
February 2013 35
it’s not buffered so don’t expect to
drive any low impedance circuitry
directly without some additional
components.
Finally, power is supplied via a
regulated +5V wall wart. J14 and J15
make the supply voltage available for