Remote-processing RPC-210 Manual de usuario Pagina 26

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 60
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 25
RAM BASIC SECTION 5
Page 5-1
Figure 5-1 RPBASIC-52 Memory Map
INTRODUCTION
RAM SECTION 5
512K of RAM is battery backed on the RPC-210. RAM
size is determined by the IC in U 5, w hich is solder ed in
at the time of production.
Battery to back up RAM life depends upon several
factors: RAM size, power consumption, ambient
temper ature, humidity, and amo unt of time the board is
operating. Generally, a battery life of about 3 to 5 years
can be expected. Operating the board at 50°C reduces
battery life by ½.
Maximum program and variable size is about 60K.
Additional RAM increases the amou nt of space available
for PEEK and POKE storage.
This sections discusses saving and retrieving variables to
RAM.
SAVING AND READING RAM DATA
The following commands are used to read from and
write to RAM.
PEEKB POKEB
PEEKW POKEW
PEEKF POKEF
PEEK$ POKE$
BLOAD BSAVE
PEEK and POKE type commands work on bytes (B
suffix, 8 bit length), words(W suffix, 2 bytes), floating
point numbers(F suffix,6 bytes ), or strings ($ suffix, set
by STRING command). A segment number,
corresponding to a 64K block, along with an addresses,
allows access to all RAM on a board. BLOAD and
BSAVE can be though of as block transfer comm ands.
BSAVE, however, writes to Flash EPRO M only.
Sample program ARRAY S.BAS show how to store and
retrieve “mixed” data types using RAM.
NOTE: Futur e version (Per haps starting in 2012) will
have an enhanded BSAVE command. The
newer BSAVE com mand will have an erase
flash sector capability. Contact R emote
Processing for mor e information.
PEEK segment limits are different on the RPC-210 than
those listed in the RPBASIC -52 manual. segment limits
are 0-15 instead of 0-7. segment 8-15 accesses EPROM.
Writing and reading memory
See mem ory m ap figure 3-2. "Data storage area" is
segment 1 to 7 in RAM , 9 to 15 in EPROM . Avoid
writing to segment 0.
PEEK and POKE type commands store and retrieve
values from memory. For example:
20 POKEB1,12,A
puts the byte value of A into segment 1, addr ess 12.
Use the PEEK statement to retrieve the variable:
50 B = PEEKB(1,12)
Saving different data types
Many times it is desirable to store an array containing a
"mixed" set of variables. Suppose you needed to save an
array m ade up of the following elements:
Bytes Type Description
1 Byte Job counter
2 Word Analog output offset
6 Floating point Correction factor
20 String Job name
Total number of byes required for each array is 30 (add
1 for a < CR> at the end of the string).
The Job counter is incremented ever y time it is
completed. Analog output offset is an output constant or
other var iable used to initialize the outputs. Job name is
used with the display to identify a job.
Vista de pagina 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 59 60

Comentarios a estos manuales

Sin comentarios