Remote-processing RPC-210 Instrukcja Użytkownika Strona 16

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 60
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 15
SAVING CODE AND DATA BASIC SECTION 3
Page 3-3
Using HIDE with RTC serial number
Each real time clock (RTC) has a unique serial number
associated with it. T his serial num ber may be used in
conjunction with your program to make sure a board was
not purchased from us and your system copied.
When used with HIDE, it becomes extremely difficult to
virtually impossible for someone to simply copy a
system since the serial num ber in your pr ogram is also
hidden.
See RTC-4.BAS and READING CLOCK SERIAL
NUM BER in SECTION 7 for a little more inform ation.
SAVING AND READING DATA
Data is saved to and read from Flash EPROM using
BSAVE and BLOAD commands. Any nume ric (bytes,
words, and floating point numbers) and string data can
be saved and read back. Data may be stored in Flash as
part of a data logging program.
The Flash EPROM has a limited number of write cycles
(1000 - 10, 000) per 256 byte sector, so writing data
should be kept to a minimum. Data may be read from
Flash an unlimited number of times.
NOTE: Future R PC-210 versions will change the F lash
EPROM type. The new type will be a
traditional flash. Major difference is sector
size will be 64K bytes instead of 256 bytes.
Another difference is the flash must be erased
before over-writing existing data. Curr ent flash
type (29C040A) allow s overw riting in 256 byte
sectors. Basic BSAVE com mand will be
modified to include an er ase option (E ) that will
erase the entire flash. C ontact Rem ote
Processing for mor e information.
Remember that your program is stored in segment 1.
RPBASIC-52 is stored in segment 0. Segments 2-8 may
be used to store programs also. Make sure you do not
write over your programs. A safe method to saving data
is to start in segment 2 (assuming there is no program
there) and go up from there.
Data can not be POKE’ed directly Flash EPROM).
When accessing data from EP ROM , add 8 to the
segment specified by the comm and. Com mands used to
read from EPROM are:
PEEKB PEEKW
PEEKF PEEK$
See SAV_LOD. BAS in the BASIC52 directory for an
example of how these commands are used.
Data must be put into RAM first before it can be written
to Flash. Writing to Flash is done in 256 byte sectors.
If you want to save just 1 byte, 256 bytes ar e written to
at a time.
When specifying a write addr ess, the form at should be in
0XX00H . ‘XX’ is any valid hex address. The least
significant byte should be 00.
Keep in mind wr iting takes about 50 mS/1000 bytes.
During BSAVE, interrupts are recognized but not
serviced. If these commands must be serviced quicker,
write data in blocks of 256 bytes. It takes a little over
10 mS to write from 1 to 256 bytes of data. The 10 mS
time is a ‘burn’ time for the Flash.
Block Data Transfer
Blocks of data are transferred to and from RAM and
Flash EP ROM using BLOAD and BSAVE commands.
Block transfers are useful for loading and storing data,
look-up tables, text, etc. U p to 65,535 bytes can be
moved from RAM to EPROM or EPROM to RAM at
one time. The absolute number of bytes that can be
moved is limited by the RAM and EPROM sizes.
Transfers from EPROM to RAM , using BLOA D, take
approximately 23.5 m s/1000 bytes. T ransfers from
RAM to EPROM , using BSAVE, are even longer at 75
mS/1000 bytes.
Serial port, tick timer, and external interrupts are
enabled dur ing these transfers. However, responses to
ONT ICK or ONIT R are delayed by the time it takes to
transfer data. W hen ONTIC K or ONITR must be
serviced faster, transfer data in sm aller blocks.
Refer to BLOAD and BSAVE in Appendix A for more
information.
ASSEMBLY LANGUAGE INTERFACE
Assembly language programs are placed in the Flash
EPROM. W hen using RP BASIC -52, programs should
start at address 7000H or higher up to FFFFH.
Code development can take place in a number of
different ways. Contact Remote Processing technical
support for ways appropriate to your situation.
Przeglądanie stron 15
1 2 ... 11 12 13 14 15 16 17 18 19 20 21 ... 59 60

Komentarze do niniejszej Instrukcji

Brak uwag