Skip to content

eBUS background

John edited this page Feb 24, 2015 · 8 revisions

eBUS background

This small tutorial is supposed to give you some background on the eBUS and the messages transmitted on it.

Bits on the wire

The eBUS protocol is byte oriented, which means that 8 bits of data are always transmitted in a row without means of interruption. As everything is based on RS232, there might be some start and stop bits on the wire as well, but these are not relevant for understanding the protocol.

Addresses

The eBUS protocol defines 25 different master addresses, 203 pure slave addresses, a broadcast address, and some special values. Each master also has a dedicated slave address which can be found by simply adding 5 to the master address.
Furthermore, there are two special values needed for synchronization and escaping. In total, this makes 256 different values (that's the point where your first "aha!" should be coming :-) ).

"Why exactly 25 masters?" you might think, and that is a very good question. The answer is pretty simple, because this magical number is directly associated with the arbitration. "What?" - don't worry, it's just an evil technician word. Arbitration is like a small recipe that tells you what to do to make a good cake - or in the eBUS case: how to access the bus in order to send something on it. The receipe looks like that:

  • wait for a SYNchronisation symbol to appear
  • write your own master address
  • read the next byte back from the bus
  • if that byte is your own master address, you won!
  • otherwise: start over again

Bus state

The eBUS mainly has two different states: an idle state (when currently no message is sent), and an active state (when a message transfer is in progress). In the idle state, a so called SYNchronisation symbol generator repeatedly sends a SYN symbol on the bus in a certain interval. This is necessary for all participants to know, when access to the bus is granted (see the previous chapter).

Send a message

Once a master has successfully gathered access to the bus, it is supposed to immediately send the message. Consequently, a message starts with the master address which is immediately followed by the destination address. The destination can be one of the 25 master addresses, a slave address, or the broadcast address.

Depending on the destination address, the message structure is slightly different.

Broadcast message

A broadcast message is sent to all devices on the bus and thus there is no direct answer to it. That's why this message is the easiest one. It consists of the following parts:

master BROADCAST primary secondary COUNT [data] CRC
(lowercase stands for relevant data, UPPERCASE indicates a constant or values that can be calculated from others)

The individual parts of the broadcast message are:

  1. master: the master address
  2. BROADCAST: the destination address (the singular broadcast address)
  3. primary: the primary command
  4. secondary: the secondary command
  5. COUNT: the number of data bytes following
  6. data: COUNT data bytes
  7. CRC: the CRC of all previous bytes

to be continued...

Master-Master message

Master-Slave message

Clone this wiki locally