27220 Parallax Inc, 27220 Datasheet - Page 21

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

Specifications of 27220

Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
Programming Essentials
CONTENTS OF A WORKING PROGRAM
In Sections 1 - 4 of the
introduced to the BASIC Stamp, its architecture, and the concepts of variables and
constants. In this section, we’ll introduce the various elements of a program: linear
code, branching, loops, and subroutines.
The examples in this discussion use
program structure. Italics are used to indicate the sections of pseudo-code that
require replacement with valid programming statements in order to allow the
example to compile and run correctly. You need not enter any of the examples here
as all of these concepts will be used in the experiments that follow.
People often think of computers and microcontrollers as “smart” devices and yet,
they will do nothing without a specific set of instructions. This set of instructions is
called a program, and it is our job to write it. Programs for the BASIC Stamp are
written in a language called PBASIC, a Parallax-specific version of the BASIC
(Beginner’s All-purpose Symbolic Instruction Code) programming language. BASIC is
very popular because of its simplicity and English-like syntax. Since its creation at
Dartmouth College in the mid 1960’s it has become one of the dominant
programming languages available for platforms as small as the BASIC Stamp
microcontroller, and as large as mainframe computer systems.
A working program can be as simple as a list of statements. Like this:
This is a very simple, yet valid program structure. What you’ll find, however, is that
most programs do not run in a straight, linear fashion like the listing above. Program
flow is often redirected with branching, looping, and subroutines, with short linear
sections in between. The requirements for program flow are determined by the goal
of the program and the conditions under which the program is running.
statement 1
statement 2
statement 3
END
BASIC Stamp Syntax and Reference Manual
pseudo-code
to demonstrate and describe
you were

Related parts for 27220