DALI driver code


#1

is there any squirrel code available for implementing a DALI lighting controller using imp ?
DALI is a standard for many street lights and luminares.


#2

from a hardware point of view, DALI use 2 processor port lines - TX using PWM output and RX using counter timer input.


#3

DALI appears to be 1200bps manchester coded; looks like you could do output using FFDAC and input using sampler (as the data rate is so slow, you’d just be using the harder peripherals to send and receive digital frames). You could also use SPI to generate frames but exact timing may require some faffing about depending on how close you can get a SPI divisor to 1200bps

Are you looking to do just control (output only?)


#4

Hugo,

Well, output DALI is the more important side as it is used to dim the lights and turn them on/off usually on a scheduled basis. So, it is important to be able to download to the lights different dim schedules depending on location and time of year. As we control just one slave led controller, addressing is not an issue.
On the other DALI RX side, it is useful to monitor the led controller output for fault codes etc.

I actually have sample DALI code written in C that I can send you if needed to create a DALI library. We need to expose the commands in the main code to create specific actions.

Sean.


#5

Sure, I mean we can take a look - we wouldn’t be writing a driver though, more just showing how a driver could be written. There’s no need for this to be a library.