ASI Description
ASI (Asynchronous Serial Communication) consists of an electrical interface and a communication protocol. The electrical interface is designed to interface directly with RS232 and also TTL Logic, typically a UART from a microcontroller. The communication protocol is designed to work with this but also offer multiple devices on the same bus.
Electrical Interface
The serial interface consists of 5 connections, of which, only four will be used at any one time. The connection details are as follows:
| Pin 1 | RX(m) | Signal in non-inverted |
| Pin 2 | TX | Signal out controlled by software |
| Pin 3 | +5V | Power |
| Pin 4 | RX(232) | Signal in inverted for direct connection to RS232 |
| Pin 5 | GND | Ground |
There are two interface options, one intended for RS232 operation and one intended for microcontroller operation. The RS232 connection can accept up to + and - 15V and the signal is inverted with respect to the microcontroller interface. A mark and space is represented by a positive or negative voltage.
The microcontroller interface expects a voltage swing of 0 to 5V (3V is sufficient for some devices) and these represent the mark space voltages.
The output from a device (pin 2) is common to the RS232 and microcontroller interface and although this is logic 0-5V it will be accepted by most RS232 interfaces. The pin difference is in the input to the device, pin 4 is intended to accept output from an RS232 device and pin 1 is intended to accept output from a microcontroller. All devices need a power supply and this is provided by pins 3 and 5. These pins have been chosen so that if the 5 way connector is connected the wrong way round the power pin remain in the same place.
| Interface | Space(idle) | Mark (signal) |
| RS232 | - voltage or 0 | + Voltage |
| Microcontroller | +voltage (high) | 0V (low) |
The interface also allows multiple devices to be connected to the same bus. The RS232 specification never intended for this to be so some compromise has to be made to facilitate this. The TX output is connected to an open collector transistor that is pulled high by a 4k7 resistor, when the transistor is off, any device my pull the TX line low to signal to the master device and this has some implications.
As can be seen from the table the idle time, when no signal is present, for the RS232 interface is low. This means that multiple devices cannot be connected to the same bus when using this interface. The opposite is true for a microcontroller and in conjunction with the pull up resistor, this interface can support many devices on the same bus. All ASI devices have a jumper and a built in pull up resistor. The jumper is permanently shorted by a thin PCB track and this must be cut on each of the devices (except 1) if several devices are connected to the same bus. In practice it has been found that two or three devices can be connected without resorting to cut the track.
It should be pointed out that this ONLY effects the TX line (input to the master) and for devices where input may not be required, a display for example, multiple devices can be used. The downside (applies to RS232 only) is that there can be no feedback form the device. When this is the case leave pin diconnected.
Connection Via PC Com Port (Inverted) - Single Device
|
![]() |
The above shows how to connect a device via a standard PC-COM port or a USB to RS232 convertor, the type used when no COM port is available. This method of connection is designed for single devices although multiple devices can be used if pin 2 from the device is left disconnected.
Connection Via UART (Non-inverted) - Multiple Devices
|
|
The above is the connection details for connecting to a microcontroller or when using a BV101 to 3 that will output TTL logic levels to the device. This method must be used for multiple devices on the same bus.
Software Interface
The ASI protocol has been designed to allow serial communication over either a standard RS232 COM port or a microcontroller UART. At the physical level it uses a start bit, 8 data bits and 1 or 2 stop bits. This is the standard used by all RS232 and communications programs and so most standard terminals would be able to communicate.
The protocol is byte orientated where bytes are sent and received. This gives a range of 0 to 225. The values however have been carefully chosen so that common commands and addresses are in the 'visible' range. This means values that fall into the ASCII codes 0x20 to 0x7f. The reason for this is that it makes debugging and experimenting with the device very simple using any standard terminal, no specialist interface software is required.
All devices have an address and so more than one device can be attached to the same bus, the software can then direct commands to the correct device by using its address. The address consists of one byte, see system commands further down the page.
The protocol uses a single byte for addressing and commands from the following range:
- Special commands Range 1-31 (effects all devices - non addressable)
- Reserved Range 32 - 64
- System commands Range 65 - 96 ( 'A' - '`' )
- Device commands Range 97 - 122 ( 'a' - 'z' )
- Device addresses Range 97 - 122 ( 'a' - 'z' )
The protocol uses the byte value and does not care about its ASCII code equivalent, however the ranges have been chosen so that system commands are all upper case and device commands are all lower case when printed out or if using a terminal for input. This makes the commands easer to visualise and remember.
All devices share a common set of system commands.
| Command | Description |
| A | Address |
| B | Write to EEPROM |
| C | Turn off ACK |
| D | Delay |
| E | Turn off error reporting |
| F | Factory reset |
| G | Read EEPROM |
| U | Unlock |
| M | Macro run at start up |
| N | Switch to non-inverted |
| P | Print contents of EEPROM |
| R | Reset device |
| V | Version |
| T | Test macro |
| Z | Create macro |
The above table shows the system commands available to all devices. When devices leave the factory they are all configured with address 97 ('a'). This can be changed to any in the allowed range by using the system command 65 ('A'). Most devices also have an EEPROM that the user can store data to, only the first 16 bytes are reserved for system use. this leaves 240 bytes for the user (depending on the device). The LCD (BV4103) for example can use this to store messages and sign on messages.
Packet
To send or receive date from a device a particular sequence of bytes is required, this is called a packet and this packet consists of:
<address><data><13>
All devices will read into an internal buffer the full packet information and disregard any packet that does not match the devices own address. Note from the above that a packet terminates with 13 (0x0d), this is Carriage Return. Some terminals send only Line Feed (10), if this is the case then the packet will not be completed and unpredictable results will be obtained. A device will only act on the contents of the buffer when the byte with a value of 13 is received and so this is an important part of the communication protocol.
The<data> will normally be a command and this will vary from device to device.
Handshake
The hardware interface provides no handshake as this is left to the software protocol and can be optionally used by the user. When a device receives a command and its address matches that to the one sent, it will carry out the command and on completion send and ACK byte, set by default to be a value of 62 which is no coincidence that it looks like '>' on the terminal. For proper use the master software should send out a command and wait for the device to respond with 62 before sending out another command.
Some devices return information and this information will be terminated with 62 so it is an easy matter for the master software to extract the information returned.
As an example, to check the firmware version of the device for example the following sequence would be sent:
sendByte(97); sendByte(86);
The device will respond with 3 bytes, the two version bytes and the ACK character 62. This character can be detected (waited for) in software to verify a successful command. Using the chosen characters this looks like the following on a terminal:
aV
1a>
Addressing
As previously mentioned all devices have an address, the default is 97 for most devices. When using multiple devices each device must be configured before connecting to the multiple device bus. This must be done with each device individually, it is a one time operation as the new address is stored in EEPROM
Special Commands
There are currently 3 special commands, Address discovery(1), Reset(3) and Invert(4). These commands will cause all of the devices on the bus to respond, the commands in the special range do not need to send the address.
Address discovery allows an automated system to determine how many ASI devices are connected to the bus and what their addresses are. When this command is sent the device will respond with its address, but depending on what address it has will determine the amount of time it takes to respond. Each address is separated by 30ms and so the first address 'a' (97) will respond immediately but 'h' (104) for example will wait for 210 ms before responding. This method allows all of the devices to respond without causing a clash on the bus. This command can be sent using a terminal by pressing CTRL-A.
The Invert special command refers to the output of the device. All devices output via pin 2 of the ASI connector and by default this output is inverted data, electrically this means that in the idle state the output is low and a bit is high. This will work with a standard COM port attached to a PC or a standard serial convertor of the type used for laptops where no COM port exists. The output is only 0v and 5V, rather than the plus and minus 12V RS232 specification but this will work with nearly all standard COM ports.
The purpose of this command is to invert the output so that the idle sate is now +5V and the data is 0V. This will now be suitable for connection to a microcontroller UART or an RS232 to TTL convertor (see BV101-4 and BV102). The other advantage of using this mode is that, because pin 2 is open collector, more than one device can output to the same bus. The IASI specification has two inputs, inverted and non-inverted so this only applies to the output pin 2.
The command can be send using a terminal by CTRL-D. More details are available on the individual device data sheets.


