lcdmono  2.0.0.0
Main Page

LCD Mono click

LCD Mono Click is a Click boardâ„¢ that uses the LS013B7DH03 LCD display from Sharp which combined with the EFM32, from Silicon Labs, and its energy saving capabilities creates a powerful display application.

click Product page


Click library

  • Author : MikroE Team
  • Date : Dec 2019.
  • Type : SPI type

Software Support

We provide a library for the LcdMono 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.

Library Description

This library contains API for LcdMono Click driver.

Standard key functions :

Example key functions :

Examples Description

This application sets text on lcd displey.

The demo application is composed of two sections :

Application Init

Driver initialization - Starting LCD Mono display. Print text to the display by changing font size ...

void application_init ( void )
{
lcdmono_font_t font_cfg;
// Click initialization.
LCDMONO_MAP_MIKROBUS( cfg, MIKROBUS_1 );
lcdmono_init( &lcdmono, &cfg );
lcdmono_display_reset( &lcdmono );
lcdmono_clear( &lcdmono );
// Background color for all text
// Display text
lcdmono_set_font( &lcdmono, &font_cfg );
tx_set.len = 3;
tx_set.start_cord_x = 25;
tx_set.start_cord_y = 15;
lcdmono_draw_text( &lcdmono, demo_text_lcd, &tx_set, LCDMONO_REFRESH_TEXT_BUFFER |
lcdmono_set_font( &lcdmono, &font_cfg );
tx_set.len = 4;
tx_set.start_cord_x = 60;
tx_set.start_cord_y = 50;
lcdmono_draw_text( &lcdmono, demo_text_mono, &tx_set, LCDMONO_CHECK_NEW_TEXT );
tx_set.len = 9;
tx_set.start_cord_x = 10;
tx_set.start_cord_y = 80;
lcdmono_draw_text( &lcdmono, demo_text_128x128px, &tx_set, LCDMONO_REFRESH_DISPLAY_END );
Delay_ms( 5000 );
lcdmono_clear( &lcdmono );
}

Application Task

Drawing an image to the display every 3 second.

void application_task ( void )
{
Delay_ms( 3000 );
Delay_ms( 3000 );
Delay_ms( 3000 );
Delay_ms( 3000 );
}

Note

  • Create Image: Save the image in resolution of 128x128 px with the extension (monochrome bmp) ... Upload the image to Image2Lcd program Set parameters to:
    1. Output file type : C array
    2. Scan Mode : Horisontal scan
    3. Bits Pixel : monochrome
    4. Max width and height : 128x128
    5. Check only MSB first
    6. Check Reverse color and adjust Normal type The image to be generated should contain about 2048 bytes ... Insert the image into the file lcdmono_image.h
  • Create Font: Close existing project, open a new VTFT project Add label and adjust text font Generate source code Copy the font from resource.c file to this project in file lcdmono_font.h

The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.

Other mikroE Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.LcdMono

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.


LCDMONO_REFRESH_DISPLAY_END
#define LCDMONO_REFRESH_DISPLAY_END
Definition: lcdmono.h:100
lcdmono_init
err_t lcdmono_init(lcdmono_t *ctx, lcdmono_cfg_t *cfg)
Initialization function.
LCDMONO_REFRESH_TEXT_BUFFER
#define LCDMONO_REFRESH_TEXT_BUFFER
Definition: lcdmono.h:102
lcdmono_text_settings_t::len
uint8_t len
Definition: lcdmono.h:148
lcdmono_text_settings_t
Definition: lcdmono.h:146
lcdmono_t
Click ctx object definition.
Definition: lcdmono.h:159
demo_img_mikroe
const uint8_t demo_img_mikroe[2048]
Definition: lcdmono_image.h:268
lcdmono_text_settings_t::start_cord_x
uint16_t start_cord_x
Definition: lcdmono.h:149
lcdmono_text_settings_t::bg_color
uint8_t bg_color
Definition: lcdmono.h:151
application_task
void application_task(void)
Definition: main.c:100
demo_img_logo_light
const uint8_t demo_img_logo_light[2048]
Definition: lcdmono_image.h:136
lcdmono_font_tahoma_16
const uint8_t lcdmono_font_tahoma_16[4617]
Definition: lcdmono_font.h:4
demo_img_logo
const uint8_t demo_img_logo[2048]
Definition: lcdmono_image.h:4
lcdmono_cfg_setup
void lcdmono_cfg_setup(lcdmono_cfg_t *cfg)
Config Object Initialization function.
lcdmono_cfg_t
Click configuration structure definition.
Definition: lcdmono.h:180
lcdmono_display_power
void lcdmono_display_power(lcdmono_t *ctx, uint8_t ctrl)
Display Power State.
lcdmono_draw_text
void lcdmono_draw_text(lcdmono_t *ctx, uint8_t *__generic_ptr text_buf, lcdmono_text_settings_t *tx_set, uint8_t end_mode)
Draw text on the screen.
lcdmono_display_reset
void lcdmono_display_reset(lcdmono_t *ctx)
Reset procedure.
LCDMONO_MAP_MIKROBUS
#define LCDMONO_MAP_MIKROBUS(cfg, mikrobus)
Definition: lcdmono.h:63
lcdmono_font_t
Definition: lcdmono.h:130
lcdmono_set_font
void lcdmono_set_font(lcdmono_t *ctx, lcdmono_font_t *dev_lcd_font)
Set font.
lcdmono_font_tahoma_8
const uint8_t lcdmono_font_tahoma_8[1679]
Definition: lcdmono_font.h:209
lcdmono_font_t::this_font
uint8_t *__generic_ptr this_font
Definition: lcdmono.h:131
LCDMONO_COLOR_WHITE
#define LCDMONO_COLOR_WHITE
Definition: lcdmono.h:92
demo_img_mikroe_light
const uint8_t demo_img_mikroe_light[2048]
Definition: lcdmono_image.h:400
application_init
void application_init(void)
Definition: main.c:57
LCDMONO_CHECK_NEW_TEXT
#define LCDMONO_CHECK_NEW_TEXT
Definition: lcdmono.h:101
lcdmono_draw_frame
void lcdmono_draw_frame(lcdmono_t *ctx, uint8_t *__generic_ptr frame_data)
Displays draw frame.
lcdmono_text_settings_t::start_cord_y
uint16_t start_cord_y
Definition: lcdmono.h:150
lcdmono_clear
void lcdmono_clear(lcdmono_t *ctx)
Clear display.