Remote-processing RPC-2350 Manual do Utilizador Página 17

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 83
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 16
SAVING AND LINKING PROGRAMS CHAPTER 3
3-2
Where ‘program’ is 0 or 1 for 128K Flash or 0 to 7 for
512K Flash installed.
“SA VE” and “ SAVE 0" ar e the same . Both save to
program location 0.
Type in the following command for this example:
SAVE
CAM BASIC will compile the program , progr am the
EPROM, and verify its contents.
Compile...Write...Verify
The time it takes to do all of this depends upon the
length and complexity of the progr am. Gener ally, it w ill
be from 1 to 20 seconds. T he ready prom pt (> ) will
appear when the program has been successfully saved to
the EPROM . If the program does not write to the
EPROM, an error message will appear:
Fail @ xxxx
Saving a program overw rites the pr evious one. Ther e is
no way to recover it since both occupy the same space.
AUTORUNNING
The program stored using SAVE or SAV E 0 will
autorun. To autorun a program:
1. Make sure there is a program in EP ROM (from
above) stored by using SAVE or SAVE 0.
2. Make sure the autorun jumper W11 is installed.
If you push the reset button, the program should run. If
there are any errors, the program will stop (assuming
you have not trapped them with ON ERROR) and
display the error message.
PREVENTING AUTORUN
When troubleshooting or maintaining a program, it' s not
always convenient for an autoexec ute file to run. This is
especially true if the program has been configured to
ignore the < ESC> key. To prevent autorun, remove
jumper W11.
Later, if you wish to SAVE or LOAD a program,
reinstall this jumper. You may do so even if the power
is on and a program is running. Remember to discharge
any static electricity before installing or removing the
jumper.
Another way to prevent autorun is to remove the
signature bytes from Flash. This is done by writing
&FF ’s into Flash address 0 and 1, segment 8. Use the
following steps to do this.
dpoke &8000,&ffff
save 8,0,0,0,&8000,2
This will overwrite the first 128 to 256 bytes of code and
prevent autorun.
LOADING PROGRAMS
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, modifications
can be made without affecting the program in EPROM.
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.
This version of CAM BASIC can link and run 2
programs with a 128K or 8 with 512K flash. Because of
this linking ability, you should do some things during
development to limit problems. Before loading a new
program, enter the following com mand fir st:
new
If you are loading one pr ogram through F lash, saving it,
stopping, then loading another pr ogram and running it,
you may notice some oddities, like incorr ect variable
values or syntax errors to lines not in your code. This
oddity is probably due to the program size difference. If
you do not type in NEW to start with, LOA Ding w ill
clobber what is in m emory and nothing w ill be right.
If you are using multitasking routines, such as ON BIT
or ON TICK, then it is best to reset the board and then
load the program during development.
The other (and be st) way to take care of this problem is
to reset the board, then load the program.
Use LOAD 0 to retrieve programs saved using SAVE 0
or SAVE and use LOAD n to retrieve programs saved
using SAVE n. ‘n’ is 0 or 1 for 128K Flash and 0 to 7
for 512K.
Vista de página 16
1 2 ... 12 13 14 15 16 17 18 19 20 21 22 ... 82 83

Comentários a estes Manuais

Sem comentários