SP395 SoundPro Audio Integrator Form7492 Operation Manual
108
Appendix D: Serial Protocol for Accessing SP395 Memories
This document details the serial protocol for retrieving the contents of the SP395 memories via
the serial ports.
Serial hook-up and protocol
The SP395 connects to the computer’s serial port with a straight-through serial cable. The
standard SP395 serial cable may be used for this purpose.
The RS232 protocol is 19200 baud, no parity, 8-bit word length, and 1 stop bit.
Transmit Memory
All SP395 or previousSP395 versions after 2.91 transmit 231 bytes of data. Allow enough space
in the serial buffer to hold the full 231 bytes.
To cause the SP395 to transmit a memory, send it the following ASCII serial data: Xnnn
Where nnn is a 3-character memory number, with leading 0’s. For example, to obtain
memory number 24, send X024
Note that there is no terminator (line feed or CR) for this data string.
The SP395 will immediately transmit 231 bytes of data for the requested memory number. The
data sent is as follows:
Xnnn repeat of requested memory number
Then, 128 sets of byte pairs:
low byte low 8 bits of word
high byte high 8 bits of word
chksum 8-bit checksum. This is the sum, truncated to 8 bits, of the previous 230 bytes
transmitted.
The receiver should verify the checksum and then assemble the bytes into 256 16-bit words.
Memory Data Format
The data transmitted from the SP395 has the following format, as shown in an example C struct:
struct memstr
{
char id[4]; /* Xnnn – memory number sent */
union
{
short idata[120]; /* int form of data block */
char cdata[240]; /* byte form of data block */
} data;
short tags[7]; /* extra data sent */
short memtype; /* memory type field */
unsigned char chksum;
};
The possible memory types are:
#define MEMTYPE_UNUSED 0
#define MEMTYPE_RTA 1
#define MEMTYPE_RTA_LOW 2
#define MEMTYPE_FREQRESP 3
#define MEMTYPE_IMP 4
#define MEMTYPE_ETC 5
#define MEMTYPE_NOISE 6
#define MEMTYPE_TDA 7
#define MEMTYPE_TDA_PHASE 8