TOP Contributors

  1. MIKROE (2656 codes)
  2. Alcides Ramos (353 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 (136797 times)
  2. FAT32 Library (69982 times)
  3. Network Ethernet Library (55951 times)
  4. USB Device Library (46274 times)
  5. Network WiFi Library (41892 times)
  6. FT800 Library (41186 times)
  7. GSM click (28989 times)
  8. PID Library (26420 times)
  9. mikroSDK (26375 times)
  10. microSD click (25382 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: 7023 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

RTC 3 click

5

RTC3 click carries BQ32000, a real time clock/calendar with an integrated trickle charge circuit for automatic switchover to a backup power supply (the circuit maintains the backup charge with an onboard super capacitor). The clock frequency is derived from an onboard 32.768KHz oscillator.

[Learn More]

9DOF click

7

9DOF click carries ST’s LSM9DS1 inertial measurement module that combines a 3D accelerometer, a 3D gyroscope and a 3D magnetometer into a single device outputting so called nine degrees of freedom data (3-axis acceleration, angular velocity and heading), in 16-bit resolution.

[Learn More]

Touchpad 3 click

0

Touchpad 3 Click is a compact add-on board that allows users to easily integrate projected capacitive touch into their applications. This board features the MTCH6301, a turnkey capacitive touch controller that makes it easy for users to use popular multitouch and gesture interfaces from Microchip. This controller’s sophisticated combination of Self and Mutual capacitive scanning for XY touchscreens and touchpads enables several features, including single and dual-touch drawing, the reporting of 11 single-finger gestures, and the detection of up to 10 touches. This Click board™ is suitable for human-machine interfaces, keypad or scrolling functions, single-finger gesture-based interfaces, and more.

[Learn More]