DALI-2 Receiver Demo Implementation

The functionality of the code is briefly described in demo workflow. The demo application detects the start of the frame using TMR8, then reads one or more bytes of data using the EUSART, then detects the frame stop, using the same TMR8, but with different configuration. After detecting the frame stop, the received data is processed, signal error checking is performed, then the data is decoded and the callback function is called.

Figure 1. Demo Workflow

For a DALI-2 Receiver implementation, the user must add the manchester_decoder.c and the manchester_decoder.h files to the project. These files give the possibility of DALI-2 frame reception.

Figure 2. API's Workflow

The API allows the user to set the callback functions for error handling: ‘manchester_decoderSetErrHandler(onSignalError);’ and for received data handling: ‘manchester_decoderSetReceiveHandler(onReceived);’. After those two being set, the decoder can be started using ’manchester_decoderEnable();’, and stopped using ’manchester_decoderDisable();’.