
RPBASIC-52 PROGRAMMING GUIDE
1-1
PREFACE
This programming guide is for Remote Processing
controllers using RPBASIC-52 language. It was
derived from Intel MCS-51 BASIC, V1.1. Several
command extensions and features have been added
to effectively speed up command execution.
M Buffered serial ports. Received characters are
buffered to 256 characters. PRIN T strings are
put into a 256 character buffer, making it much
faster.
M Multi-tasking constructs such as ON LINE, ON
COM, ON COUNT, and ON KEYPAD. Lines
and keypad are monitored at assembly language
speed on every 5 ms tick time. This speeds up
program execution because the main program
no longer has to monitor these points.
M Softw are comm ands d irectly support hardw are.
DATE and TIM E work with the rea l time clock.
AIN reads a voltage while AOT outputs one.
Some cards do not have all hardware features so do
not support all of the commands. Cards supported or
exceptions are listed with each command. In some
cases you must refer to your hardware manual for
exact ranges.
A few original BASIC-52 commands have been
removed. These commands were oriented around
specific registers in the 8052 chip or a specific
design. For example, the PROG command assumed
code is stored in an EPROM. Remote Processing
cards use a flash EPROM which uses a new
programming algorithm. The PROG command was
replaced with SAVE.
MANUAL CONVENTIONS
Information appearing on your screen is shown in a
different type.
Example:
RPBASIC-52 V1.0
Copyright Remote Processing (1995)
Bytes free: 27434
Symbols and Terminology
<xxx> Paired angle brackets are used to indicate a
specific key on your keyboard. For
example, <esc> means the escape key.
expr Term m eaning a num ber, simple
variable, or mathematical expression
involving variables and numbers. The
following are valid expr:
45.3
B
CYCLE
B*45
C*D+54
INT( D)
expr can be another func tion.
Complexity of expr is limited by
available stack memory. Usually this is
7 levels of parentheses.
For clarity, expr may be another name
such as position, channel, and so on.
italic Italicized variables require an
expression or value. For example:
AIN(channel)
KEYPAD(function)
Ellipsis (...) follow an instruction w hich optionally
accept more data.
DATA data[,data][,data]...
READ variable[,variable]...
Optional portions of an instruction are enclosed in
brackets []:
DISPLAY option[,option][,option]
Comentarios a estos manuales