Skip to content

TM1637 chip documentation

Erriez edited this page May 21, 2018 · 1 revision

TM1637 pins

Symbol Pin name Pin number Description
DIO Data input output 17 Input/output serial data during the rising of shift clock, from low.
CLK Clock input 18 Output/input serial data at the rising edge
K1~K2 Key-scan data input 19-20 The data inputted into the Pin would be latch after display cycle close
SEG1~SEG8 Output (segment) 2-9 Segment output, p pipe open-drain output
GRID6~GRID1 Output (grid) 10-15 Grid output, N pipe open-drain output
VDD Logic power 16 5V
GND Logic ground 1 Connect ground system

Communication protocol

Start Byte Stop
S Command T
Start Byte Data Stop
S Command 1..N data Bytes T

Command description

Instructions are used to set the display mode and LED driver status. The first byte entered by DIO after a falling edge of CLK acts as an instruction. After decoding, take the highest B7, B6 two bits to distinguish different Instruction.

B7 B6 B5 B4 B3 B2 B1 B0 Instruction
0 1 Data command
1 0 Display control command
1 1 Address command

Data command

This command is used to set the data to be written and read. The B1 and B0 bits do not allow setting 01 or 11.

B7 B6 B4 B3 B2 B1 B0 Instruction
0 1 0 0 Write data to register
0 1 1 0 Read key-scan data
0 1 0 Auto address increment
0 1 1 Fixed address
0 1 0 Normal mode
0 1 1 Test mode (not documented)

Display control command

B7 B6 B5 B4 B3 B2 B1 B0 Display address
1 0 0 0 0 Set pulse width is 1/16
1 0 0 0 1 Set pulse width is 2/16
1 0 0 1 0 Set pulse width is 4/16
1 0 0 1 1 Set pulse width is 10/16
1 0 1 0 0 Set pulse width is 12/16
1 0 1 0 1 Set pulse width is 13/16
1 0 1 1 0 Set pulse width is 13/16
1 0 1 1 1 Set pulse width is 14/16
1 0 0 Display off
1 0 1 Display on

Address command

B7 B6 B5 B4 B3 B2 B1 B0 Display address
1 1 0 0 0 0xC0
1 1 0 0 1 0xC1
1 1 0 1 0 0xC2
1 1 0 1 1 0xC3
1 1 1 0 0 0xC4
1 1 1 0 1 0xC5

When power on, address default 0x00.

Display registers

This register stores the data transferred from the external device to the TM1637 via the serial interface. The address 00H-05H consists of 6 bytes in total and is connected to the core SEG and GRID pin LED lights connected to the corresponding distribution as shown below: Write LED display data, according to from the display address from low to high, from the data byte low to high operation.

SEG1 SEG2 SEG3 SEG4 SEG5 SEG6 SEG7 SEG8
B0 B1 B2 B3 B4 B5 B6 B7
GRID1
GRID2
GRID3
GRID4
GRID5
GRID6