初学者
10 分钟

用SLO2016和STM32L496AG提升您的信息传递水平

四位数字的辉煌触手可及!

4Dot-Matrix R Click with Discovery kit with STM32L496AG MCU

已发布 7月 22, 2025

点击板

4Dot-Matrix R Click

开发板

Discovery kit with STM32L496AG MCU

编译器

NECTO Studio

微控制器单元

STM32L496AG

走进未来,体验我们的尖端显示解决方案,通过我们的四位红色点阵显示模块逐位展示信息。

A

A

硬件概览

它是如何工作的?

4Dot-Matrix R Click基于来自ams OSRAM的SLO2016,带有集成存储器、ASCII解码器和驱动器部分的4位5x7点阵字母数字智能显示器®设备。这使得模块具有高度的自主性,在应用程序中不需要任何类型的显示刷新或复用。字符选择简单,通过并行接口异步完成。七个数据引脚(D0到D6)上的逻辑状态被翻译成七个字符选择位,另外两个引脚用于选择字符的显示位置(A0到A1)。总共有四个可能的位置选择,从最右边的位置0开始。显示模块包含具有128个ASCII字符的内部存储器。它还包含一些特殊字符,包括英语、德语、意大利语、瑞典语、丹麦语和挪威语的字母,以及其他一些特殊字符和符号。内部字符存储器无法更改,它是只读的。一旦选择并在特定位置显示的字符将保持亮,只要有电源供应,或者除非它被消隐

或更改。模块本身在5V下运行。为了提供最佳性能,每个模块都经过测试并经过老化程序。制造商对每个像素都采取特别注意,确保显示均匀明亮。显示器坚固耐用,可以承受显著的静电放电(ESD)。然而,在使用该设备时应该注意,因为并非所有组件都能抗静电放电。并行数据接口与Microchip的MCP23017配对,它是一款带有I2C接口的16位I/O扩展器。该设备允许仅使用两个引脚(I2S时钟和I2S数据)来控制所有七个数据位和两个位置位。扩展器的B端口上的引脚用作字符选择引脚,而扩展器的A端口的两个引脚用作位置数据引脚。其余的控制线路,例如#BL(显示消隐)、#WR(写使能)和#CLR(存储器清除)被路由到mikroBUS™ PWM、CS和RST引脚。将PWM信号应用到显示模块的#BL引脚将允许根据输入信号的占

空比调节显示的亮度。要完全调暗显示,需要将BL引脚拉低至低逻辑电平。也可以通过显示空白字符来调暗显示。在使用PWM调光功能时,建议的频率为2.5 kHz及以上。端口扩展器的I2C地址可以通过切换三个板载SMD跳线(标有ADDR SEL)来选择。这些跳线定义了I2C地址的最低有效位,因此可以在同一I2C总线上使用多个设备。除了I2C地址之外,还可以通过切换标有LOGIC SEL的SMD跳线来选择通信电压级别。为此,采用了四级移位IC,其中三个标记为SN74LVC1T45,是单位双供电总线收发器,另一个用于I2C信号,标记为PCA9306,是一款双向I2C总线电压转换器,均来自德州仪器。这些IC通过利用两个不同的参考电压来实现简单可靠的位级移位功能,从而允许Click board™与3.3V和5V的MCU进行接口连接。

4Dot-Matrix R Click top side image
4Dot-Matrix R Click bottom side image

功能概述

开发板

32L496GDISCOVERY Discovery 套件是一款功能全面的演示和开发平台,专为搭载 Arm® Cortex®-M4 内核的 STM32L496AG 微控制器设计。该套件适用于需要在高性能、先进图形处理和超低功耗之间取得平衡的应用,支持无缝原型开发,适用于各种嵌入式解决方案。STM32L496AG 采用创新的节能架构,集成

了扩展 RAM 和 Chrom-ART 图形加速器,在提升图形性能的同时保持低功耗,使其特别适用于音频处理、图形用户界面和实时数据采集等对能效要求较高的应用。为了简化开发流程,该开发板配备了板载 ST-LINK/V2-1 调试器/编程器,提供即插即用的调试和编程体验,使用户无需额外硬件即可轻松加载、调

试和测试应用程序。凭借低功耗特性、增强的内存能力以及内置调试工具,32L496GDISCOVERY 套件是开发先进嵌入式系统、实现高效能解决方案的理想选择。

Discovery kit with STM32L496AG MCU double side image

微控制器概述 

MCU卡片 / MCU

STM32L496AG Image

建筑

ARM Cortex-M4

MCU 内存 (KB)

1024

硅供应商

STMicroelectronics

引脚数

169

RAM (字节)

327680

使用的MCU引脚

mikroBUS™映射器

