Bus Communication

DALI frames (data packets) are created using Manchester (bi-phase) encoding, which is done through UART hardware. The Manchester code is a digital encoding format in which a logic '1' represents a rising-edge transition that occurs during a bit period, while a logic '0' represents a falling-edge transition during a bit period (see figure below). Start and Stop bits are encoded as a logic '1'.

Figure 1. Manchester Bit Encoding

Frames are transmitted at a baud rate of 1200 bps, and each frame is always sent with the Most Significant bit (MSb) first. Since the baud rate is 1200 bps, each bit period lasts for 833.33 µs, and each half-bit last for 416.67 µs. Half-bit period times are important since Manchester encoding requires two-bit transitions for each logical data bit.

A forward frame is the data packet transmitted by the control device to the control gear or input device.

A DALI 1.0 forward frame contains the Start bit, followed by the address byte, one data byte, and two Stop bits.

A DALI 2.0 forward frame contains the Start bit, followed by the address byte, up to two data bytes, and a Stop condition (see Figure 2). The DALI 2.0 24-bit forward frame, including the Start and Stop bits, lasts for 23.2 ms, or approximately 56 half-bit times, while the 16-bit forward frame lasts for 16.2 ms, or 39 half-bit periods. Once the control device completes the transmission of the frame, the control gear must begin to transmit the backward frame no sooner than 5.5 ms (approximately 14 half-bit times) and no later than 10.5 ms (approximately 25 half-bit periods). Once the backward frame has been received in its entirety, the control device must wait a minimum of 2.4 ms (approximately six half-bit periods) before transmitting the next forward frame (see Figure 3).

Figure 2. DALI Forward Frame
Figure 3. DALI Frame Timing

A backward frame is the response packet transmitted from the control gear to the control device. A backward frame consists of the Start bit, one data byte, and a Stop condition (see figure below). A backward frame, including the Start and Stop bits, lasts for 9.95 ms (approximately 24 half-bit periods). The data byte may be of any value, depending on the command that was issued by the control device. If a backward frame's data byte is 0xFF, the response is considered a 'yes'. If a response is expected and the bus remains Idle, the response is considered a 'no'.

Figure 4. DALI Backward Frame