Академический Документы
Профессиональный Документы
Культура Документы
LED TM1637
TM1637 LEDMCU
LED
DIP/SOP20
CMOS
8 6 ,
82bit
8
CLKDIO
RC 450KHz+5%
DIP20/SOP20
GND 1 20 K2
SEG1/KS1 2 19 K1
SEG2/KS2 3 18 CLK
SEG3/KS3 4 17 DIO
SEG4/KS4 5 16 VDD
SEG5/KS5 6 15 GRID1
SEG6/KS6 7 14 GRID2
SEG7/KS7 8 13 GRID3
SEG8/KS8 9 12 GRID4
GRID6 10 11 GRID5
1
Titan Micro Electronics www.titanmec.com
V2.1
/ SLCK
/
DIO 17 SCLK
ACK
CLK 18 /
K1~K2 19-20
SG1~SG8 2-9
N
GRID6~GRID1 10-15 P
VDD 16 5V10%
GND 1
ESD
82bit
SG1
SG2
SG3
SG4
S1 S5 S9 S13
K1
S2 S6 S10 S14
K2
S3 S7 S11 S15
S4 S8 S12 S16
SG5
SG6
SG7
SG8
SG1 SG2 SG3 SG4 SG5 SG6 SG7 SG8
1110_11 0110_11 1010_11 0010_11 1100_11 0100_11 1000_11 0000_11
K1
11 11 11 11 11 11 11 11
1111_01 0111_01 1011_01 0011_01 1101_01 0101_01 1001_01 0001_01
K2
11 11 11 11 11 11 11 11
1111_1111
TM1637
2
Titan Micro Electronics www.titanmec.com
V2.1
TM1637 00H-05H6
SGEGRIDLED
LED
SEG8
S S S S S S S
E E E E E E E
G G G G G G G
1 2 3 4 5 6 7
xxHL xxHU()
B0 B1 B2 B3 B4 B5 B6 B7
00HL 00HU GRID1
01HL 01HU GRID2
02HL 02HU GRID3
03HL 03HU GRID4
04HL 04HU GRID5
05HL 05HU GRID6
1
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
CLK
DIO
command S0 S1 S2 K1 K2 END
STAR
ACK ACK
CommandS0S1S2K1K2 S0S1S2 SGn K1
K2 K1 K2 250K
3
Titan Micro Electronics www.titanmec.com
V2.1
DIO
Command1 Command2 Data1 DataN Command3
start stop
ACK start ACK ACK ACK start ACK
Command1
Command2
Data1~N
Command3
3 SRAM
stop stop
CLK
DIO
Command1 Command2 Data1 Command2 DataN Command3
start start start
ACK ACK ACK stop start ACK ACK ACK stop
Command1
Command2
Data1~N
Command3
LED
CLKDIOB7B6
B7 B6
0 1
1 0
1 1
STOP
4
Titan Micro Electronics www.titanmec.com
V2.1
2
MSB LSB
B7 B6 B5 B4 B3 B2 B1 B0
1 1 0 0 0 0 00H
1 1 0 0 0 1 01H
1 1 0 0 1 0 02H
1 1 0 0 0 1 1 03H
1 1 0 1 0 0 04H
1 1 0 1 0 1 05H
0C6H
00H
3
MSB LSB
B7 B6 B5 B4 B3 B2 B1 B0
1 0 0 0 0 1/16
1 0 0 0 1 2/16
1 0 0 1 0 4/16
1 0 0 1 1 10/16
1 0 1 0 0 11/16
1 0 0 1 0 1 12/16
1 0 1 1 0 13/16
1 0 1 1 1 14/16
1 0 0
1 0 1
5
Titan Micro Electronics www.titanmec.com
V2.1
6
Titan Micro Electronics www.titanmec.com
V2.1
MCU
YES
NO
7
Titan Micro Electronics www.titanmec.com
V2.1
1Byte
NO
MCU
YES
NO
8
Titan Micro Electronics www.titanmec.com
V2.1
/*
*
* TM1637
* 1.0
* AT89S52
* Keil uVision3
* 11.0592M
* TM1637 0xff
*/
#include<reg52.h>
#include<intrins.h>
//
sbit clk = P1^2;
sbit dio = P1^1;
///=======================================
void Delay_us(unsigned int i) //nus
{
for(;i>0;i--)
_nop_();
}
///======================================
void I2CStart(void) //1637
{
clk = 1;
dio = 1;
Delay_us(2);
dio = 0;
}
///=============================================
void I2Cask(void) //1637
{
clk = 0;
Delay_us(5); // 5us ACK
while(dio);
clk = 1;
Delay_us(2);
clk=0;
}
///========================================
9
Titan Micro Electronics www.titanmec.com
V2.1
///=========================================
void I2CWrByte(unsigned char oneByte) //
{
unsigned char i;
for(i=0;i<8;i++)
{ clk = 0;
if(oneByte&0x01) //
{
dio = 1;
}
else
{
dio = 0;
}
Delay_us(3);
oneByte=oneByte>>1;
clk=1;
Delay_us(3);
}
}
///-------------------------------------------------
unsigned char ScanKey(void) //
{
unsigned char rekey,rkey,i;
I2CStart();
I2CWrByte(0x42); //
I2Cask();
dio=1; //
for(i=0;i<8;i++) //
{ clk=0;
rekey=rekey>>1;
10
Titan Micro Electronics www.titanmec.com
V2.1
///================================================
void SmgDisplay(void) //
{
unsigned char i;
I2CStart();
I2CWrByte(0x40); // 40H 1 ,44H ,
1
I2Cask();
I2CStop();
I2CStart();
I2CWrByte(0xc0); //
I2Cask();
for(i=0;i<6;i++) //
{
I2CWrByte(0xff); //
I2Cask();
}
I2CStop();
I2CStart();
I2CWrByte(0x8f); //
I2Cask();
I2CStop();
}
///==============================================
11
Titan Micro Electronics www.titanmec.com
V2.1
///==============================================
void main(void)
{
unsigned char keydate;
init() //
SmgDisplay(); //
while(1)
{
keydate=Scankey(); //
}
}
//===========end==================================
12
Titan Micro Electronics www.titanmec.com
V2.1
VDD
C4
C3 100uF GND
104
13
Titan Micro Electronics www.titanmec.com
V2.1
PD 400 mW
2Ta = -40+85Vss = 0 V
VDD 5 V -
GRID1~GRID6
Ioh1 -20 -25 -40 mA
Vo = vdd-2V
GRID1~GRID6
Ioh2 -20 -30 -50 mA
Vo = vdd-3V
SEG1~SEG8
IOL1 80 140 - mA
Vo=0.3V
Idout 4 - - mA VO = 0.4Vdout
VO = VDD 3V
Itolsg - - 5 %
GRID1GRID6
14
Titan Micro Electronics www.titanmec.com
V2.1
II - - 1 A VI = VDD / VSS
0.7
VIH - V CLKDIN
VDD
0.3
VIL - - V CLKDIN
VDD
VH - 0.35 - V CLKDIN
IDDdyn - - 5 mA
tPZL - - 100 ns CL = 15pF, RL = 10K
GRID1
TTZH 1 - - 2 s
GRID6
CL =
SEG1
300p F
TTZH 2 - - 0.5 s SEG8
CL = 300pFSegn
TTHZ - - 120 s
Gridn
CI - - 15 pF -
PWCLK 400 - - ns -
tSETUP 100 - - ns -
tHOLD 100 - - ns -
tWAIT 1 - - s CLKCLK
15
Titan Micro Electronics www.titanmec.com
V2.1
16
Titan Micro Electronics www.titanmec.com
V2.1
17
Titan Micro Electronics www.titanmec.com
V2.1
Ver1.0 2011-06-28
1. ack
Ver2.0 2011-09-22
2. ack
1
Ver1.2 2012-08-12 2 STOP
3 ACK
18
Titan Micro Electronics www.titanmec.com
V2.1