TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139248 times)
  2. FAT32 Library (71743 times)
  3. Network Ethernet Library (57115 times)
  4. USB Device Library (47428 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28073 times)
  9. PID Library (26885 times)
  10. microSD click (26198 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: 7928 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

Hall Current 4 click

7

The Hall Current 4 click is designed to measure relatively high current by using the integrated ACS70331 sensor.

[Learn More]

BUZZ 2 click

1

BUZZ 2 click carries the CMT-8540S-SMT magnetic buzzer transducer. Buzzer’s resonant frequency is 4kHz. The click is designed to run on either 3.3V or 5V power supply.

[Learn More]

Step Down 12 Click

0

Step Down 12 Click is a compact add-on board for reliable DC-DC step-down applications. Based on Texas Instruments' TPS62902 synchronous step-down converter, it features the DCS-Control topology, which combines hysteretic, voltage mode, and current mode control for precision and fast response to voltage changes. Supporting a wide input voltage range of 3V to 17V, it provides stable output voltages with accuracy within ±1% and can enter power save mode for high efficiency under light loads. With 16 configurable output voltages from 0.7V to 5.5V, this Click board™ is ideal for applications in factory automation, building systems, data centers, enterprise computing, and motor drives where efficient, stable power conversion is essential.

[Learn More]