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: 2019-03-22
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: LED Drivers
Downloaded: 3693 times
Not followed.
License: MIT license
LED driver 6 Click is a high brightness LED or LED strip driver, designed to be used in tunable Smart Connected Lighting (SCL) applications. It is based on the AL1781, a single-channel PWM dimmable linear LED driver.
Do you want to subscribe in order to receive notifications regarding "LED Driver 6 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "LED Driver 6 click" changes.
Do you want to report abuse regarding "LED Driver 6 click".
Library Description
Library provides full control of the LEDs illumination. PWM functions are used to control the brightness temperature of the LEDs. The library also offers reading the current PG voltage score that serves to regulate lights and alerts.
Key functions:
uint16_t leddriver6_getPGVoltage()
- Reads PG output voltageuint32_t leddriver6_pwmInit(uint16_t freq)
-void leddriver6_pwmSetDuty(uint16_t duty)
- PWM set duty cycleExamples description
The application is composed of the three sections :
Commands : '+' - Increase LED light '-' - Decrease LED light 'v' - Display current PG voltage
void applicationTask()
{
uint8_t dataReady_;
char receivedData_;
dataReady_ = UART_Rdy_Ptr( );
if (dataReady_ != 0)
{
receivedData_ = UART_Rd_Ptr( );
switch (receivedData_)
{
case '+' :
{
_increase();
break;
}
case '-' :
{
_decrease();
break;
}
case 'v' :
{
_currentPGVoltage();
break;
}
}
}
}
Additional Functions :
void _increase( )
- Increase LED's lightvoid _decrease( )
- Decrease LED's lightvoid _currentPGVoltage( )
- Reads and logs PG voltageOther mikroE Libraries used in the example:
I2C
PWM
UART
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.