Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

The nature of bytes sent with DALI comms protocol?

Status
Not open for further replies.
T

treez

Guest
Hello,
Our software engineer has failed to get our DALI comms system working for our lamps. (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).
 

Attachments

  • 0XFE 0X0F copy.jpg
    0XFE 0X0F copy.jpg
    121.8 KB · Views: 139

Hi,

Maybe start to read DALI specifications.
At least this is where I would start.

As next step you could read through the datasheet of the device that sends out your DALI signals.

Klaus
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Thanks, the DALI manual on page 19 says its 1.2bits/sec, but this cant be right...
DALI manual
**broken link removed**

..unfortunately the manual says nothing clearly about the timings or time gap between the two bytes.

- - - Updated - - -

As next step you could read through the datasheet of the device that sends out your DALI signals.
Thanks our DALI sender is a Philips "LLC7240 9137 003 608", and there is no datasheet for this, it is philips IP.

Their apps guy visits us and just tells us it is ok for us, that it will send DALI, and thats that.
(We prized it apart and noticed there are electrolytic capacitors in it. If we had known this we would have looked for something else, but it seems they all have 'lytics in them.)
 

DALI is specified as 1200 bits per second and according to Wikipaedia, 30 bit data packets. I do not have (or can afford!) the full specification I'm afraid.

1200 bits per second means one bit lasts 1/1200 S = 833uS

Each bit has a high and a low half so the transitions should occur every ~416uS or 833uS. I can't tell from the image how well the waveform complies with that.

I doubt there should be any delay between bytes but your scope trace only shows 16 bits, I suspect it is missing some of the pre-amble, post-amble or maybe CRC checking. It seems too short but without knowing the full packet structure I can't tell which bit is missing. The only reference to the structure without reverse engineering existing code I can find is in document DRM004 from NXP which states 16 bits and two stop bits are needed.

Brian.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Well spotted Hexreader!

So it is 16 bits + 2 stop bits and the first bit is a request for a reply from the client device.
So by my counting, at least one bit is missing from the stream shown in post #1 so it isn't a valid DALI message.

Brian.
 

Thanks Brian, i will check what we sent it with. I know it was a USB plugged device ("thing" to us) , which we plugged into our PC, and also had a DALI 15V power supply wired to the USB "thing", and then the DALI wires went from the DALU PSU box to our lamp.
The "USB thing" communicates with an App on the PC called "Terminal Deploy".

We type the bytes to be sent into terminal deploy.....eg type "0xFE" into the LHS dialog box and "0x07" into the RHS dialog box and it sends that, or at least we though it did..."0xFE" means "dim to a level", and the "0x07", means dim to 7/255 *max.

- - - Updated - - -

0xFE is always the first byte for us....the top post shows the sending of 0xFE then 0x0F.. or we hoped it did.
 
Last edited by a moderator:

Might I suggest you persuade your boss to part with a modest sum of money and buy a Saleae logic analyzer. They are tiny boxes with a USB interface on one side and probe wires on the other. You can hook it up to your DALI data and set it's decode to "Manchester" and it should not only show the waveform but decode what it carries as confirmation your software is correctly producing it. It can also measure the exact data rate and bit widths to confirm the bit-banging is working as expected.

I have no connection with Saleae but their devices and the software behind them is really first class. It's saved my skin several times!

www.saleae.com

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top