TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 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 (137111 times)
  2. FAT32 Library (70238 times)
  3. Network Ethernet Library (56129 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42080 times)
  6. FT800 Library (41390 times)
  7. GSM click (29118 times)
  8. mikroSDK (26564 times)
  9. PID Library (26503 times)
  10. microSD click (25487 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

7-SEG RGB click

Rating:

0

Author: MIKROE

Last Updated: 2019-05-23

Package Version: 1.0.0.1

mikroSDK Library: 1.0.0.0

Category: LED segment

Downloaded: 2703 times

Not followed.

License: MIT license  

7-SEG RGB click carries a full color single 7 segment digit display. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target microcontroller over the CS, and PWM pin on the mikroBUS line.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "7-SEG RGB click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "7-SEG RGB click" changes.

Do you want to report abuse regarding "7-SEG RGB click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)

mikroSDK Library Blog

7-SEG RGB

7-SEG RGB

Front and Back view of the 7-SEG RGB board.

View full image

Library Description

The library covers all the necessary functions to control 7-SEG RGB click board.

Key functions:

  • void c7segrgb_gpioDriverInit(T_PS2_P gpioObj) - Function initializes GPIO driver for the desired MIKROBUS1.

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes GPIO, LOG structures.
  • Application Initialization -  Initialization driver enables - GPIO.
  • Application Task - (code snippet) This is an example which demonstrates the use of 7-SEG RGB Click board. This simple example shows all ten numbers in different colors on 7-SEG RGB click.
void applicationTask() 
{
    uint8_t cnt_i;
    uint8_t cnt_j;
    
    for ( cnt_i = 0; cnt_i < 10; cnt_i++ )
    {
        for ( cnt_j = 10; cnt_j > 0; cnt_j-- )
        {
            c7segrgb_setSevenSegment( _CHARACTER_TABLE[ cnt_i ], 4 * cnt_i, 4 * cnt_j, cnt_i * cnt_j );
            Delay_100ms();
        }
    }

    c7segrgb_setSevenSegment( _C7SEGRGB_POINT, 10, 10, 10 );
    Delay_1sec();

    c7segrgb_setSevenSegment( _C7SEGRGB_ZERO, 40, 40, 40 );
    Delay_1sec();

    c7segrgb_setSevenSegment( _C7SEGRGB_ONE, 40, 0, 0 );
    Delay_1sec();

    c7segrgb_setSevenSegment( _C7SEGRGB_TWO, 0, 40, 0 );
    Delay_1sec();

    c7segrgb_setSevenSegment( _C7SEGRGB_THREE, 0, 0, 40 );
    Delay_1sec();

    c7segrgb_setSevenSegment( _C7SEGRGB_FOUR, 40, 0, 40 );
    Delay_1sec();

    c7segrgb_setSevenSegment( _C7SEGRGB_FIVE, 0, 40, 40 );
    Delay_1sec();

    c7segrgb_setSevenSegment( _C7SEGRGB_SIX, 40, 40, 0 );
    Delay_1sec();

    c7segrgb_setSevenSegment( _C7SEGRGB_SEVEN, 20, 30, 40 );
    Delay_1sec();

    c7segrgb_setSevenSegment( _C7SEGRGB_EIGHT, 40, 15, 31 );
    Delay_1sec();

    c7segrgb_setSevenSegment( _C7SEGRGB_NINE, 20, 10, 30 );
    Delay_1sec();

    RGB_CONTROL_BIT = 0;
}        

Additional Functions :

  • void c7segrgb_logicOne() - Generic logic one function.
  • void c7segrgb_logicZero() - Generic logic zero function.
  • void c7segrgb_setColor( uint8_t _green, uint8_t _red, uint8_t _blue ) - Set the color of the  LSB segment of the display function.
  • void c7segrgb_setSevenSegment( uint8_t  _character, uint8_t _greenBrightness, uint8_t _redBrightness, uint8_t _blueBrightness ) - Set whole character and color function.

Other mikroE Libraries used in the example:

  • One_Wire
  • UART​
  • Conversion

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

Vibra Sense 2 click

0

Vibra Sense 2 Click is a compact add-on board that contains a piezo sensor suitable for vibration measurements. This board features the LDT0-028K, a flexible 28 μm thick piezoelectric PVDF polymer film with screen-printed silver ink electrodes, laminated to a 0.125 mm polyester substrate, and fitted with two crimped contacts from TE Connectivity.

[Learn More]

NFC 4 click

0

NFC 4 Click is a compact add-on board that contains an NFC transceiver for contactless communication. This board features the ST25R3916, a multi-purpose NFC transceiver supporting passive peer-to-peer functionality and NFC card-emulation mode, as well as NFC reader operation from STMicroelectronics. It features high RF output power to directly drive an antenna etched on the PCB, alongside its tuning circuit, at high efficiency.

[Learn More]

USB-C Sink 2 click

0

USB-C Sink 2 Click is a compact add-on board with a standalone autonomous USB power delivery controller. This board features the AP33772, a high-performance USB PD sink controller from Diodes Incorporated. It supports dead battery mode to allow a system to be powered from an external source directly, establishes a valid source-to-sink connection, and negotiates a USB power delivery (PD) contract with a PD-capable source device. It also supports a flexible PD3.0 and PPS for applications that require direct voltage and current requests, with fine-tuning capabilities.

[Learn More]