TOP Contributors

  1. MIKROE (2652 codes)
  2. Alcides Ramos (351 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 (136613 times)
  2. FAT32 Library (69812 times)
  3. Network Ethernet Library (55881 times)
  4. USB Device Library (46217 times)
  5. Network WiFi Library (41858 times)
  6. FT800 Library (41073 times)
  7. GSM click (28942 times)
  8. PID Library (26401 times)
  9. mikroSDK (26312 times)
  10. microSD click (25327 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

LED Driver 6 click

Rating:

5

Author: MIKROE

Last Updated: 2019-03-22

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: LED Drivers

Downloaded: 3168 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.

No Abuse Reported
Api supported

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".

  • mikroSDK Library 2.0.0.0
  • 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 PIC
  • 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 PIC
  • 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 PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

LED Driver 6 click

LED Driver 6 click

Native view of the LED Driver 6 click board.

View full image
LED Driver 6 click

LED Driver 6 click

Front and back view of the LED Driver 6 click board.

View full image

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 voltage
  • uint32_t leddriver6_pwmInit(uint16_t freq) -
  • void leddriver6_pwmSetDuty(uint16_t duty) - PWM set duty cycle

Examples description

The application is composed of the three sections :

  • System Initialization - Initialization I2C module, sets INT pin as INPUT and PWM pin as OUTPUT
  • Application Initialization - Initialization driver init and pwm init for LED
  • Application Task - Waits for valid user input and executes functions based on set of valid commands

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 light
  • void _decrease( ) - Decrease LED's light
  • void _currentPGVoltage( ) - Reads and logs PG voltage

Other 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 clickUSB 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.

ALSO FROM THIS AUTHOR

Servo click

0

Servo click is a 16-channel PWM servo driver with the voltage sensing circuitry. It can be used to simultaneously control 16 servo motors, each with its own programmable PWM signal.

[Learn More]

SPI Isolator click

0

The click is designed to run on either 3.3V or 5V power supply. It communicates with the target microcontroller over SPI interface.

[Learn More]

Vibro Motor click

0

Vibro Motor click features a compact size Eccentric Rotating Mass (ERM) motor, labeled as C1026B002F. This type of motor is often used for haptic feedback on many small handheld devices, such as the cellphones, pagers, RFID scanners and similar devices. This motor contains a small eccentric weight on its rotor, so while rotating it also produces vibration effect. This kind of motors is sometimes referred to as coin motors, due to its shape.

[Learn More]