Remote-processing BASIC 52 Instrukcja Użytkownika Strona 15

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 163
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 14
RPBASIC-52 PROGRAMMING GUIDE
1-12
watchdog timer may be nec essary to restart the ca rd.
Make sure call waiting is disabled.
ON LINE Multitasking
ON LINE is used to detect changes in a line. An
interrupt is generated every time a line goes high or
low. Use this command to detect changes in safety
interlocks, level switches, or process command
switches. Using this multitasking statement saves
code and time because checking is done
automatically in the background. A line must be
high or low for a m inimum of 5 ms to ensure
detection to another state. Up to 8 lines can be
monitored at one time.
This command is re-entrant, meaning when a routine
is long enough and change interval short enough the
interrupt is called twice. When there is this
potential, the first part of your program should
branch to routines that handle high and low line
conditions. Use the LINE function to return the
current status of a line.
ON COUNT can be used to expand the number of
line changes. Simply specify a count of 1. An
interrupt is generated when the line goes low.
Program execution slows down by up to 5% when
all ON COUN T and ON LINE statements are
enabled.
ON COUN T Multitasking
Up to 65,535 pulses can be counted on any one of
eight lines. A line m ust be both low and high for a
minimum of 5 ms to ensure counting. Maximum
reliable counting rate is 95 Hz.
Counters specified in this statement are software
counters only. It is not related to any hardware
counters on the card.
A number of syntaxes allow simple counting to
interrupt generation when a number of counts is
reached.
The number of counters can be increased by using
ON LINE. Counting rate must be very slow (less
than 10 time s/seco nd) to effectively use this method.
A counter increments when a line is low. Use the
LINE function to read the status of a line.
Program execution slows down by up to 5% when
all ON COUN T and ON LINE statements are
enabled.
Assembly Language Interface
Assembly language programs must be placed in the
RPBASIC-52 EPROM. When using the Basic,
assembly language program s should start at address
6000H or higher, up to 7FFFH.
Norm ally a 32K E PRO M is used to store R PBA SIC.
A 64K EPROM may be used provided a
modification is performed. Refer to your hardw are
manual under ASSEMBLY LANGUAGE INTERFACE
for information.
Documented assembly language interface calls listed
in the Intel MCS BASIC-52 Users Manual will not
work with RPB ASIC-52. This is because
RPBASIC-52 has be reassembled and code shifted
around.
Assembly language development environment
An economical way to development assembly
language programs and still keep RPB ASIC-52 is to
use an EPROM emulator. These are available from
several sources.
Parallax Inc (916) 721-8271
JDR Micro Devices (800) 538-5000
Model types frequently changes, so it is best to
contact these com panies for the latest in formation.
Generally, these cards connect to the parallel port on
a PC. Downloading a program is generally under 1
second.
The way programs are developed would be to
remove the RPBASIC-52 EPROM and read it by an
EPROM programmer. Save the file.
Install the EPROM emulator into the card. Then,
load in both the RPBASIC-52 binary file and your
assembly language binary file using the software
provided by the emulator.
Assembly language routines are accessed using the
Basic CALL command.
Another development method is to use an In-Circuit-
Emulator (ICE). Which type you use depends upon
the processor type and your budget.
Przeglądanie stron 14
1 2 ... 10 11 12 13 14 15 16 17 18 19 20 ... 162 163

Komentarze do niniejszej Instrukcji

Brak uwag