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]
Rating:
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.
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".
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:
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.