How the ArtBus protocol works

 

Only one device on the bus, the master, sends commands. The other devices on the bus (bugs) listen to everything, but only execute commands addressed to them. Only one device can speak at any given time. This makes ArtBus is a single-master half-duplex protocol. This type of protocol works something like a game of ping pong where the master always serves, and the bus activity is a volley. ArtBus uses a Ping Pong Protocol. Taken together, one ping and one pong is a transaction.

It is implicit in this scheme that the master must wait for the bug to reply if a reply to a command is called for (not all commands generate a reply). This means that delays on the bus slow everything down. It's nice when the entire transaction happens quickly. A full transaction between an analog-in bug and a master could happen in slightly less than one millisecond (based on timing measurements taken on a digital storage scope).

From the point of view of a bug, serial input is stored in a queue if the address preceeding the command matches the address of the bug. Commands are executed in the order they are received. The queue buffer is about 32 bytes deep.

Individual addresses of ArtBus bugs are upper case and should numerate the bugs going from A to Z. The Group address is a way of causing multiple bugs to execute the same command at the same time. It is not a hierarchical grouping. Z is the default group address. Group addresses should number from Z to A. To a bug, there is no difference between its individual address and its group address.

Commands consist of a single lower case character. ArtBus commands a through f must return values. Commands i through v do not return values. Commands g, h, w, x, y, and z are common to ArtBus bugs.

Command strings must be sent with no delay between characters. A delay in the middle of sending a command string will cause the bug to time out and generate an error (red LED).

Useage:

Send a bang "!" (an exclamation point), then an address, e.g."A" then a command, e.g. "a", then a parameter (if appropriate) e.g. "2" then a semicolon. Thus all togther this would be: "!Aa2", which would be pronounced "bang-A-a-2-semi;"

Examples:

    AB_analog at address F, read input 3: !Fa3;
    AB_analog at address B, reboot: !Bz;
    Stop all devices: !Zh;
    All devices resume: !Zg;