effectiveness of the
command set is important
so the Atom Basic compiler
has a huge list of commands
including one for driving an
LCD module. The smaller Atom
modules that are compatible
with the Parallax BASIC Stamps
are shown in Figure 2. Because
of this compatibility, these mod-
ules can be used in numerous
development boards originally
designed for the Basic Stamp 2.
Both offer analog-to-digital
converters (ADCs): the 24-pin version has
them as extra pads underneath that you
need to solder to, but the 28-pin version
brings these connections out to leads you
can easily access in a breadboard setup or
development board. Having an ADC is a
great resource that gets carried over to the
AtomNano chips and the Atom Basic compiler
has a single command to handle the ADC
measurement. The AtomNano makes it very
easy to write and run code to, for example,
read a Sharp infrared distance sensor with
analog output using an ADC channel.
FIGURE 2. The Atom 24-pin
and 28-pin modules.
Programming the Atom modules simply
requires a serial connection to your PC.
A USB-to-serial adapter will also work.
Programming the AtomNano chips takes a
little more effort. The PC serial port signals
at +12V to -12V, or +5V to -5V on many laptops. To convert this type of signal to a TTL
or 0V to 5V digital signal (so the AtomNano
chips can read them) requires a level shifter.
You can do that with a transistor circuit as
shown in Figure 3 or you can use an RS-232
level converter chip. The smaller Atom
modules have this transistor circuitry built in
while larger versions (that use leaded devices
instead of surface mount) use the RS-232
converter chips. To support these new
AtomNano chips, Basic Micro developed
their own USB-based programming adapter
instead of using RS-232. The board is
designed to plug into a breadboard for
communications and power. Just connect
a matching USB cable from your PC to the
board and you have a programming
connection. Figure 4 shows the Basic Micro
USB programmer board next to an RS-232 programmer.
FIGURE 3. Atom
FIGURE 4. USB and RS-232 programming adapters.
As mentioned, the Atom Basic compiler is free to
download from the Basic Micro website. When you install
it, you get a full IDE interface (Figure 5). Also included is
the debugger software that lets you step through code and
watch your variables change as the program runs. The
program is actually running in the chip — not being