Skip to content

nimaltd/tm1637

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TM1637 7-Segment Display Driver

Author & License

  • Author: Nima Askari
  • Version: 2.0.0
  • License: See the LICENSE file in the root folder.

Connect with Me, Support Me

  • YouTube
  • Instagram
  • LinkedIn
  • Email
  • Ko-fi

© 2025 Nima Askari - NimaLTD. All rights reserved.


TM1637 7-Segment Display Driver Help

Pin Connections

Display Segment TM1637 Pin
A SEG1
B SEG2
C SEG3
D SEG4
E SEG5
F SEG6
G SEG7
. (Dot) SEG8

Installation

To install the package, add the following address to your STM32 package manager:

https://github.com/nimaltd/STM32-PACK/raw/main/NimaLTD.pidx

STM32CubeMX Configuration

Set CLK (Clock) and DIO (Data I/O) pins as:

  • Mode: Output Open Drain
  • Select: High-level initialization

Usage

1. Declare a Display Instance

Create an instance for each display:

tm1637_t seg = 
{
    .seg_cnt = 4,
    .gpio_clk = GPIOA,
    .gpio_dat = GPIOA,
    .pin_clk = GPIO_PIN_1,
    .pin_data = GPIO_PIN_2,
};
.
.
.
tm1637_init(&seg);
tm1637_disp_str(&seg, "1234");