NC
NC
AN
Memory Clear
PB2
RST
Write Enable
PG11
CS
NC
NC
SCK
NC
NC
MISO
NC
NC
MOSI
Power Supply
3.3V
3.3V
Ground
GND
GND
Display Blink
PA0
PWM
NC
NC
INT
NC
NC
TX
NC
NC
RX
I2C Clock
PB8
SCL
I2C Data
PB7
SDA
Power Supply
5V
5V
Ground
GND
GND
1

“仔细看看!”

Click board™ 原理图

4Dot-Matrix R Click Schematic schematic

一步一步来

项目组装

Discovery kit with STM32H750XB MCU front image hardware assembly

从选择您的开发板和Click板™开始。以Discovery kit with STM32L496AG MCU作为您的开发板开始。

Discovery kit with STM32H750XB MCU front image hardware assembly
Thermo 21 Click front image hardware assembly
Prog-cut hardware assembly
Board mapper by product7 hardware assembly
Necto image step 2 hardware assembly
Necto image step 3 hardware assembly
Necto image step 4 hardware assembly
Necto image step 5 hardware assembly
Necto image step 6 hardware assembly
Discovery kit with STM32H750XB MCU NECTO MCU Selection Step hardware assembly
Necto No Display image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Necto image step 11 hardware assembly

软件支持

库描述

这个库包含了4Dot-Matrix R Click驱动的API。

关键函数:

  • c4dot_write_char - 写入4DotMatrix字符。

  • c4dot_write_char0 - 写入4DotMatrix字符0。

  • c4dot_write_text - 写入4DotMatrix文本。

开源

代码示例

完整的应用程序代码和一个现成的项目可以通过NECTO Studio包管理器直接安装到NECTO Studio 应用程序代码也可以在MIKROE的GitHub账户中找到。

/*!
 * \file 
 * \brief c4dotmatrixr Click example
 * 
 * # Description
 * This example demonstrates the use of 4Dot-Matrix R Click board.
 *
 * The demo application is composed of two sections :
 * 
 * ## Application Init 
 * Initializes the driver and performs the Click default configuration.
 * 
 * ## Application Task  
 * Displays a desired text message and then numbers from -20 to 20 on the Click board.
 * Each step will be logged on the USB UART where you can track the program flow.
 *  
 * \author MikroE Team
 *
 */
// ------------------------------------------------------------------- INCLUDES

#include "board.h"
#include "log.h"
#include "c4dotmatrixr.h"

// ------------------------------------------------------------------ VARIABLES

static c4dotmatrixr_t c4dotmatrixr;
static log_t logger;

static uint8_t text[23] = { ' ',' ',' ','M', 'i', 'k', 'r', 'o', 'E','l','e',
                            'k','t','r','o','n','i','k','a',' ',' ',' ',' '};

// ------------------------------------------------------ APPLICATION FUNCTIONS

void application_init ( void )
{
    log_cfg_t log_cfg;
    c4dotmatrixr_cfg_t cfg;

    /** 
     * 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.

    c4dotmatrixr_cfg_setup( &cfg );
    C4DOTMATRIXR_MAP_MIKROBUS( cfg, MIKROBUS_1 );
    c4dotmatrixr_init( &c4dotmatrixr, &cfg );
    
    c4dotmatrixr_default_cfg ( &c4dotmatrixr );
    log_info( &logger, "---- Application Task ----" );
}

void application_task ( void )
{
    int8_t i;
    log_printf( &logger, "------------------------------------\r\n" );
    log_printf( &logger, "Displaying \"Mikroelektronika\" on the Click board...\r\n" );
    for ( i = 0; i < 20; i++ )
    {
        c4dot_write_text(  &c4dotmatrixr, text + i );
        Delay_ms ( 150 );
    }
        
    // Clear and delay.
    c4dot_clear_display( &c4dotmatrixr );
    Delay_ms ( 500 );
        
    log_printf( &logger, "Displaying all integer numbers from -20 to 20 on the Click board...\r\n" );
    // Write some numbers on the display.
    for ( i = -20; i <= 20; i++ )
    {
        c4dot_write_int_dec( &c4dotmatrixr, i );
        Delay_ms ( 150 );
    }

    // Clear and delay.
    c4dot_clear_display( &c4dotmatrixr );
    Delay_ms ( 500 );
}

int main ( void ) 
{
    /* Do not remove this line or clock might not be set correctly. */
    #ifdef PREINIT_SUPPORTED
    preinit();
    #endif
    
    application_init( );
    
    for ( ; ; ) 
    {
        application_task( );
    }

    return 0;
}


// ------------------------------------------------------------------------ END

额外支持

资源

喜欢这个项目吗?

'购买此套件' 按钮会直接带您进入购物车,您可以在购物车中轻松添加或移除产品。