Timings of bytes sent by DALI?

Find out how to setup your programmer's software and how to solve many common problems.

Moderator: phalanx

Post Reply
Posts: 161
Joined: Sat Dec 27, 2008 8:39 am

Timings of bytes sent by DALI?

Post by treez » Sat Jun 24, 2017 1:10 am

Thankyou very much indeed for your previous answers.
Our software engineer has failed to get our DALI comms system working for our lamps that use PIC18F26K20. (The DALI libraries etc are just too complex). Therefore we are now asking him to just do software “bit-bashing” of the DALI signal, which is just 2 bytes, as attached.
However, he is asking if there is a variable delay between the two bytes? (the bytes are Manchester encoded). Also, as you can see, there is a transition every 400us or 800us. Will these timings always exist with DALI? (or will they vary widely).
{We deserve no sympathy whatsoever, but we are going out of business as two software engineers have leached us of money trying to do DALI. They told us our hardware was at fault, but now we have their bit-bash DALI code working we know the hardware was alright all along. However, there is this issue about whether there sometimes may be different timings in the received DALI bytes.}

Support Volunteer
Posts: 990
Joined: Wed Mar 22, 2006 11:02 am

Re: Timings of bytes sent by DALI?

Post by n1ist » Sun Jun 25, 2017 8:59 am

Your image isn't showing up because you are trying to link to a file on your machine.

The timing between the two bytes of a forward frame (the stop bit) should be 1Te but the low can be 1.5Te long if the last bit was a '0'. Each Te is 833us +/-10%. Between two forward frames, the timing is more than 22Te (no upper limit). If there is a reverse frame (i.e. a response from the other device), it would happen between 7Te and 22Te after the stop bit of the forward frame.

Look at http://ww1.microchip.com/downloads/en/A ... 01465A.pdf for more info and sample bit-banged code.

Note that there's quite a bit on top of the simple DALI transmit and receive to implement DALI communications including addressing, forward frames that must get repeated within 100ms, collision detection, page 0/1 memory access, and now DALI type support.

Post Reply