2 DALI-2 Frames
DALI-2 is a protocol used for digital lighting control. The DALI-2 communication system is usually deployed as a network composed of master or control devices and several slaves or control gears. The communication between devices is wired and is based on a Manchester coding.
All DALI-2 devices in the network are connected using a 2-wire connection line, carrying power and data. The devices exchange data with a baud rate of 1200.
- The data is Manchester encoded using a hardware EUSART and CLC configuration, while the information is packed as a DALI-2 frame using few software adjustments.
- The data is decoded using the same EUSART, with a sampling rate twice the DALI-2 baud rate in order to sample both bit halves for each Manchester encoded bit.
The DALI-2 wire consists of digital data coded using the IEEE 802.3 approach, and the information is packed as a frame. When there is no data exchange over the wire, meaning it is in an Idle state, the line is kept High. The start of the frame is represented by a Start bit, is followed by the payload, and the frame ends with two Stop bits represented by the line left in Idle or High (Figure 2-1).
The payload can be:
- One byte, if the frame is a backward frame: data sent as a reply to a previous received frame
- Two bytes, if the frame is a forward frame: the first byte represents the address of the recipient, and is followed by the opcode byte
Figure 2-2 and Figure 2-3 describe a DALI-2 frame created or received by a
microcontroller. As shown here, the DALI-2 frame starts with a ‘1
’ followed
by a ‘0
’ during the first clock period, being the equivalent of a logic
‘1
’, which represents the Start bit. It is followed by two bytes of data
for the forward frame (0x26 and 0x24 in Figure 2-2) or it is followed by a byte of data for the backward frame
(0x26 in Figure 2-3). After the end of the clock generation, the line is left in an
Idle state.