help to implement a communication protocol

Dear Sirs,

I'm trying to implement a communication protocol, called DALI is an open standard that is used for lighting (to vary the light output of an electronic ballast), is structured as follows: The communication speed is 1200 bit / sec.

Transmission: 19 bits:

1 start bit, 1 byte address, 1 byte of data, 2 stop bits.

Reception: 11 bits: 1 start bit, 1 byte of data, 2 stop bits.

My question is how could implement, as the serial communications uses 8 data bits. I'm lost if someone could help me appreciate it.

Thanks. Greetings.

Transmission: 19 bits:

1 start bit, 1 byte address, 1 byte of data, 2 stop bits.

Are you sure about that, I've never heard of such a format whereas

Reception: 11 bits: 1 start bit, 1 byte of data, 2 stop bits.

Is fairly common.

If you transmit 19 bits how is it that you receive 11 bits?


Rob

This comes in the manual DALI:

A Forward Message Frame A forward message frame to a ballast shall consist of 19 bits, as follows: a) 1 start bit b) 1 address byte: 1 individual or group address bit, 6 address bits, and 1 select bit c) 1 data byte: 8 data bits d) 2 stop bits

A Backward Message Frame A backward message frame consists of 11 bits, as follows: a) 1 start bit b) 1 data byte: 8 data bits c) 2 stop bits

Yo estoy perdido porque tengo que implementar el protocolo DALI

Thanks you very much

OK, I believe you :)

You can't use a UART for the 19-bit transmission so I think you'll have to bit bang out a digital pin.

You can use a UART (or software serial) for the 11-bit reception.

The good news is that bit-bang transmission is a lot easier than reception.


Rob

Are you sure that the data is transferred with an asynchronous protocol. It doesn't mention that in what you have posted. It also doesn't mention the modulation method used, is it NRZ (non return to zero), RTZ , Manchester or what? Not all communication looks like serial data.

Thanks again,

As I can implement the transfer functions have to perform.

For the receipt number I can use the software serial?

Between transmission and reception there is a setting time of 12 ms

Thanks you very much

I just found a Microchip ap note (AN811), it looks like it's manchester encoded but no mention of which way around and no pics to show the waveform


Rob

This looks like a useful bit of information.

http://www.siwawi.arubi.uni-kl.de/avr_projects/dali/index.html

Thank you very much,

I’m a bit lost appreciate the aid.

Stuck pufffff …, do not know how to continue.

On the form of modulation of the wave, you can see it in the manual:

http://www.archenergy.com/lrp/lightingperf_standards/DALI%20V1_13.pdf

Thank you very much

This won't be easy Luis. Personally I'd start looking for someone that's already implemented this on an AVR.

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=53861

There's an example of DALI decoding about half way down the page.

Ap note from Atmel with example code

http://www.atmel.com/dyn/resources/prod_documents/doc9164.pdf


Rob