
CHAPTER 3 SAVING AND LINKING PROGRAMS
3-1
Figure 3-1 Flash location and jumpers
CHAPTER SYNOPSIS
Saving programs to Flash
Retrieving programs from F lash
Load and run two programs
Autorun on reset or power up
Installing 128K or 512K Flash
DESCRIPTION
SAVING AND LINKING PROGRAMS CHAPTER 3
Two to 8 programs can be stored in socket U3. U3
normally has a 29C010A Flash type EPROM, which
stores 2 progr ams. Its capacity is 128K bytes.
U3 socket can accept a 29C0 40A type E PROM. This
type has 512K byte capacity and can store up to 8
program s.
You can store two to eight programs up to a maximum
size of about 33K bytes each. A general rule to
determine program storage requirem ents is one line
requires 40 bytes. 32K bytes would store over 800 lines
of code. Your application could be significantly more or
less, depending upon the number of commands / line,
comments, and print statements. Another indication of
program size is to use the file length as saved on a PC
disk.
The 29C 010A (128K) Flash can store 2 progr ams while
the 29C040A (512K) stores up to 8 programs.
Despite the fact you have 128K or 512K RAM installed,
the maxim um program size CA MBASIC can run is
about 33K (leaving room for variable storage).
Programs can be chained, however. When programs are
chained, variables from one prog ram can be used in
another.
Data can be saved to and retrieved from this device
using the SAVE and LOA D comm ands. The m aximum
amount of data that can be accessed is limited by the size
of your program less the Flash size.
The Flash EPROM is non-volatile (retaining data even
when power is disconnected), having an unlimited
number of re ad cycles and a limited number of write
cycles (about 1,000 to 10,000). U sing 1,000 c ycles as a
limit, you can write to Flash once a da y for abo ut 3
years before “wearing out” the device.
A program is not run fr om EPROM. It is transfer red to
RAM and run from there. Pr ograms in RAM are run
and can be modified. They can be saved to EPROM for
execution later.
The RPC -2350 is set to autorun on power up or reset by
installing a jumper (W11). When autorun is on, the
program in E PRO M is loaded into RAM and begins to
execute immediately.
The EP ROM is write-protected w ith a software lock, so
accidental writes on pow er-on or -off are almost
impossible. You cannot disable the lock except when
executing the SAVE command.
SAVING A PROGRAM
To save a program , set jumper W 11. You m ay set the
jumper even if the power is on. Remember to discharge
any static electricity before installing or removing the
jumper. 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).
You can save your program to any one of two locations:
0 or 1. Prog ram s saved to location 0 will automatically
run at power up. Syntaxes to save a program are:
SAVE
SAVE program
Comentários a estes Manuais