SMILEY’S WORKSHOP ☺
price). You will sometimes see an Arduino design
with the ATmega and associated circuits on a
breadboard, and there is nothing really wrong with
doing that. Just remember, every jumper tie point
adds another possible place for a bug, so you have
to ask yourself if your time is worth the hassle when
you can get the Arduino on a PCB (printed circuit
board) pretty cheap.
An Introduction to Schematics
■FIGURE 2. Back with five-position verticaland 50-position clips.
We usually design the schematics for our
circuits using software on a PC such as the one I used
to generate our schematics: EAGLE (Easily Applicable
Graphical Layout Editor). It has a free version for
non-commercial use ( www.cadsoft.de). EAGLE is hard to
use, as are all other schematic/layout programs I’ve used.
If you want to use any of these programs, be prepared for
a long learning curve. Figure 5 shows a drawing and the
schematic for the LED circuit.
Schematic symbols are not standardized, but you often
see symbols similar to the ones shown in Figure 5. A resistor
is usually shown in America with a ziz-zag, but in Europe
they may use a rectangle. The LED symbol is also the symbol
for a diode but with a couple of arrows added to show
light coming out. We will see other symbols as we build
more circuits with the Arduino Projects Kit components.
Using a Solderless Breadboard
with the Arduino
Figure 6 shows the schematic symbol for the Arduino
pin-out along with the drawing of the Arduino that shows
the female headers associated with the pin numbers.
These headers have clips in them similar to those on a
breadboard, except that there is only one clip per hole.
Schematic and Drawing for the
LED and Pushbutton Projects
We saw a photo of this in Smiley’s Workshop #10,
but the concepts are repeated here in Figures 7 and 8 for
the circuit schematic and drawing.
Moving from TAW Serial to ACW Serial
Now that you know more than you ever wanted to
know about breadboards, let’s move on to a new software
library that will ease our porting software from TAW (The
Arduino Way) to ACW (A C Way). In the last Workshop, we
learned how to port the code by simply copying all the
Arduino source code into our project directory. This month,
we will dump all that code into a library — libACW001 —
with the major exception that we will be replacing the
Arduino serial functions with our own versions. Some of
this will be redundant with things we saw last month, but
since this can get tricky, a little reinforcement can’t hurt.
Replacing TAW Serial Functions
with ACW Equivalents
Much of the Arduino source code (as provided on the
Arduino website) will be directly portable to AVRStudio using
libACW001.a and the methods described in Workshops 9
and 10. Unfortunately, the serial communication function is
not as simple to port, so
in this section we will learn ■ FIGURE 3. A five-position clip.
to replace them with
some similar functions.
The TAW serial
functions are written in
C++ and we don’t want
to go there, so we have
replaced each with
an equivalent ACW
function with a more C
friendly name (the dot
[‘.’] in the middle of
the C++ names gives
■FIGURE 4. Breadboard cross-section
with LED, resistor, and wire.
June 2009 53