How does it work?
7-SEG 2 Click is based on the LDT-M2804RI, a three-digit seven-segment display from Lumex. The red LED segments have a common anode, a 635nm wavelength, and a luminous intensity of 5000mcd. The LED1202, a 12-channel low-quiescent current LED driver from STMicroelectronics, drives the display. The output current can be adjusted separately for each channel by a 12-bit digital dimming control. A slow turn-on and turn-off time improves the system’s low noise generation performance; moreover, the phase shifting function helps to reduce the inrush current. Eight patterns can be stored in the driver for automatic sequencing without MCU intervention.
7-SEG 2 Click uses a standard 2-wire I2C communication from the LED driver to allow the host MCU to control the seven-segment display. The I2C interface supports clock frequencies of up to 400kHz. The I2C address can be selected over the ADDR SEL jumpers. The interrupt INT pin will notify the host MCU when an interrupt event occurs. It can be an open LED detection, overtemperature protection, the pattern fault and status interrupt, the start of frame, and more.
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.
Specifications
Type
LED Segment
Applications
Can be used for the development of many applications requiring a visible display or others that display numerical/textual information
On-board modules
LDT-M2804RI – three-digit seven-segment display from Lumex
Key Features
Three-digit, 7-segment display with a following dot point, red LED segments, brightness adjustment for each segment separately, common anode LEDs, open LED detection, overtemperature protection, pattern fault interrupt, start of frame interrupt, and more
Interface
I2C
Feature
ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on 7-SEG 2 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2-JP3 | ADDR SEL | Left | I2C Address Selection 0/1: Left position 0, Right position 1 |
7-SEG 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
LEDs Wavelength | – | – | 635 | nm |
Software Support
We provide a library for the 7-SEG 2 Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for 7-SEG 2 Click driver.
Key functions
-
c7seg2_set_segments_current
This function is used to set the current value of the segment’s leds. -
c7seg2_write_segment
This function is used to write a number [0..9] to a selected segment [0..2] with or w/o a decimal pointer. -
c7seg2_write_number
This function is used to write a number [0..999] to a selected segment [0..2] with or w/o a decimal pointer.
Example Description
The example demonstrates the use of the 7-SEG 2 Click board™ by displaying a counter number [0.00-9.99] which is incremented by 0.01 at a desired rate.
void application_task ( void )
{
static uint16_t counter = 0;
static uint16_t time = 0;
c7seg2_write_number( &c7seg2, counter, C7SEG2_DP_AT_SEGMENT_2 );
if ( ++time >= C7SEG2_NUM_COUNTER_RATE )
{
if ( ++counter > C7SEG2_MAX_NUMBER )
{
counter = 0;
}
time = 0;
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.7SEG2
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. UART terminal is available in all MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.