First post here so I don't really know what I'm doing. Sorry, this will be really dumb but I really hope you can help!

So I pulled apart an old alarm clock. I pulled out the 7 segment display and I have been trying to figure out how to use it with an Arduino. Bottom line, I can't figure it out. The controller is TM1629A, the closest English data sheet I found is here. I also translated the actual Chinese one to English, so if you can be bothered that's here.

Essentially, using the serial moniter you can provide as many bytes as you like to send to the data pin of the controller. I've just been trying to send commands listed in the data sheet but it doesn't seem to do anything. I don't know if I have hooked something up wrong or is there a better way I could approach this?

In the second photo, the connections are labeled (not in picture) from left to right (top to bottom), VCC, GND, CLK, DAt, 3.3, CS, IR.Out of these, I don't understand what the 3.3 (I guessed it just wanted a 3.3V input but idk) and CS pins are for.

I would like to learn how to turn on and off each segment.If anyone could help me out at all, I'd be indebted to you. Thank you in advance!

I'm quite sure you are clever enough to work out which one I meant from the titles of those threads.

CS will be "Chip Select". Although the data sheet just calls the interface "serial", I suspect it is SPI compatible. Maybe they didn't want to say that to avoid having to pay money to anyone. SPI is a bus system that can connect the Arduino (the master) to several devices at once (slaves) using the same data and clock lines. Each slave will have a CS pin which the master will change to LOW when it wants to talk to that particular slave. So assuming you don't need to connect any other SPI slaves, you can connect that CS pin to ground.

As for the 3.3V pin, it could be an input or an output, it's not clear. There could be a 3.3V regulator on the board somewhere we can't see. Suggest you connect it to ground with 10K to begin with, connect Vcc & GND to 5V & 0V and measure the signal on the 3.3 pin. If it measures 3.3V, then perhaps there is a regulator on board. If it measures 0V, maybe you should connect it to 3.3V, but I don't know what for. The data sheet for the chip says it needs 5V. Maybe the IR receiver needs 3.3V.

CS will be "Chip Select". Although the data sheet just calls the interface "serial", I suspect it is SPI compatible. Maybe they didn't want to say that to avoid having to pay money to anyone. SPI is a bus system that can connect the Arduino (the master) to several devices at once (slaves) using the same data and clock lines. Each slave will have a CS pin which the master will change to LOW when it wants to talk to that particular slave. So assuming you don't need to connect any other SPI slaves, you can connect that CS pin to ground.

As for the 3.3V pin, it could be an input or an output, it's not clear. There could be a 3.3V regulator on the board somewhere we can't see. Suggest you connect it to ground with 10K to begin with, connect Vcc & GND to 5V & 0V and measure the signal on the 3.3 pin. If it measures 3.3V, then perhaps there is a regulator on board. If it measures 0V, maybe you should connect it to 3.3V, but I don't know what for. The data sheet for the chip says it needs 5V. Maybe the IR receiver needs 3.3V.

I really appreciate your response. I have done what you suggested. For some reason I though CS had to be high but I believe you are right. I regret to say that I don't have an ammeter, so I cannot clarify the connection of the 3.3 pin, I'm hoping it is irrelevant, I had it plugged into 3.3V for a while and nothing changed. I'm not really interested in the IR. I assume it doesn't need to be connected to operate the display. There are no extra components on the board other than pictured.

I am thinking that my code might not be sending the data correctly? What I understand is if I send '01001100 11000000 10001000' (writing data test mode fixed address to display register, 00H address, display is on) a segment should turn on but nothing shows. Is there an issue with my clock timing?

Just, if you want it for more information, there is an image of the main board. The connection working with is in the bottom left corner.

Edit: I did as you said but used an individual LED in series. On 3.3V no connection lit up but with 5V on the 3.3 pin every connection lit up the bulb. I don't know what to make of that.

Update: found this which works (soz for the link u can use a search engine to find if you like just search 'TM1628 Arduino library' first link) https://github.com/BlockThor/TM1628. This is the most progress I've had being able to turn some segments on and off. However, I don't have precise control over which because my display isn't the same size as what the library was written for? any help here?

Don't quote entire posts when you respond, it just makes the whole thread longer but adds nothing. If you want to quote something specific, just quote that part. If not, use Reply instead of Quote.

Please learn to attach your own pictures to your posts. It's a little awkward. You have to attach them and post, as you have done, but then copy the address of the image, edit the post, hit the insert image icon and paste the address.

