TM1639
TM1639
一、 Introduction
TM1639 is an IC dedicated to LED (light emitting diode display) drive control and equipped with a
keypad scan interface. It integrates MCU digital interface, data latch, LED drive, and keypad scanning
circuit. This product is reliable in quality, stable in performance and strong in interference resistance. It
is mainly used for household electrical appliances (smart water heaters, microwave ovens, washing
machines, air conditioners, electric stove), set-top boxes, electronic scale, smart meters and other Nixie
tube or LED display devices.
二、Features
• CMOS technology
• 8 segments × 8 bits display
• Keypad scanning (4 × 2 bits)
• Brightness adjustment circuit (8-level adjustable duty ratio)
• Serial ports (CLK, STB, DIO)
• Oscillation mode: RC oscillation
• Built-in power-on reset circuit
• Package type: SOP24,SDIP24
三、Pin definition:
GRID4 1 24 GRID5
GRID3 2 23 GRID6
GND 3 22 GND
GRID2 4 21 GRID7
GRID1 5 20 GRID8
DIO 6 19 SEG12
CLK 7 TM1639 18 SEG11
STB 8 (TOP VIEW) 17 SEG10
K0 9 16 SEG9
K1 10 15 KS4/SEG4
VDD 11 14 KS3/SEG3
SEG1/KS1 12 13 KS2/SEG2
▲ Note: When DIO outputs data, it is an NMOS open drain output, To read the keypad, an external pull-up resistor
should be provided to connect 1K-10K . The Company recommends a 10K pullup resistor. At falling edge of the
clock, DIO controls the operation of NMOS, at which point, the reading is unstable until rising edge of the clock.
SEG12
SEG11
SEG1
SEG2
SEG3
SEG4
SEG9
X X X X X X X X
xxHL (low four) xxHU (high four) xxHL (low four) xxHU (high four)
B0 B1 B2 B3 B4 B5 B6 B7 B0 B1 B2 B3 B4 B5 B6 B7
00HL 00HU 01HL 01HU GRID1
02HL 02HU 03HL 03HU GRID2
04HL 04HU 05HL 05HU GRID3
06HL 06HU 07HL 07HU GRID4
08HL 08HU 09HL 09HU GRID5
0AHL 0AHU 0BHL 0BHU GRID6
0CHL 0CHU 0DHL 0DHU GRID7
0EHL 0EHU 0FHL 0FHU GRID8
Figure (2)
▲Note: The moment the display register of the chip is powered on, the values stored inside may be random, at which
point, customers may directly send a command to turn on the screen.Messy codes are likely to appear. Considering
that, the company advise customers to clear the display register upon power-on, i.e., writing 0x00 into all the 16-byte
memory addresses (00H-0FH).
SEG2
SEG1 a
SEG3 SEG2 b a
SEG3 c f b
SEG4 g GRID1
SEG4 GRID1 d com
SEG5 ee c
SEG5 SEG6 f d
SEG7 dp
g
SEG8 dp
SEG6
SEG7
SEG8
Figure (7)
Figure 7 is a diagram for the wiring of common cathode LEDs. To display 0 off the LED segment display,
customers only need to write 0x3F to the 00H (GRID1) address starting from lower bits, at which point, 00H
corresponds to the data in SEG1-SEG8 as shown in the table below.
SEG8 SEG7 SEG6 SEG5 SEG4 SEG3 SEG2 SEG1
0 0 1 1 1 1 1 1 GRID1(00H)
B7 B6 B5 B4 B3 B2 B1 B0
GRID1
GRID2
GRID1 a
GRID3 GRID2 b a
GRID3 c f b
GRID4 g SEG1
SEG1 GRID4 d com
GRID5 ee c
GRID5 GRID6 f d
GRID7 g dp
GRID6 GRID8 dp
GRID7
GRID8
Figure (8)
Figure 8 is a diagram for the wiring of common anode LEDs. To display 0 off the LED segment display, customers
only need to write O1H into 00H (GRID1), 02H (GRID2), 04H (GRID3), 06H (GRID4), 08H (GRID5),and 0AH
(GRID6), and 00H into 0CH (GRID7) and 0EH (GRID8). SEG1-SEG8 correspond to the data table below.
▲Note: To drive common cathode LEDs or common anode LEDs, SEG pins can only be connected with LED anode,
and GRID, only with LED cathode. Do not connect them in reverse direction.
K0
K1
KS1
KS2
KS3
KS4
Figure (3)
The storage address for keypad data is shown in (4). Upon a key reading command, the device starts to read key
data BYTE1-BYTE2. Data already read will be output starting from lower bits. When a key corresponding to a pin of
chips K and KS is pressed , the BIT corresponding to the byte is 1.
B0 B1 B2 B3 B4 B5 B6 B7
X X K1 K0 X X K1 K0
KS1 KS2 BYTE1
KS3 KS4 BYTE2
Figure (4)
▲Data are read in order from BYTE1to BYTE2 without skipping any byte. For example: When the key corresponding
to K1 and KS4 is pressed, it is impossible to know the data unless and until the data from the key is read down to the
sixth BIT of the second byte. When two keys corresponding to K1 and KS8 as well as K2 and KS8 respectively are
pressed simultaneously, B6 and B7 of the data read from BYTE4 are both 1.
3、A combination key can only be formed on the same KS pins and different K pins. It is impossible to from a
combination key on the same K pin but different KS pins.
SGE1/KS1 S1
SGE2/KS2 S2
D1 D2
K1
GRID1
Figure (12)
Solution:
1、 In terms of hardware, it is advisable to arrange the keys to be pressed at the same time on different K line,
as shown in Fgire (13).
SGE1/KS1
S1
D1 D2
1
1
S2
GRID1 GRID2 K1 K2
Figure (13)
SGE2/KS2
S2
D1 D2
1
K1
GRID1
Figure (14)
▲Note: It is recommend to form combination keys on the same KS but different KS.
DIO B0 B1 B2 B3 B4 B5 B6 B7
STB
Figure (5)
Data reading (read data)
CLK
DIO B0 B1 B2 B3 B4 B5 B6 B7 B0 B1 B2 B3 B4
STB
Figure (6)
▲Note: 1. When data is read, it takes a waiting time Twait (minimum 2μS) from instruction setting at the eighth
rising edge of the serial clock CLK to data reading at falling edge of the CLK. See the Timing
Characteristics table for specific parameters.
STB
STB
STB
Command1: Set key reading command
Data1 ~ 2: read key data
Start
No
Read the contents
of 1 byte
Set command for writing data
into display memory, in the
mode of auto address increment
by 1(40H)
Save the key value
into the register of
MCU
Set starting
Address 0xc0
No Have 2 bytes
been read?
Transmit
data
Yes
Key
Yes
processing
No
Start
Transmit the display control
command to set maximum
brightness (8FH)
Initialization
Set data commend
设
for key reading 42H
Transmit 1
byte data Have 2 bytes been
Read?
Yes
Set a new
address 0C1H
Transmit 1
byte data
Key processing
……Transit program
the rest data
End
VCC
VCC
GRID4 GRID4 GRID5
GRID5
GRID3 GRID3 GRID6
R1 R2 R3
GRID6 104
GND GND 100uF
GRID2 GRID2 GRID7
MCU Interface
SEG1
SEG2
SEG3
SEG4
VCC
VCC
GRID4 GRID4 GRID5
GRID5
GRID3 GRID3 GRID6
R1 R2 R3
GRID6 104
GND GND 100uF
GRID2 GRID2
MCU Interface
SEG1
SEG2
SEG3
SEG4
▲Note: 1、During PCB board wiring, the filter capacitor between VDD and GND shall be placed as close as
possible to TM1639 to strengthen the filtering effect.
2、The three 100pF capacitors connected to the three communication ports, DIO, CLK, and STB will
reduce interference with the communication ports.
3、Considering the turn-on voltage drop of blue digital led display is about 3V, the power supply for
TM1639 should be 5V.
SGE1~SEG12
Ioh1 20 25 40 mA
Vo = VDD-2V
SEG drives current
draw
SGE1~SEG12
Ioh2 20 30 50 mA
Vo = VDD-3V
Output pull-down
RL 10 KΩ K0~K1
resistance
©Titan Micro Electronics www.titanmec.com
V1.2 - 14
-
Special circuit for LED drive control TM1639
Input current II - - ±1 μA VI = VDD / VSS
High-level input
VIH 0.7 VDD - V CLK,DIO,STB
voltage
Low-level input
VIL - - 0.3 VDD V CLK,DIO,STB
voltage
Lagging voltage VH - 0.35 - V CLK,DIO,STB
Dynamic current
IDDdyn - - 5 mA No load, Display Off
loss
CL =
TTZH
Rise Time - - 2 μs 300p SEG1~SEG12
1
F
CL = 300pF,SEGN,
Fall Time TTHZ - - 120 μs
GRIDN
Maximum clock
Fmax - - 1 MHz ratio=50%
frequency
Input capacitance CI - - 15 pF -
Timing Waveforms:
All specifications and applications shown above are subject to change without prior notice.