16x12 click
16x12 G click carries a 16x12 LED display and the IS31FL3733 matrix driver. The click is designed to run on either 3.3V or 5V power supply.
click Product page
Click library
- Author : MikroE Team
- Date : Nov 2019.
- Type : I2C type
Software Support
We provide a library for the 16x12 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 16x12 Click driver.
Standard key functions :
- Config Object Initialization function.
void c16x12_cfg_setup ( c16x12_cfg_t *cfg );
- Initialization function.
C16X12_RETVAL c16x12_init ( c16x12_t *ctx, c16x12_cfg_t *cfg );
- Click Default Configuration function.
void c16x12_default_cfg ( c16x12_t *ctx );
Example key functions :
- Functions for display Image
void c16x12g_display_image ( c16x12_t *ctx, uint16_t *pImage );
- Functions for display one Byte
void c16x12g_display_byte ( c16x12_t *ctx, char ch );
- Functions for display text with scroll
void c16x12g_display_text ( c16x12_t *ctx, char *p_text, uint8_t n_char, uint8_t speed );
Examples Description
This application draw object with led diodes.
The demo application is composed of two sections :
Application Init
Initialization default device configuration, sets LED mode, configuration ABM and display one character.
{
log_cfg_t log_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
Delay_ms ( 1000 );
c16x12g_startABM( &c16x12 );
c16x12g_displayByte( &c16x12, 'G' );
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 );
c16x12g_startABM( &c16x12 );
}
#define C16X12G_ABM_LOOP_FOREVER
Definition c16x12.h:141
#define C16X12G_ABM_LOOP_BEGIN_T1
Definition c16x12.h:258
#define C16X12G_ABM_LOOP_END_T3
Definition c16x12.h:268
#define C16X12G_LED_MODE_ABM1
Definition c16x12.h:189
#define C16X12_MAP_MIKROBUS(cfg, mikrobus)
Definition c16x12.h:66
#define C16X12G_ABM_NUM_1
Definition c16x12.h:276
void c16x12_default_cfg(c16x12_t *ctx)
Click Default Configuration function.
void c16x12g_set_leds_mode(c16x12_t *ctx, uint8_t mode)
Functions for sets LEDs mode.
void c16x12g_set_global_current_control(c16x12_t *ctx, uint8_t gcc)
Functions for sets global current for all leds.
void c16x12g_device_reset(c16x12_t *ctx)
Functions for device reset.
C16X12_RETVAL c16x12_init(c16x12_t *ctx, c16x12_cfg_t *cfg)
Initialization function.
void c16x12_cfg_setup(c16x12_cfg_t *cfg)
Config Object Initialization function.
#define C16X12G_ABM_T1_210MS
Definition c16x12.h:198
#define C16X12G_ABM_T1_840MS
Definition c16x12.h:200
#define C16X12G_ABM_T2_0MS
Definition c16x12.h:212
#define C16X12G_ABM_T2_840MS
Definition c16x12.h:215
#define C16X12G_ABM_T3_210MS
Definition c16x12.h:227
#define C16X12G_ABM_T3_840MS
Definition c16x12.h:229
#define C16X12G_ABM_T4_0MS
Definition c16x12.h:241
#define C16X12G_ABM_T4_840MS
Definition c16x12.h:244
void application_init(void)
Definition main.c:48
Click configuration structure definition.
Definition c16x12.h:317
Application Task
Clear display, display one by one leds, display one character, display image and display text with scroll
void applicationTask ( void )
{
uint8_t cnt = 0;
for ( cnt = 1; cnt <= 12; cnt++ )
{
Delay_ms ( 200 );
}
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 c16x12g_display_byte(c16x12_t *ctx, char ch)
Functions for display one Byte.
void c16x12g_set_led(c16x12_t *ctx, uint8_t x_pos, uint8_t y_pos, uint8_t state, uint8_t c_end)
Functions for sets LEDs state.
void c16x12g_display_image(c16x12_t *ctx, uint16_t *p_image)
Functions for display Image.
void c16x12g_clear_display(c16x12_t *ctx)
Functions for clear display.
void c16x12g_display_text(c16x12_t *ctx, char *p_text, uint8_t n_char, uint8_t speed)
Functions for display text with scroll.
#define C16X12G_STOP_SETTINGS
Definition c16x12.h:157
#define C16X12G_LED_STATE_ON
Definition c16x12.h:149
uint16_t demo_image_light[12]
Definition main.c:38
uint16_t demo_image_dark[12]
Definition main.c:40
char demo_text[7]
Definition main.c:37
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.16x12
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.