Remote Processing RPC-210 User Manual
Page 17

SAVING CODE AND DATA
BASIC
SECTION 3
Page 3-4
UPDATING OR REPLACING RPBASIC-52
RPBA SIC-52 p rogr am m ay be update d or r eplaced w hile
in circuit. A curr ent version of RPBASIC-52 for the
RPC -210 is on the ap plications disk. It is also available
at our web site at www. rp3.com . Check under
PROD UCT S, then RPC -210.
Your own assembly language program may replace
RPBASIC-52 also. In either situation, the process is the
same.
First, download the Basic program HE XLOA D. BAS.
This program accepts Intel HEX files and stores the
binary information in RAM segment 1, starting at
address 0.
After the program is loaded, execute the BSAVE
command:
BSAVE 0,0,1,0,6000H
Saving 6000H bytes take s a couple of seconds.
NOTE: You will need to hit the reset button to restart
or run your program. This is because the burn
program runs from RAM and will try to return
to the calling address. This address may have
changed.
WARNING:
The BSA VE pr ocess is irr eversible . O nce starte d it
cannot be stopped. If power is rem oved during the
saving process, chances are your program w ill be
“half bur ned” and probably unusa ble. In that case
you will need to burn in the 29C 040A F lash
EPROM in an external burner.
NOTE: If the program you are r eplacing does not have
its own Flash EPRO M saving program , any
subsequent changes to the Flash must be done
using an external burner.
BSAVE does a verify. However, if you are replacing or
updating RPBASIC you probably will not get an error
message. If r eplacing RPBASIC-52, download and run
VERIFY RP. BAS to make sure the entire program
burned OK.
SETTING FLASH SIZE
Jumper block W4 sets U6 size. By default, RPC-210
boards with RPBASIC -52 are shipped with 512K of
Flash. W 4 jumpers should be set to W4[1-3][2-4] for
standard boar ds.
COMMANDS
The following is a list of RPBASIC-52 commands used
with RAM and Flash EPROM.
Command
Format
BLOAD
Transfers data from EPROM to RAM
BSAVE
Transfers data from RAM to EPROM
CALL
Calls an assembly language routine
PEEK B
Return s a byte
PEEK F
Returns a floating point number
PEEK W
Returns a 16 bit number
PEEK $
Returns a string
POKE B
Stores a byte to RAM
POKE F
Stores a flo ating point num ber to
RAM
POKE W
Stores a16 bit number to RAM
POKE $
Stores a string to RAM
XBY
Reads or writes external mem ory,
segment only.
NOTE:
BSAVE syntax will change in future
versions (in or about 2012) to include an
“E ”, or erase sector option.