Instruction set – Ocean Optics SAD500 Communications and Control User Manual
Page 2
2
Flash (Slow) Memory
There are 4MB of flash memory for non-volatile data storage. Data is transferred from fast memory to slow
memory by the appropriate command or data storage mode parameter. When data is written to this section,
the pixel mode parameter determines which pixels are written. Pixel modes can be mixed in the section. Two
pointers determine where in this section data is written and read. The user cannot modify the write pointer
but can adjust the read pointer (E command). For best results, view this memory as a FIFO buffer for scans.
Due to several limitations, the user can only erase the entire contents of slow memory (L command) and not
individual spectra. The first block of this memory contains the operating parameters that are recalled upon
power-up. These parameters include the read and write pointers. To insure proper storage of data, issue the
close session command (C command) prior to the interruption of power so that these pointers are accurately
stored; otherwise, data can be overwritten, misinterpreted, and lost. The flash memory is rated for 1 million
write cycles; therefore, the close session command should not be issued after every write cycle but only
before loss of power.
Instruction Set
Command Syntax
The table on page 3 lists all of the commands and the microcode version number with which they were
introduced. All commands consist of an ASCII character passed over the serial port, followed by some
data. The length of the data depends on the command. The format for the data is either ASCII or binary
(default). The ASCII mode is set with the “a” command and the binary mode with the “b” command. To
insure accurate communications, all commands respond with an ACK (ASCII 6) for an acceptable
command or a NAK (ASCII 21) for an unacceptable command (i.e. data value specified out of range).
In the ASCII data value mode, the SAD500 “echos” the command through the RS-232 port. In the binary
mode, all data, except where noted, is passed as 16-bit unsigned integers (WORDs) with the MSB followed
by the LSB. By issuing the “v” command (Version number query), the data mode can be determined by
viewing the response (ASCII or binary).
In a typical data acquisition session, the user sends commands to implement the desired spectral acquisition
parameters (integration time, A/D rate, pixel mode, pixel boxcar smoothing, adding scans, etc.). Then the
user sends commands to acquire spectra (S command) with the previously set parameters. If slow memory
is not being used, then close session (C command) does not need to be issued. If necessary, the baud rate
can be changed at the beginning of this sequence to speed up the data transmission process.