TOP Contributors

  1. MIKROE (2693 codes)
  2. Alcides Ramos (362 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 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 (137949 times)
  2. FAT32 Library (70759 times)
  3. Network Ethernet Library (56444 times)
  4. USB Device Library (46827 times)
  5. Network WiFi Library (42587 times)
  6. FT800 Library (41785 times)
  7. GSM click (29468 times)
  8. mikroSDK (27020 times)
  9. PID Library (26661 times)
  10. microSD click (25797 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: 7413 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

Solar Energy click

4

There are many battery chargers and solar energy harvesters out there already, but the Solar energy click has the unique feature - it encompasses both of these devices in a single package.

[Learn More]

BLE 12 click

0

BLE 12 Click is a compact add-on board that provides BT/BLE connectivity for any embedded application. This board features the BM832A, a powerful and highly flexible, ultra low power Bluetooth Low Energy (BLE) module from Fanstel. Based on the Nordic nRF52 SoC, the BM832A supports Bluetooth 5.0 Low-Energy (BLE) connectivity while delivering RF range and performance, debugging and enhanced security features, and low power consumption. It also comes with an ARM Cortex™ M4(F) MCU up to 192kB flash and 24kB RAM, embedded 2.4GHz multi-protocol transceiver, and an integrated PCB trace antenna. This Click board™ is suitable for low-cost Bluetooth low energy applications such as building automation and sensor networks, portable medical, connected home, and more.

[Learn More]

Mikromedia 7 Capacitive FPI

0

This project contains example for testing modules on Mikromedia 7 Capacitive FPI.

[Learn More]