Page 1 of 1
Yet another TM1637 7 segment version. (Resolved)
Posted: Sat Jan 11, 2020 4:30 am
by chad
Hello,
I picked up some of these from amazon.
https://www.amazon.com/diymore-Display- ... =UTF8&th=1
It uses the TM1637Display.h lib for Arduino.
https://github.com/avishorp/TM1637/blob ... 7Display.h
I Have tried all of the FC components and didn't have any luck. Could you take a look?
I couldn't find a schematic for it. I'll keep looking..
Thanks,
Chad
Re: Yet another TM1637 7 segment version.
Posted: Mon Jan 13, 2020 11:25 am
by Benj
Hi Chad,
There doesn't look to be anything untoward in that header file that isn't compatible with our components. Is there any other source files to go with that header?
I have some diymore ESP boards and these do work ok so presumably it should be ok?
If you find anything further then let us know. You could also maybe use a multimeter to work out the connections on the board.
One thing I spotted is this in the .cpp file.
#define TM1637_I2C_COMM1 0x40
#define TM1637_I2C_COMM2 0xC0
#define TM1637_I2C_COMM3 0x80
in our code I beleive we use the TM1637_I2C_COMM2 option. I can turn this into a property if that would help.
Edit, sorry no this is a red herring, we use all three addresses as in the .cpp file already. Have you tried setting the brightness?
Re: Yet another TM1637 7 segment version.
Posted: Mon Jan 13, 2020 4:24 pm
by DirkB
Hello,
have you connected pull up resistors (10K) to the i2c port?
regards
Dirk
Re: Yet another TM1637 7 segment version.
Posted: Mon Jan 13, 2020 6:09 pm
by Benj
Good suggestion Dirk, This recently caught me out with a Grove display. Depending on your MCU you might be able to use internal pullups with a line of C code.
Re: Yet another TM1637 7 segment version.
Posted: Tue Jan 14, 2020 1:34 am
by chad
Hi guys,
I tried adding pull-ups didn't make a diff. I have tried three of the modules and none of them work.
I am using the f303 nucleo just for testing because it was handy. ST issue?
I can see stuff on the clock and data line on the scope, I have tried common cathode and anode. And I have set the brightness and turned on the display in the code.
I'll play with it some more tonight. I will also look and see if there is any other code for it. I have seen people get it up and running on arduino with that code..
Hmmm
Thanks,
Chad
Re: Yet another TM1637 7 segment version.
Posted: Tue Jan 14, 2020 6:49 am
by mnf
Looking at the data sheet - the tm1367 doesn't use i2c - uses a two wire interface with clock and data..
This looks very similar to the max7219 interface (send command then data) Note there is no slave address.
I think it should be possible to modify the max7219 library to work here - fairly easily - I can post you the source - the seven segment side got rather neglected but did work.... I don't have one of the Tm1367 displays to try - will have a look on Bangood.
Martin
Re: Yet another TM1637 7 segment version.
Posted: Tue Jan 14, 2020 7:23 am
by chad
Ok So I did some testing.
I have another tm1637 display. I tried it and it works with flowcode. Same basic thing just smaller / cheper.
I also dug out an arduino and hooked it up. The small display works fine. And the bigger ones from the amazon link also work.
So for some reason FC works with one and not the other but both work on an arduino using that .h.
?
CHad
Re: Yet another TM1637 7 segment version.
Posted: Tue Jan 14, 2020 11:04 am
by Benj
I might have it,
The .h file seems to override the bit delay from 50us to 100us.
I'm making a new version of the component with the delay set via a property so you can override it. Bear with me and I'll push it to the update system.
Re: Yet another TM1637 7 segment version.
Posted: Tue Jan 14, 2020 11:14 am
by Benj
There now

Re: Yet another TM1637 7 segment version.
Posted: Tue Jan 14, 2020 9:46 pm
by chad
That seemed to do it! Thanks
Looks like this rev of the chip likes a little higher delay.
Thanks !
Chad