Download FORTH for NOAA/MLML Instruments

Transcript
FORTH for NOAA/MLML Instruments
MLML Tech Pub 93-2
3.
TattleTale Flash EPROM Burner
The TattleTale Model 7 (IT7) uses the Intel
28F020 Flash EPROM chips that allows up to 512K of
~read-only space. In this implementation, the FORTH
'core with the user dictionary appended is stored in
this space.
The user must set up the hardware properly before
attempting to burn a new program in the EPROM:
1.
2.
The power supply to the TT7 must be at 12.0
volts; no less than 11.4 volts and no more
than 12.6 volts as per EPROM's specification.
Pins F13 (VPROG) and F17 ( + 12V) must be
jumpered together on the TT7 to enable the
EPROM for burning.
If the record begins with S7, S8 or S9,
which signifies the end of the S-records,
then just the false flag is returned on
stack.
All other record types and any errors such as
invalid record, length and checksum will abort
with a message.
The Motorola S-record format comprises the
following string (note all digits are hexadecimals
-- two digits for each byte):
Stllaaaadddd...ddcc
t
numerical digit indicating the record
type:
Type
Function
Start of the S-record fue
Contains data
End of S-record fue
o
Then burning the EPROM may be done in one of two
ways:
1 to 3
7 to 9
1.
2.
Use TT7SAVE to add new FORTH words
created in the user dictionary to the end of
the FORTH core in the EPROM.
Use TT7LOAD or TT7SLOAD to download
the entire FORTH core plus any additions to
the user's dictionary. This allows updates to
the FORTH core through the console (SCI)
interface rather than use the 68332's BDM
interface which may not be accessible.
11
length of the entire binary string not
including the checksum field.
aaaa
memory address at the start of the
data, the length depends on the
record type:
Type
The following FORTH words are used to load the
buffer in memory and/or burn the new program into
the EPROM.
o
1 or 9
2 or 8
3 or 7
2
3
4
dddd...dd
cc
SRECORD
( a1 n1 -- a2 n2 tf
I 0 tf I ff)
Converts the Motorola S-record format at address
a1 and length n1 into binary data which is copied
to a1. Returns values to the stack on one of the
three conditions:
1.
If the record begins with SO, then a zero
and a true .flag is put on stack.
2.
If the record begins with SI, S2· or S3,
then the memory address a2 of the data
and the data length n2 is left on stack.
July 1993 (Rev. January 1994)
Address length in bytes
o
data
checksum, which is the one's complement
of the sum of the byte values from the
length byte up to the checksum byte.
Example:
" S107010012042AFFB8" SRECORD
DROP HERE 128 + SWAP DUMP
2564-1 <-Top
0000009A 12 04 2A FF .. *. ok
the address for the DUMP is arbitrary.
.8
63