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]
Rating:
Author: MIKROE
Last Updated: 2024-10-31
Package Version: 2.1.0.16
mikroSDK Library: 2.0.0.0
Category: LED segment
Downloaded: 200 times
Not followed.
License: MIT license
UT-M 7-SEG R Click carries two SMD ultra thin LED 7-SEG displays and the MAX6969 constant-current LED driver from Maxim Integrated. The Click is designed to run on either 3.3V or 5V power supply. It communicates with the target microcontroller over SPI interface.
Do you want to subscribe in order to receive notifications regarding "UT-M 7-SEG R Click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "UT-M 7-SEG R Click" changes.
Do you want to report abuse regarding "UT-M 7-SEG R Click".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
4508_ut_m_7_seg_r_cli.zip [529.31KB] | mikroC AI for ARM GCC for ARM Clang for ARM mikroC AI for PIC mikroC AI for PIC32 XC32 GCC for RISC-V Clang for RISC-V mikroC AI for AVR mikroC AI for dsPIC XC16 |
|
UT-M 7-SEG R Click carries two SMD ultra thin LED 7-SEG displays and the MAX6969 constant-current LED driver from Maxim Integrated. The Click is designed to run on either 3.3V or 5V power supply. It communicates with the target microcontroller over SPI interface.
We provide a library for the UT-M7-SEGR 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.
This library contains API for UT-M7-SEGR Click driver.
utm7segr_cfg_setup
Config Object Initialization function.
void utm7segr_cfg_setup ( utm7segr_cfg_t *cfg );
utm7segr_init
Initialization function.
UTM7SEGR_RETVAL utm7segr_init ( utm7segr_t *ctx, utm7segr_cfg_t *cfg );
utm7segr_default_cfg
Click Default Configuration function.
void utm7segr_default_cfg ( utm7segr_t *ctx );
utm7segr_generic_write
This function writes a desired number of data bytes starting from the selected register by using SPI serial interface.
err_t utm7segr_generic_write ( utm7segr_t *ctx, uint8_t *data_in );
utm7segr_display_state
This function turns display on and off.
void utm7segr_display_state ( utm7segr_t *ctx, uint8_t state ) ;
utm7segr_display_number
This function is used to show the number on the display.
err_t utm7segr_display_number ( utm7segr_t *ctx, uint8_t number, uint8_t dot_pos );
The demo application shows basic usage of the UT-M 7-SEG display.
The demo application is composed of two sections :
Configuring clicks and log objects. Settings the Click in the default configuration.
void application_init ( void ) {
log_cfg_t log_cfg; /**< Logger config object. */
utm7segr_cfg_t utm7segr_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.
utm7segr_cfg_setup( &utm7segr_cfg );
UTM7SEGR_MAP_MIKROBUS( utm7segr_cfg, MIKROBUS_1 );
err_t init_flag = utm7segr_init( &utm7segr, &utm7segr_cfg );
if ( init_flag == SPI_MASTER_ERROR ) {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
for ( ; ; );
}
utm7segr_default_cfg ( &utm7segr );
log_info( &logger, " Application Task " );
}
Draws numbers from 0 to 99 on the screen.
void application_task ( void ) {
log_info( &logger, "---- Number counter ----" );
for ( uint8_t cnt = 0; cnt < 100; cnt++ ) {
utm7segr_display_number( &utm7segr, cnt, UTM7SEGR_DOT_LEFT );
Delay_ms ( 500 );
}
}
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:
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.