Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Help Required on TM1650 Seven Segment Display Driver

Status
Not open for further replies.

sonar_abhi

Member level 1
Joined
Mar 15, 2016
Messages
36
Helped
2
Reputation
4
Reaction score
2
Trophy points
8
Activity points
380
Hello All,

I am developing a circuit in which PIC16F877A controls the peripherals, one of which is a TM1650 7 segment display driver chip.

The datasheet is in Cantonese and I cant understand it. Has anybody worked with the chip and help me on that count?

With regards,

Abhishek
 

The translation is missing the graphics so you will have to match the pictures and text yourself.

Brian.
 

Attachments

  • TM1650.zip
    603.4 KB · Views: 272
View attachment 134505

The translation is missing the graphics so you will have to match the pictures and text yourself.

Brian.

Hi Brian,

I too tried doing that, but for the life of me I couldn't figure out what is the device's address. That should be the basic thing that will be used to address the chip. Also I found three different programs in arduino library but couldnt find the device address in either of them.

I am following this approach, can you please check it to be right?

1. Initialise the I2C
2. I2C Start
3. I2C Stop (To start the chip, SDA should go from high to low as per the datasheet)
4. I2C Start
5. Send 0x48 on the I2C bus to address the chip
6. Send 0x67 on the I2C bus to address the left most digit
7. Send the data on the I2C bus
8. I2C Stop
9. I2C Start (To stop the chip, SDA should go from low to high as per the datasheet)

I am also sending you the links to the arduino based libraries I found for the chip.

1. https://github.com/mozgy/Mozz_TM1650
2. https://github.com/arkhipenko/TM1650

Really appreciate your help,

With regards,
Abhishek
 

Protocol
TM1650 uses 2-wire serial transmission protocol communication.
1: START / END signal (STOP)
Start signal: Holds SCL as "1" level, SDA jumps from "1" to "0", it is considered start signal,
Such as (Figure 3) A segment;
End signal: Holds SCL to "1" level, SDA jumps from "0" to "1", it is regarded as end signal,
Such as (Figure 3) E segment;
2: ACK signal
If the communication is normal, the chip in the serial communication after the falling edge of the first 8 clock, TM1650 take the initiative to SDA low. Until the seizure
Measured to the rising edge of SCL, SDA release for the input state (for the chip), such as (Figure 3) D segment.
3: Writing "1" and writing "0".
Writing "1": Writing "1" to SDA is maintained at "1" level and SCL jumps from "0" to "1" and from "1" to "0"
Such as (Figure 3) B section.
Write "0": Hold SDA to "0" level, SCL from

4: One byte data transfer format
A byte data transmission format shown in Figure 4, the data sent when the first MSB, LSB in the post. The microprocessor's data passes through the two-wire bus
Interface and TM1650 communication, when the input data SCL is high, the SDA signal must remain unchanged; only the SCL
When the clock signal is low, the signal on SDA can be changed. The start condition of the data input is that SDA is changed from high to high when SCL is high
Low; the end condition is that SDA goes from low to high when SCL is high.

5: Read key data timing
Read data, SCL falling edge, the data from the TM1650 SDA pin output.

Characterization
The TM1650 is a dedicated LED driver circuit with a keypad scan interface (LED display). Integrated MCU
Input and output control digital interface, data latches, LED driver, keyboard scanning, brightness adjustment circuit. TM1650 stable performance, quality
The amount of reliable, anti-interference ability, applicable to 24 hours of continuous application of long-term work.
Features
 Two display modes: 8 segments × 4 digits and 7 segments × 4 digits
 segment drive current greater than 25mA, bit drive current greater than 150mA
 Provides 8 levels of brightness control
 Keyboard scanning: 7 × 4bit internal integrated transistor driver
 high-speed two-wire serial interface
 Built-in clock oscillation circuit
 Built-in power-on reset circuit
 support 2.8V-5.5V power supply voltage
 DIP16 and SOP16 package available
Applicable fields:
 home appliances such as set-top boxes, air conditioners, DVD / VCD display driver.
Internal structure diagram


Memory Address:
This register stores the data transferred from the external device to the TM1650 through the serial interface in 4-byte units,
A / KI ~ DP / KP and DIG pin connected LED lights corresponding to the distribution of the following chart:
Write LED display data, in accordance with the display address from the high to low, from the data byte high to low operation.

MSB LSB
B7 B6 B5 B4 B3 B2 B1 B0 Function description
× 0 0 0 × ×
Brightness setting
8 levels of brightness
× 0 0 1 × × 1 level of brightness
× 0 1 0 × × 2 levels of brightness
× 0 1 1 × × 3 levels of brightness
× 1 0 0 × × 4 levels of brightness
× 1 0 1 × × 5 levels of brightness
× 1 1 0 × × 6 level brightness
× 1 1 1 × × 7 level brightness
× 0 × ×
The 7/8 segment displays the control bits
8 segment display mode
× 1 × × 7 segment display mode
× × × 0
The display bit is turned on / off
Off display
× × × 1 open display
Note: The bit can be 1, it can be 0, it is recommended to write 0.


ADDRESS: write to the TM1650 memory address
DATA: The data to be displayed is written to the TM1650.

Command1: Data Command: 48H.
Command2: On display, display brightness level.
ADDRESS: memory address.
DATA: Display data.

Google Translate easily translates the datasheet.


Device address I guess 0x68.
 
Last edited by a moderator:
As I mentioned, I have translated the datasheet with Google Translate but it did not help me a great deal. I could not find sufficient information in it.

Lets start with the basics based on what we can understand from the datasheet:

1. To start the chip, I have to
"Holds SCL as "1" level, SDA jumps from "1" to "0", it is considered start signal,"

This means that I have to pass the Soft_I2C_Start() and Soft_I2C_Stop() or I have to manually turn off and on the corresponding pins of the SCl and SDA connections?

If this part is correct, I can proceed furthur.

With regards,

Abhishek
 

Looking at your Soft_I2C_Start() function name I guess you are using mikroC PRO PIC. Is it right ? If yes, then mikroC PRO Compilers come with help file and an example project to read I2C eeprom. You just see that code. You will come to know how to use the I2C library functions.

It is like this

Code:
Soft_I2C_Start();
Soft_I2C_Write(device_address | write bit);
Soft_I2C_Write(address of register to write);
Soft_I2C_Write(data to be written to the above regsiter);
Soft_I2C_Stop();

If you are not using mikroC PRO Compiler then mention the Compiler you are using.
 
Looking at your Soft_I2C_Start() function name I guess you are using mikroC PRO PIC. Is it right ? If yes, then mikroC PRO Compilers come with help file and an example project to read I2C eeprom. You just see that code. You will come to know how to use the I2C library functions.

It is like this

Code:
Soft_I2C_Start();
Soft_I2C_Write(device_address | write bit);
Soft_I2C_Write(address of register to write);
Soft_I2C_Write(data to be written to the above regsiter);
Soft_I2C_Stop();

If you are not using mikroC PRO Compiler then mention the Compiler you are using.

Yes, you are right. I am using the mikroC PRO compiler. The thing is, I have tried almost every approach that was mentioned on the mikroC documentation to communicate with the chip but without success. I guess, I'll have to use some other chip such as 74HC595 instead of wasting more time on this chip just to save some GPIO pins.

Maybe after this project, I might return to tinkering with this chip in my free time.

Thanks for your help, Okada and Betwixt :)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top