Datasheet TM1637
Datasheet TM1637
Datasheet TM1637
TM1637 data address 00H-05H bytes of six units, respectively, and SGE and GRID pin chip
LED lights are connected to the corresponding distribution in the following figure:
Write LED display data, in accordance with the address from the display from low to high, from
low to high data byte operation.
Note: If no key is pressed, the key data is read: 1111_1111, low front, high in the post. Since the
induction cooker and other kitchen appliances applications, due to interference
Strong, in order to improve this problem, TM1637 resolved using negative edge triggered false
triggering phenomenon, the so-called "jump key" phenomenon.
The register stores transferred from an external device via the serial interface to the
TM1637 data address 00H-05H bytes of six units, respectively, and
SGE and GRID pin chip LED lights are connected to the corresponding distribution in the
following figure:
Write LED display data, in accordance with the address from the display from low to high, from
low to high data byte operation.
Interface Description
Microprocessor data via a two-wire bus interface and TM1637 communication, when the
input data when CLK is high, the signal on the DIO must remain unchanged; only on the clock
signal CLK is low, the signal can be changed on the DIO. Start condition input data is CLK Is
high, DIO from high to low; termination condition is CLK is high, DIO from low to high.
Data transfer TM1637 with the response signal ACK, when transferring data correctly, the
falling edge of the eighth clock, the chip will generates an acknowledge signal ACK will DIO
pin is pulled low, the release of DIO port line after the end of the ninth clock.
Command: read key commands; S0, S1, S2, K1, K2 constituting the key information is encoded,
S0, S1, S2 is encoded SGn, K1, K2 to K1 and K2 key code, read the key, the clock frequency
should be less than 250K, first read low, after reading high.
Data Directive
Instruction is used to set the display mode and the LED drive status. In the first byte after
the falling edge of the CLK input DIO as an instruction. After decoding, to take maximum B7,
B6 to distinguish between the two bits different instructions.
B7 B6 Instruction
0 1 Data Command Set
1 0 Display Control Command Set
1 1 Address command set
If you send STOP command in the command or data transmission, the serial
communication is initialized, and the instruction or data being transmitted is invalid (before or
the data transfer instruction remains valid)
1, the data command set
This command is used to set the data write and read, B1 and B0 are not allowed to set 01
or 11 bits.
B7 B6 B5 B4 B3 B2 B1 B0 Function Explanation
0 1 Do not 0 0 Data read-write mode Write data to the
care to settings display register
0 1 fill 0 1 0 Read key scan data
0 1 0 Address mode is set to Automatic address
increase incrementing
0 1 1 Fixed address
0 1 0 Test mode setting Normal mode
0 1 1 (internal use) Test Mode
Delay_us(30);
clk=1;
if(dio)
{
rekey=rekey|0x80;
}
else
{
rekey=rekey|0x00;
}
Delay_us(30);
}
I2Cask();
I2CStop();
return (rekey);
}