Part c - to go further, Basic programming, The picaxe – Elenco XP&trade User Manual
Page 60: Interface and programming software
Snap Circuits
®
XP
TM
is an introduction to what you can do with
microcontrollers, such as the PICAXE
®
08M IC that you have
been using. This section is intended for users who would like to
develop their own programs for the microcontroller.
Review the
DO’s and DON’Ts of Building Circuits on page 8 before
experimenting on your own.
BASIC Programming:
The programs you are using are written in a language called BASIC.
BASIC (short for Beginner’s All-purpose Symbolic Instruction Code)
is a language of symbolic commands, which will later be translated
into coded instructions that the microcontroller can understand and
execute. The microcontroller you have can process about 1000
BASIC commands a second.
You can download 40-110 lines of code in the microcontroller (the
PICAXE
®
08M), depending on the commands used. Other PICAXE
®
parts available can hold as much as 3200 lines of code. As programs
become complex it is possible the micro-controller will run out of
memory to store the program. Most programs can be reduced in size
by rewriting to use more subroutines. You can check the program
length using ‘Syntax’.
A description of all the microcontroller commands and some basic
programming techniques can be found under the Help menu at
Snap Circuits
®
XP
TM
.
The PICAXE
®
Manual (Parts 1, 2, and 3) has more detailed
explanations of the PICAXE
®
commands, and other information
about PICAXE
®
products, however much of this information is not
applicable to Snap Circuits
®
XP
TM
and some is very technical. The
Snap Circuits
®
XP
TM
help file is customized to your product.
The PICAXE
®
Interface and
Programming Software
The Snap Circuits
®
XP
TM
Editor makes
downloading programs to the
microcontroller easy. It also allows you
to easily change parameters in
programs before downloading.
However, we do not recommend
developing new programs with it,
because more advanced editors are
available with features like simulation
and flowcharting.
The microcontroller you are using has
a special programming interface that
makes it easy to use. This interface,
called PICAXE
®
, was developed by
Revolution Education Ltd.. Revolution
Education’s PICAXE
®
website,
www.rev-ed.co.uk/picaxe, contains the
following:
• More information about PICAXE
®
microcontrollers and software. This
includes information on the larger
PICAXE
®
IC’s that are available, and
where you may purchase them.
• Logicator: Logicator is more
advanced software for programming
PICAXE
®
microcontrollers, including
yours. We recommend this as the
best software for young users who
are creating their own programs for
the microcontroller, due to its ease of
use. Programs are created as
graphical flowcharts, not as typed
BASIC programs. The flowcharts
make creating programs easy
because you select the commands
as symbols from menus, then select
the parameters you need from a list.
Flowcharts make it easy to see how
different parts of a program relate.
With Logicator you can simulate a
program to see how it will work,
before downloading it into the micro-
controller. Logicator is available on
the PICAXE
®
website as a free
download. Further information and a
sample Logicator screen is on the
next page.
• Programming Editor: The
Programming Editor is the most
advanced software for programming
PICAXE
®
microcontrollers, including
yours. We recommend this as the
best software for advanced users
who are creating their own programs
for the microcontroller, due to its
range of features. Programs are
written in BASIC, but may also be
created as flowcharts (though the
flowcharts here are not as easy to
use as those in Logicator). All
PICAXE
®
features are supported.
Great simulation tools, to help you
test complex programs before
downloading them to the
microcontroller. The Programming
Editor is available on the PICAXE
®
website as a free download. Most of
the programs for Snap Circuits
®
XP
TM
were created using the Programming
Editor. Further information and a
sample Programming Editor screen
is on page 61.
-59-
PART C - To Go Further