SB-Bus Control

The Tiny EPROM Simulator is a member of the SB-Bus interface family. This means that it can be connected to the COM port of a master computer together with 124 other devices.
Only a simple adapter is required to make the necessary conversion from RS-232 signal levels to the SB-Bus signals. Such an adapter can be as simple as a special cable that can connect just one device, or it can be as complex as a complete multi-port driver that can drive up to 125 devices at the same time.

This chapter only gives you a brief overview of the SB-Bus. If you need more detailed information about the SB-Bus please read the description elsewhere on my site.

Communication

The communication on the SB-Bus is done at a fixed speed of 9600 baud, 8 data bits, no parity and 1 stop bit. All commands are given in understandable ASCII commands. Commands can be given in upper or lower case, for the software is not case-sensitive. Bit b7 of each character is always 0 because only the standard ASCII character set is allowed during communication.

Addressing

In order to connect multiple devices to one bus system it must be possible to address each single device. Each device must have its own unique SB-Bus address. Such an address is a byte where b7 is '1', as opposed to normal characters where b7 is always '0'. So address bytes can have a decimal value from 128 ($80) to 255 ($FF).
Addresses 128 ($80), 254 ($FE) and 255 ($FF) have a special function in the SB-Bus protocol, so you can choose any of the 125 other addresses as long as it is not used by an other device on the same bus.
The Tiny EPROM Simulator has a fixed address which is hard programmed to 134 ($86) by default. You can only change the address by changing one byte in the program code. This address directly follows the text @SLAVE in the program code, as required by the SB-Bus protocol. In our case the address is stored at location $000A in the program. The SB-Bus protocol has reserved the address range from 130 ($82) to 139 ($8B) for programmers. This is only a recommendation and you're free to choose any other available address.

Prompts

SB-Bus devices can respond with 3 different prompts. Such a prompt indicates the status of the device and is always the last string sent by a device in response to a command. A device will not send any more characters on its own accord after sending one of these prompts.

=>

OK Prompt. The last command was completed successfully. This prompt is also given when a device is selected after receiving its own SB-Bus address.

!>

Execution error Prompt. This prompt is given if the last command could not be completed without error. The *ERROR? command will tell you what kind of error occurred.

?>

Syntax error Prompt. The command is not recognized by the instrument.

Handshaking

Two handshaking methods are described in the SB-Bus protocol. The main handshaking is done with the XON/XOFF flow control. With this protocol the receiving party can temporarily halt incoming data by sending the XOFF character (Ctrl-S). The receiving party can resume the incoming data again by sending the XON character (Ctrl-Q). This protocol is only used if the receiving party is unable to handle the incoming data fast enough.
The input buffer of the Tiny EPROM Simulator is large enough to receive normal commands and parameters. Therefore the Tiny EPROM Simulator will never have to send an XOFF signal to the master to slow down communication.

Acknowledge flow control is useful when transferring large amounts of data. The receiving party has to send an acknowledgement every time one line of data is received. The sender will transmit the next line only when the receiver has received the previous line correctly, otherwise the previous line is repeated.
Acknowledge flow control is only used when transferring multiple lines. Commands that can only send one line of data will never use acknowledge flow control.
You may decide whether or not to use acknowledge flow control. The Acknowledge flow control is a supplement to the XON/XOFF flow control, which will always be active.