TOP Contributors

  1. MIKROE (2782 codes)
  2. Alcides Ramos (377 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 (139595 times)
  2. FAT32 Library (72044 times)
  3. Network Ethernet Library (57270 times)
  4. USB Device Library (47636 times)
  5. Network WiFi Library (43232 times)
  6. FT800 Library (42570 times)
  7. GSM click (29933 times)
  8. mikroSDK (28313 times)
  9. PID Library (26939 times)
  10. microSD click (26311 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

AlphaNum G 2 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.6

mikroSDK Library: 2.0.0.0

Category: LED segment

Downloaded: 45 times

Not followed.

License: MIT license  

AlphaNum G 2 Click is a compact add-on board that represents an easy solution for adding numeric or hexadecimal displays to your application. This board features the LTP-3862, a dual-digit 16-segment alphanumeric green display from Lite-ON. It is a 0.3” (7.62mm) display with black face and white segments. The LED segments use common anodes, and besides segments, the decimal point (DP) dot is also available.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "AlphaNum G 2 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "AlphaNum G 2 Click" changes.

Do you want to report abuse regarding "AlphaNum G 2 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


AlphaNum G 2 Click

AlphaNum G 2 Click is a compact add-on board that represents an easy solution for adding numeric or hexadecimal displays to your application. This board features the LTP-3862, a dual-digit 16-segment alphanumeric green display from Lite-ON. It is a 0.3” (7.62mm) display with black face and white segments. The LED segments use common anodes, and besides segments, the decimal point (DP) dot is also available.

alphanumg2_click.png

Click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Sep 2023.
  • Type : SPI type

Software Support

We provide a library for the AlphaNum G 2 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 AlphaNum G 2 Click driver.

Standard key functions :

  • alphanumg2_cfg_setup Config Object Initialization function.

    void alphanumg2_cfg_setup ( alphanumg2_cfg_t *cfg );
  • alphanumg2_init Initialization function.

    err_t alphanumg2_init ( alphanumg2_t *ctx, alphanumg2_cfg_t *cfg );
  • alphanumg2_default_cfg Click Default Configuration function.

    err_t alphanumg2_default_cfg ( alphanumg2_t *ctx );

Example key functions :

  • alphanumg2_display_character AlphaNum G 2 display character function.

    err_t alphanumg2_display_character ( alphanumg2_t *ctx, uint8_t left_char, uint16_t left_brightness, uint8_t right_char, uint16_t right_brightness );
  • alphanumg2_set_led_output AlphaNum G 2 set LED output function.

    err_t alphanumg2_set_led_output ( alphanumg2_t *ctx, uint16_t seg_bit_mask, alphanumg2_dot_t seg_dot, uint16_t brightness );

Example Description

This example demonstrates the use of the AlphaNum G 2 Click board™ by writing and displaying the desired alphanumeric characters.

The demo application is composed of two sections :

Application Init

Initialization of SPI module and log UART. After driver initialization, the app executes a default configuration.

void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    alphanumg2_cfg_t alphanumg2_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 );
    log_info( &logger, " Application Init " );

    // Click initialization.
    alphanumg2_cfg_setup( &alphanumg2_cfg );
    ALPHANUMG2_MAP_MIKROBUS( alphanumg2_cfg, MIKROBUS_1 );
    if ( SPI_MASTER_ERROR == alphanumg2_init( &alphanumg2, &alphanumg2_cfg ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( ALPHANUMG2_ERROR == alphanumg2_default_cfg ( &alphanumg2 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    log_info( &logger, " Application Task " );
    log_printf( &logger, "------------------------\r\n" );
    Delay_ms ( 100 );
}

Application Task

The demo application displays digits from '0' to '9', symbols: colon, semicolon, less-than, equals-to, greater-than, question mark, at sign and capital alphabet letters, on both alphanumeric segments of the Click. Results are being sent to the UART Terminal, where you can track their changes.

void application_task ( void )
{
    log_printf( &logger, " %c %c\r\n", character, character + 1 );
    if ( ALPHANUMG2_OK == alphanumg2_display_character( &alphanumg2, 
                                                        character, ALPHANUMG2_BRIGHTNESS_MAX, 
                                                        character + 1, ALPHANUMG2_BRIGHTNESS_MAX ) )
    {
        character++;
        if ( ASCII_CHARACTER_UPPERCASE_Z <= character )
        {
            character = ASCII_CHARACTER_DIGIT_0;
            log_printf( &logger, "------------------------\r\n" );
            Delay_ms ( 1000 );
        }
    }
}

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

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. UART terminal is available in all MikroElektronika compilers.


ALSO FROM THIS AUTHOR

Humidity Click

0

Humidity Click is a compact add-on board used to sense the amount of water vapor in the air. This board features the HIH-5030, an analog output relative humidity sensor from Honeywell Sensing and Productivity Solutions. The HIH-5031 is a covered, condensation-resistant, integrated circuit humidity sensor that is factory-fitted with a hydrophobic filter allowing usage in many condensing environments.

[Learn More]

Charger click

2

Charger click carries both a battery charger controller and a battery charge monitor. The smaller chip is MCP73831, a single-cell Li-Ion and Li-Polymer charge management controller. The larger IC is DS2438, a smart battery monitor. The monitor communicates with the MCU through a 1-Wire interface. The click is designed to use a 5V power supply.

[Learn More]

DTMF Click

0

DTMF Click is a compact add-on board designed for projects that demand reliable telephony interactions. This board features the CMX865A, a DTMF Codec/FSK Combo multi-standard modem from CML Micro. The CMX865A excels in encoding and decoding DTMF signals, alongside supporting FSK data transmission compatible with V.23, V.21, Bell 103, and Bell 202 standards, making it versatile for various telephony applications. It's particularly adept at enabling dual-mode operations for transmitting and receiving data, ensuring high fidelity in signal processing and resistance to voice falsing. Ideal for security systems, automated response services, and IoT devices requiring telephonic interaction, DTMF Click provides a solution for developers looking to incorporate reliable telecommunication capabilities.

[Learn More]