TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139563 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57254 times)
  4. USB Device Library (47615 times)
  5. Network WiFi Library (43219 times)
  6. FT800 Library (42556 times)
  7. GSM click (29930 times)
  8. mikroSDK (28292 times)
  9. PID Library (26930 times)
  10. microSD click (26309 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

UT-S 7-SEG R Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.15

mikroSDK Library: 2.0.0.0

Category: LED segment

Downloaded: 174 times

Not followed.

License: MIT license  

7-segment LED display is the most commonly used type of display to represent changing numerical values. The principle is very simple - seven LED segments are positioned in a certain shape and by turning specific segments on or off, the shape that resembles a specific number is lit. This method of displaying numbers was first used in the beginning of the 20th century, but after the invention of the LED in ‘70, it is the most commonly used method to display numbers. It utilizes a fairly simple and cheap design with the numbers clearly visible.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "UT-S 7-SEG R Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "UT-S 7-SEG R Click" changes.

Do you want to report abuse regarding "UT-S 7-SEG R Click".

  • mikroSDK Library 1.0.0.0
  • Comments (0)

mikroSDK Library Blog


UT-S 7-SEG R Click

7-segment LED display is the most commonly used type of display to represent changing numerical values. The principle is very simple - seven LED segments are positioned in a certain shape and by turning specific segments on or off, the shape that resembles a specific number is lit. This method of displaying numbers was first used in the beginning of the 20th century, but after the invention of the LED in ‘70, it is the most commonly used method to display numbers. It utilizes a fairly simple and cheap design with the numbers clearly visible.

uts7segr_click.png

Click Product page


Click library

  • Author : Jelena Milosavljevic
  • Date : Jun 2021.
  • Type : SPI type

Software Support

We provide a library for the UT-S7-SEGR Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for UT-S7-SEGR Click driver.

Standard key functions :

  • uts7segr_cfg_setup Config Object Initialization function.

    void uts7segr_cfg_setup ( uts7segr_cfg_t *cfg );
  • uts7segr_init Initialization function.

    UTS7SEGR_RETVAL uts7segr_init ( uts7segr_t *ctx, uts7segr_cfg_t *cfg );
  • uts7segr_default_cfg Click Default Configuration function.

    void uts7segr_default_cfg ( uts7segr_t *ctx );

Example key functions :

  • uts7segr_generic_write This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.

    err_t uts7segr_generic_write ( uts7segr_t *ctx, uint8_t *data_in );
  • uts7segr_display_state This function display state.

    void uts7segr_display_state ( uts7segr_t *ctx, uint8_t state );
  • uts7segr_display_number This function displays number on dispaly matrix.

    err_t uts7segr_display_number ( uts7segr_t *ctx, uint8_t number, uint8_t dot_pos );

Example Description

The demo application shows basic usage of the UT 7 SEG display.

The demo application is composed of two sections :

Application Init

Configuring clicks and log objects. Settings the Click in the default configuration.


void application_init ( void ) {
    log_cfg_t log_cfg;            /**< Logger config object. */
    uts7segr_cfg_t uts7segr_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    Delay_ms ( 100 );
    log_info( &logger, " Application Init " );
    // Click initialization.

    uts7segr_cfg_setup( &uts7segr_cfg );
    UTS7SEGR_MAP_MIKROBUS( uts7segr_cfg, MIKROBUS_1 );
    err_t init_flag  = uts7segr_init( &uts7segr, &uts7segr_cfg );
    if ( init_flag == SPI_MASTER_ERROR ) {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }

    uts7segr_default_cfg ( &uts7segr );
    log_info( &logger, " Application Task " );
}

Application Task

Draws numbers from 0 to 99 on the screen.


void application_task ( void ) { 
    log_info( &logger, "---- Number counter ----" );

    for ( uint8_t cnt = 0; cnt < 100; cnt++ ) {
        uts7segr_display_number( &uts7segr, cnt, UTS7SEGR_DOT_LEFT );
        Delay_ms ( 500 );
    }
}

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.UT-S7-SEGR

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.


ALSO FROM THIS AUTHOR

GSM 4 click

4

GSM 4 click is a mikroBUS add-on board that features the U-Blox SARA-G3 series 2.5G GSM/GPRS cellular quad-band module. With the click you can send and receives calls, SMS, and data. It can also be used as a standalone device tied to a PC through the onboard USB port - no development environment is needed.

[Learn More]

DMX click

5

DMX Click is a device used to establish communication between the MCU and equipment that uses the DMX512-A communication protocol.

[Learn More]

GSM 3 click

5

GSM3 click carries SIM800H, a quad-band (850/900/1800/1900MHz) GSM/GPRS module that transmits voice, sms and data information. Utilizing the module’s full potential, GSM3 click also has an audio input/output connection pad (for a microphone and earphones, which can also be used as an FM antenna).

[Learn More]