Our cutting-edge solution featuring a four-digit red dot matrix display module brings your messages to life with clarity and precision, making information dissemination a breeze
A
A
Hardware Overview
How does it work?
Dot Matrix R Click is based on the HCMS-3906, a four-digit dot matrix display module from Broadcom. Dot Matrix R Click is a high-performance, easy-to-use dot matrix display driven by an onboard CMOS IC. Each display can be directly interfaced with a microprocessor, thus eliminating the need for cumbersome interface components. The serial IC interface allows higher character count information displays with a minimum of data lines. The easy-to-read 5x7 pixel format allows the display of upper case, lower case, Katakana, and custom user-defined characters. These displays are stackable in the x- and y-directions, making them ideal for high character count displays. Typical applications include telecommunication equipment, portable data entry devices, computer peripherals, medical equipment, test equipment, business machines, avionics, industrial controls, and more. Featured LED display HCMS-3906 consists of LEDs configured as 5x7 font characters driven in groups of 4 characters per IC. Each IC comprises a 160-bit shift register (the Dot Register), two 7-bit Control Words, and refresh circuitry. The Dot Register contents are mapped on a one-to-one basis to the display. Thus, an individual Dot Register bit uniquely controls a single LED. Reset initializes the Control Registers (sets all Control Register bits to
logic low) and places the display in sleep mode. The Dot Registers are not cleared upon power-on or by Reset. After power-on, the Dot Register contents are random; however, Reset will put the display in sleep mode, thereby blanking the LEDs. The Control Register and the Control Words are cleared to all zeros by Reset. Load the Dot Register with logic lows to operate the display after being Reset. Then, load Control Word 0 with the desired brightness level and set the sleep mode bit to logic high. The Dot Register holds the pattern to be displayed by the LEDs. First, RS is brought low, then CE is brought low. Next, each successive rising CLK edge will shift the data at the DIN pin. Loading a logic high will turn the corresponding LED on; a logic low turns the LED off. When all 160 bits have been loaded, CE is brought to logic high. When CLK is next brought to logic low, new data is latched into the display dot drivers. Loading data into the Dot Register occurs while the previous data is displayed and eliminates the need to blank the display while loading data. In a 4-character display, the 160 bits are arranged as 20 columns by 8 rows. This array can be conceptualized as four 5x8 dot matrix character locations, but only 7 of the 8 rows have LEDs. The bottom row (row 0) is not used. Thus, latch location 0 is never displayed. Column 0 controls the left-most column.
Data from Dot Latch locations 0-7 determine whether or not pixels in Column 0 are turned on or off. Therefore, the lower left pixel is turned on when a logic high is stored in Dot Latch location 1. Characters are loaded serially, with the left-most character loaded first and the rightmost character loaded last. By loading one character at a time and latching the data before loading the next character, the figures will appear to scroll from right to left. The Control Register allows software modification of the IC’s operation and consists of two independent 7-bit control words. Bit D7 in the shift register selects one of the two 7-bit control words. Control Word 0 performs pulse width modulation, pixel map, brightness control, peak pixel current brightness control, and sleep mode. Control Word 1 sets serial/simultaneous data out mode and external oscillator prescaler. Each function is independent of the others. This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Features overview
Development board
Curiosity PIC32 MZ EF development board is a fully integrated 32-bit development platform featuring the high-performance PIC32MZ EF Series (PIC32MZ2048EFM) that has a 2MB Flash, 512KB RAM, integrated FPU, Crypto accelerator, and excellent connectivity options. It includes an integrated programmer and debugger, requiring no additional hardware. Users can expand
functionality through MIKROE mikroBUS™ Click™ adapter boards, add Ethernet connectivity with the Microchip PHY daughter board, add WiFi connectivity capability using the Microchip expansions boards, and add audio input and output capability with Microchip audio daughter boards. These boards are fully integrated into PIC32’s powerful software framework, MPLAB Harmony,
which provides a flexible and modular interface to application development a rich set of inter-operable software stacks (TCP-IP, USB), and easy-to-use features. The Curiosity PIC32 MZ EF development board offers expansion capabilities making it an excellent choice for a rapid prototyping board in Connectivity, IOT, and general-purpose applications.
Microcontroller Overview
MCU Card / MCU

Architecture
PIC32
MCU Memory (KB)
2048
Silicon Vendor
Microchip
Pin count
100
RAM (Bytes)
524288
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Track your results in real time
Application Output
1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support
Library Description
This library contains API for Dot Matrix R Click driver.
Key functions:
dotmatrixr_set_bl_pin_state
- Sets BL pin to high or low statedotmatrixr_restart
- Restart devicedotmatrixr_write_ascii
- Sets display to written value
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* \file
* \brief DotMatrixR Click example
*
* # Description
* This demo application show data on display.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Configuration device
*
* ## Application Task
* Display shows 3 different data in span of 1 second
*
* \author MikroE Team
*
*/
// ------------------------------------------------------------------- INCLUDES
#include "board.h"
#include "log.h"
#include "dotmatrixr.h"
// ------------------------------------------------------------------ VARIABLES
static dotmatrixr_t dotmatrixr;
static log_t logger;
char demo_t1[ 6 ] = "####";
char demo_t2[ 6 ] = "____";
char demo_t3[ 6 ] = "DotR";
// ------------------------------------------------------ APPLICATION FUNCTIONS
void application_init ( void )
{
log_cfg_t log_cfg;
dotmatrixr_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.
dotmatrixr_cfg_setup( &cfg );
DOTMATRIXR_MAP_MIKROBUS( cfg, MIKROBUS_1 );
dotmatrixr_init( &dotmatrixr, &cfg );
Delay_ms( 100 );
dotmatrixr_restart( &dotmatrixr );
Delay_ms( 500 );
dotmatrixr_set_bl_pin_state( &dotmatrixr, 0 );
dotmatrixr_set_rs_pin_state( &dotmatrixr, 0 );
dotmatrixr_ctrl_1( &dotmatrixr, DOTMATRIXR_CTRL_BYTE_1_OSC_PRESCALER_1 |
DOTMATRIXR_CTRL_BYTE_1_DOUT_DIN );
dotmatrixr_ctrl_0( &dotmatrixr, DOTMATRIXR_CTRL_BYTE_0_BRIGHTNESS_30 |
DOTMATRIXR_CTRL_BYTE_0_PIXEL_PEAK_CURRENT_9p3mA |
DOTMATRIXR_CTRL_BYTE_0_MODE_NORMAL );
}
void application_task ( void )
{
dotmatrixr_write_ascii( &dotmatrixr, &demo_t1[ 0 ] );
Delay_ms( 1000 );
dotmatrixr_write_ascii( &dotmatrixr, &demo_t2[ 0 ] );
Delay_ms( 1000 );
dotmatrixr_write_ascii( &dotmatrixr, &demo_t3[ 0 ] );
Delay_ms( 1000 );
}
void main ( void )
{
application_init( );
for ( ; ; )
{
application_task( );
}
}
// ------------------------------------------------------------------------ END