TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137099 times)
  2. FAT32 Library (70236 times)
  3. Network Ethernet Library (56124 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42077 times)
  6. FT800 Library (41387 times)
  7. GSM click (29116 times)
  8. mikroSDK (26562 times)
  9. PID Library (26489 times)
  10. microSD click (25487 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

DALI 2 click

Rating:

5

Author: MIKROE

Last Updated: 2018-07-12

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: DALI

Downloaded: 7091 times

Not followed.

License: MIT license  

DALI 2 click offers a simple and reliable interface to DALI and DALI 2 communication bus, making it possible to dive into the world of intelligent lighting.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "DALI 2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "DALI 2 click" changes.

Do you want to report abuse regarding "DALI 2 click".

  • Information
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

DALI 2 click

DALI 2 click

Native view of the DALI 2 Click board.

View full image
DALI 2 click

DALI 2 click

Front and back view of the DALI 2 Click board.

View full image

Library Description

The library implements DALI master functionalities.

Key functions void dali2_sendCmd(const uint8_t balAddress, const uint8_t cmd, const uint8_t cmdType, const uint8_t folType) - Executes DALI command void dali2_masterInit() - Initializes master functionality uint8_t dali2_masterStatus() - Returns master status

Examples Description

The demo application is composed of three sections:

  • System Initialization - Initializes GPIO pins for TX and RX
  • Application Initialization - Initializes driver, initializes DALI master functionality and configures timer
  • Application Task - (code snippet) - Application task is composed of three sequences, the first sequence toggles light twice with a delay of one second. The second sequence decreases intensity of light by 8 steps with a delay of half a second. The third sequence increases light intensity by 8 steps with a delay of half a second.
void applicationTask()
{
    uint8_t counter;

    for (counter = 0; counter < 2; counter++)
    {
        dali2_sendCmd(_DALI2_ADDRESS01, _DALI2_OFF, _DALI2_BROADCAST_CMD,
_DALI2_FOLLOWING_COMMAND);
        Delay_ms( 1000 );
        dali2_sendCmd(_DALI2_ADDRESS01, _DALI2_RECALL_MAX_LEVEL, 
_DALI2_BROADCAST_CMD, _DALI2_FOLLOWING_COMMAND);
        Delay_ms( 1000 );
    }

    for (counter = 0; counter < 8; counter++)
    {
        dali2_sendCmd(_DALI2_ADDRESS01, _DALI2_DOWN, 
_DALI2_BROADCAST_CMD_DALI2_FOLLOWING_COMMAND);
        Delay_ms( 500 );
    }

    for (counter = 0; counter < 8; counter++)
    {
        dali2_sendCmd(_DALI2_ADDRESS01, _DALI2_UP, 
_DALI2_BROADCAST_CMD, _DALI2_FOLLOWING_COMMAND);
        Delay_ms( 500 );
    }

    current_state = dali2_masterStatus();
}

Note: This implementation of DALI master requires timer with exact 104 uS interrupt time. The MCU used for example must be capable to execute void dali2_isr() function in time less than 104 uS. In theory, it is usable on faster MCUs but before usage, you should check if your MCU is capable to execute dali2_isr function call for less than 104us.
  mikroSDK This click board is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant click board demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.

For more information about mikroSDK, visit the official page.

 

ALSO FROM THIS AUTHOR

Ambient 6 click

0

Ambient 6 click can sense the intensity of the ambient light, providing the measurement data in digital format over the I2C interface.

[Learn More]

V to Hz 2 click

5

V to Hz 2 click is a device that converts an analog voltage input signal into a pulse wave signal of a certain frequency.

[Learn More]

RF Meter 3 click

0

RF Meter 3 Click is a compact add-on board that collects information, analyzes RF power, and displays information in an easy-to-read digital format. This board features the LT5581, a low-power monolithic precision RMS power detector from Analog Devices. The RMS detector uses a proprietary technique to accurately measure the RF power in a range from 2GHz up to 2.6GHz, well-suited for signals with high crest factors. It outputs a DC voltage in linear scale proportional to an RF input signal power in dBm.

[Learn More]