Remote-processing RPC-52 Manuel d'utilisateur Page 10

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 36
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 9
SAVING PROGRAMS CHAPTER 3
Page 8
Figure 3-1 W3 autorun jumper
INTRODUCTION
Program s are stored in an EEPROM in socket U4. You
can store one program up to 32K bytes. A general rule
to determine program memory requirements is one line
requires 40 bytes. 32K bytes would store 800 lines of
code. Your application could be significantly more or
less, depending upon the number of commands/line,
comments, and pr int statements.
Despite the fact you may have a 128K or 512K RAM
installed, the maximum program size RPBASIC-52 can
run is about 60K (including room for variable storage).
Only one program can be stored on the EEPRO M, and
this is limited to about 32K.
An EEPROM is non-volatile (retaining data even when
power is disconnected), having an unlimited number of
read cycles and a limited number of write cycles (about
1,000). A program is not run fr om EEPROM . It is
transfer red to RAM and run from there. Prog ram s in
RAM can be modified. They can be saved to EEPROM
for auto execution later.
The RPC-52 can be set to autorun on power up or reset
by installing a jumper (W3). When autorun is on, the
program in E EPR OM is loaded into RA M and begins to
execute immediately.
The RPC -52 has two EEPR OMs. One is used for
program storage (U4). This is the one under discussion
in this chapter. T he other is a serial EEPROM used to
save various RPBASIC-52 and user parameters (U7).
The serial EEPROM is discussed in chapter 13.
This chapter discusses saving programs to EEPROM
(U4) and program autoexecution.
SAVING A PROGRAM
For this example, assume you wanted to save the
following program:
10 FOR N= 0 TO 2
20 PRINT "Hello ",
30 NEXT
40 PRINT
If this progr am is not alr eady in, type it in now (or , if
you prefer, use your own program).
Type in the following command:
SAVE
RPBASIC-52 responds with:
Saving 35 bytes
Verifying --- OK
The time it takes save a program depends upon the
length and complexity of the program. Program ming
rate is about 600 bytes/second. If the program does not
successfully save to the EE PROM, an err or message will
appear.
Saving a program overw rites the pr evious one. Ther e is
no way to recover the old one since both occupy the
same space.
AUTORUNNING
To autorun a program:
1. Make sure there is a program in EE PROM (from
above).
2. Install jumper W3.
If you push the reset button , the progr am should
autoexecute. If th ere ar e any errors, the program will
stop (assuming you have not trapped them with ON
ERROR) and display the error message.
PREVENTING AUTORUN
When troubleshooting a program, it' s not always
convenient for an autoexecute file to r un. This is
especially true if the program has been configured to
ignore the < ESC> or < Ctl-C> keys. To pr event
autorun, r emove jumper W3 before power up or reset.
LOADING A PROGRAM
There are tim es when y ou may w ish to tempor arily
modify or otherwise test out a change to a program.
Since the program is loaded into RAM in autorun,
modifications can be made without affecting the program
in EEPRO M. Use the LOAD command to transfer the
EEPROM program to RAM.
If you find out that modifications are not desirable or did
not work, you can restore the original program to RAM
using the LOAD command.
Vue de la page 9
1 2 ... 5 6 7 8 9 10 11 12 13 14 15 ... 35 36

Commentaires sur ces manuels

Pas de commentaire