TOP Contributors

  1. MIKROE (2751 codes)
  2. Alcides Ramos (372 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139060 times)
  2. FAT32 Library (71592 times)
  3. Network Ethernet Library (56989 times)
  4. USB Device Library (47330 times)
  5. Network WiFi Library (43006 times)
  6. FT800 Library (42297 times)
  7. GSM click (29777 times)
  8. mikroSDK (27874 times)
  9. PID Library (26858 times)
  10. microSD click (26129 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

LCD mini Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.11

mikroSDK Library: 2.0.0.0

Category: LCD

Downloaded: 288 times

Not followed.

License: MIT license  

LCD mini Click displays 2x16 monochrome characters on an LMB162XFW LCD display. It features the MCP23S17 port expander and the MCP4161 digital potentiometer, both from Microchip.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "LCD mini Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "LCD mini Click" changes.

Do you want to report abuse regarding "LCD mini Click".

  • mikroSDK Library 1.0.0.0
  • Comments (0)

mikroSDK Library Blog


LCD mini Click

LCD mini Click displays 2x16 monochrome characters on an LMB162XFW LCD display. It features the MCP23S17 port expander and the MCP4161 digital potentiometer, both from Microchip.

lcdmini_click.png

Click Product page


Click library

  • Author : Stefan Ilic
  • Date : Dec 2021.
  • Type : SPI type

Software Support

We provide a library for the LCD mini 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 LCD mini Click driver.

Standard key functions :

  • lcdmini_cfg_setup Config Object Initialization function.

    void lcdmini_cfg_setup ( lcdmini_cfg_t *cfg );
  • lcdmini_init Initialization function.

    err_t lcdmini_init ( lcdmini_t *ctx, lcdmini_cfg_t *cfg );
  • lcdmini_default_cfg Click Default Configuration function.

    err_t lcdmini_default_cfg ( lcdmini_t *ctx );

Example key functions :

  • lcdmini_set_backlight Set backlight function.

    void lcdmini_set_backlight ( lcdmini_t *ctx, float backlight_value );
  • lcdmini_set_contrast Set contrast function.

    void lcdmini_set_contrast( lcdmini_t *ctx, uint8_t contrast_value );
  • lcdmini_display_text LCD mini display text.

    void lcdmini_display_text ( lcdmini_t *ctx, uint8_t row, uint8_t column, char *data_in );

Example Description

This is an example that demonstrates the use of the LCD mini Click board.

The demo application is composed of two sections :

Application Init

Initialization driver enables - SPI, performing hardware reset, default config, setting up the backlight, and entering text to be written.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    lcdmini_cfg_t lcdmini_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.
    lcdmini_cfg_setup( &lcdmini_cfg );
    LCDMINI_MAP_MIKROBUS( lcdmini_cfg, MIKROBUS_1 );
    if ( SPI_MASTER_ERROR == lcdmini_init( &lcdmini, &lcdmini_cfg ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }
    lcdmini_hw_reset( &lcdmini );
    log_printf( &logger, "---------------------\r\n" );
    log_printf( &logger, "   SPI LCD Config    \r\n" );
    log_printf( &logger, " Clear LCD display   \r\n" );
    log_printf( &logger, "     Cursor OFF      \r\n" );

    if ( LCDMINI_ERROR == lcdmini_default_cfg ( &lcdmini ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }
    log_printf( &logger, "---------------------\r\n" );
    log_printf( &logger, "  Setting Backlight  \r\n" );
    lcdmini_set_backlight ( &lcdmini, 1 );
    Delay_ms ( 100 );

    log_printf( &logger, "---------------------\r\n" );
    log_printf( &logger, "  Set Contrast: 200  \r\n" );
    lcdmini_set_contrast( &lcdmini, 200 );
    Delay_ms ( 100 );

    log_info( &logger, " Application Task " );

    log_printf( &logger, "---------------------\r\n" );
    log_printf( &logger, "     Display text    \r\n" );
    log_printf( &logger, "---------------------\r\n" );

    lcdmini_display_text ( &lcdmini, 1, 6, "Mikro E" );
    lcdmini_display_text ( &lcdmini, 2, 2, "LCD mini Click" ); 
    lcdmini_display_text ( &lcdmini, 3, 2, "LCD mini Click" ); 
    lcdmini_display_text ( &lcdmini, 4, 6, "Mikro E" );
    Delay_ms ( 500 );
}

Application Task

This example shows the written text, then the text is moved left, with changing between rows of the LCD screen.

void application_task ( void )
{
    Delay_ms ( 500 );
    lcdmini_send_cmd( &lcdmini, LCDMINI_SHIFT_LEFT ); 
}

Note

If the screen isn't initialized you may need to restart the device.

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

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

Temp-Log 5 Click

0

Temp-Log 5 Click is a temperature measuring Click board™ featuring the CAT34TS02, an accurate temperature sensor IC with integrated Serial Presence Detect EEPROM. Temperature Sensor measures and store temperatures at least 10 times in second. Temperature measurement results can be retrieved by the host MCU via I2C interface, and are compared to critical limits stored into internal registers. It also features programmable event output function and supports three modes.

[Learn More]

7x10 Y Click

0

7x10 Y Click is a LED dot matrix display Click, which can be used to display graphics or letters in a very simple and easy way. The Click board has two LED dot matrix modules with 7x5 stylish, round, dot-like LED elements. These displays produce clean and uniform patterns since the elements are optically isolated from each other and there is no light bleeding between the adjacent LED cells. Additionally, turn-on and turn-off times of the matrix cells are optimized for a clean and fluid display performance, with no flickering or lag.

[Learn More]

Temp-Hum 8 click

5

Temp&amp;Hum 8 click is based on a sensor from the popular SHT family, designed to measure temperature and humidity. This sensor family has already become an industry standard, providing proven reliability and stability while requiring a minimum number of components, making the development of applications cheaper and faster.

[Learn More]