Quote

Edit: I did as you said but used an individual LED in series. On 3.3V no connection lit up but with 5V on the 3.3 pin every connection lit up the bulb. I don't know what to make of that.

I don't know what to make of that entire paragraph. I read it several times. Can you explain again using more precise terms, avoiding any possible ambiguous interpretations? Thanks.

I don't know what to make of that entire paragraph. I read it several times. Can you explain again using more precise terms, avoiding any possible ambiguous interpretations? Thanks.

I don't have an ammeter so I connected the 3.3 pin to 3.3V and used another wire connected to ground to test which pins were actually connected. As you said their would either be 0V or 3.3V so I don't need to know the exact voltage, but only if there is a voltage. Using the LED I can see when the circuit is closed or open. When supplied with 3.3V all connections cause the led to (VCC CLK DAt CS or IR) light up but very dimly, almost unnoticeably so I'd guess it would read 3.3V.

The return current must be finding a way back to the Arduino through one of the other wires. This is not a good thing, damage could be happening. Always connect the ground wire. I would connect 5V to Vcc and if the display works without it, leave 3.3 pin unconnected.

Yes, I did come across that article. I sent an email to Vasyl asking for help, awaiting a reply.

Using his library, I got the output in the image above. I realize I didn't explain it very well. I can't generate a readable display. It all seems random, I am yet to find a pattern but I believe the dimensions of my display are different from what the library was originally written for.

Any insight for this issue? I'm thinking I could I possibly rewrite the library for my borad but I am still trying to understand it, I am a newbie.

Edit: I orgininally had the TM1629 library from here: https://github.com/BlockThor/TM1628. The library attached to that article doesn't seem to do anything to my display. I don't know if I'm using it wrong though, I just copied the sketch straight into IDE, it didn't do anything.

Edit 2: I had the pins incorrectly defined. I got it to work but I have the same issue. This library is easer to understand for me but I don't know how to edit it so I can use it. This is the output of the sketch from the site you linked.

The problem here, as you figured out, is that both libraries you tried were designed for tms1629 used with a particular display, neither of which is like your display. Neither library is generic/flexible enough to drive an arbitrary display without needing to be altered. You have the added difficulty of not knowing the pinout of your display, or how it is wired to the chip. It's going to take some skill and determination to reverse engineer that and adapt the library. Oh, and a multimeter. Just a cheap £10 one will be good enough for 95%+ of projects.

You have no data sheet for the display, which would tell you what pins are connected to which anodes & cathodes. You could unsolder it from the board and test it to work that out, but you would also need to know which pins on the tms chip they are connected to, so it's probably no easier than other methods.

Suggest you write a test sketch to light one segment of one digit at time and methodically work out how segments are wired to the chip. Which is where you started out, but that sketch was too simple, I guess.

I think those libraries have a buffer[] array and an update() method/function which could be used to light a single segment, so maybe try using those in a new test sketch.

You have no data sheet for the display, which would tell you what pins are connected to which anodes & cathodes. You could unsolder it from the board and test it to work that out, but you would also need to know which pins on the tms chip they are connected to, so it's probably no easier than other methods.

OKay, I have been able to determine the GRID pins are all anodes and the SEG pins are all cathodes, I can light each segment up but touching 5V and GND to them in combinations. At this point, the best solution I can see is wiring each GRID and SEG to an individual pin and just set them high and low, simply from a lack of a better option(obvs not gonna do this idek how I'd do the gnd pins).

I would like to be able to use the data pin I don't know what information to actually send to the chip to tell it what I want it to do.

This is what I am struggling to understand.What is 00HL? I thought they were addresses but I can't write to them, or at least I don't know how to. How can there be a single one for four segments?

I don't know how it operates. I mean, I don't really know what the code does. I interpret it the best I can but I get confused because I don't have a lot of experience with microprocessors the code isn't commented. I came to this forum because you guys know what you're doing! I have been trying different things but I think I need to edit this from TM1628ts.h (https://github.com/onetransistor/arduino-libraries/tree/master/Display_Segment/TM1628ts)If anyone could skim over that ^^ and give me any ideas I would be very grateful because I'm lost.

I have determined the anode connections include(segments from right to left of the display):GRID1 - Second segmentGRID2 - First segmentGRID3 - third segmentGRID4 - fourth segmentGRID5 - UtilityGRID6,7,8 - N/C