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 :
lcdmono_cfg_setup
Config Object Initialization function.
void lcdmono_cfg_setup(lcdmono_cfg_t *cfg)
Config Object Initialization function.
Click configuration structure definition.
Definition lcdmono.h:184
lcdmono_init
Initialization function.
err_t lcdmono_init(lcdmono_t *ctx, lcdmono_cfg_t *cfg)
Initialization function.
Click ctx object definition.
Definition lcdmono.h:163
Example key functions :
lcdmono_draw_text
Draw text on the screen
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_power
Display Power State
void lcdmono_display_power(lcdmono_t *ctx, uint8_t ctrl)
Display Power State.
lcdmono_display_reset
Reset procedure
void lcdmono_display_reset(lcdmono_t *ctx)
Reset procedure.
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 ...
{
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}
#define LCDMONO_COLOR_WHITE
Definition lcdmono.h:96
#define LCDMONO_MAP_MIKROBUS(cfg, mikrobus)
Definition lcdmono.h:67
void lcdmono_set_font(lcdmono_t *ctx, lcdmono_font_t *dev_lcd_font)
Set font.
void lcdmono_clear(lcdmono_t *ctx)
Clear display.
#define LCDMONO_REFRESH_DISPLAY_END
Definition lcdmono.h:104
#define LCDMONO_CHECK_NEW_TEXT
Definition lcdmono.h:105
#define LCDMONO_REFRESH_TEXT_BUFFER
Definition lcdmono.h:106
const uint8_t lcdmono_font_tahoma_16[4617]
Definition lcdmono_font.h:4
const uint8_t lcdmono_font_tahoma_8[1679]
Definition lcdmono_font.h:209
void application_init(void)
Definition main.c:57
uint8_t *__generic_ptr this_font
Definition lcdmono.h:135
uint8_t bg_color
Definition lcdmono.h:155
uint16_t start_cord_y
Definition lcdmono.h:154
uint8_t len
Definition lcdmono.h:152
uint16_t start_cord_x
Definition lcdmono.h:153
Application Task
Drawing an image to the display every 3 second.
{
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}
void lcdmono_draw_frame(lcdmono_t *ctx, uint8_t *__generic_ptr frame_data)
Displays draw frame.
const uint8_t demo_img_mikroe_light[2048]
Definition lcdmono_image.h:400
const uint8_t demo_img_mikroe[2048]
Definition lcdmono_image.h:268
const uint8_t demo_img_logo_light[2048]
Definition lcdmono_image.h:136
const uint8_t demo_img_logo[2048]
Definition lcdmono_image.h:4
void application_task(void)
Definition main.c:104
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:
- Output file type : C array
- Scan Mode : Horisontal scan
- Bits Pixel : monochrome
- Max width and height : 128x128
- Check only MSB first
- 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.