I have a need for a TM1651 library. The datasheet is attached.
Is this very simiar to the TM1637 or TM1638 ? With respect to the communications ( not the physical attributes ) - which is best to start with? And, is this something that you could adapt for me? Then, I can test and complete the testing here.
Hello Evan,.
The interface data format looks identical to TM1637, & control registers as well (except only 4 digits).
Referring the datasheet the display address starts at 00 (TM1637 start = C0
So as a first test, try the attached after setup for your hardware in "tm1651 Test1.gcb" & see how it goes...
If digit pins are swapped(like some module boards) the ReMap will need activating & Table Digit_ReMap configured.
I suspect there may be an error in the datasheet.
It shows the display address in section 7.2 as 00H - 03H, then mentions address 0C4 & above are invalid.
Looking at https://github.com/freekode/TM1651 it uses 0xC0 in TM1651.cpp
If you get a nogo try changing back to TMaddr 0xC0
are you driving 7seg's or Bargraph ?
Last edit: ToniG 2023-05-06
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The issues are the decimal points are always on - The two right 7 segs.
Sending tmSndDig(0, Cnt1) does not clear. Note the 0. The left 7 decimal point does not operate - at all.
Looking at the sch for the board, dp is connected to seg 5.
This shouldn't be causing your issues but set #Define TM_DispLen 3
Try slowing down your program with a wait 1000ms to see each digit being written en it should.
Do all segments come on at power up ? & then clear. (if you are running the supplied test program.)
Sending a 0 byte with tmSndDig should clear the digit. (this is what tmCLRdisp uses)
Have you got a delay after the display clear(if you have an endless loop it could be writing again the digits)
What MCU are you using?
Please include your program.
cheers
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good to see you got it working.
The TM1651 lib code I attached to this post is identical to the TM1637, I just cut down the demo to simplify testing, & .h include text.
The 'TM1651_HW_Driver.h' file can be deleted (It's unused)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@tonigau and anyone else.
I have a need for a TM1651 library. The datasheet is attached.
Is this very simiar to the TM1637 or TM1638 ? With respect to the communications ( not the physical attributes ) - which is best to start with? And, is this something that you could adapt for me? Then, I can test and complete the testing here.
Most grateful.
Evan
Hello Evan,.
The interface data format looks identical to TM1637, & control registers as well (except only 4 digits).
Referring the datasheet the display address starts at 00 (TM1637 start = C0
So as a first test, try the attached after setup for your hardware in "tm1651 Test1.gcb" & see how it goes...
If digit pins are swapped(like some module boards) the ReMap will need activating & Table Digit_ReMap configured.
Excellent start for me.
I will test and report back.
I like re-use!!!
I suspect there may be an error in the datasheet.
It shows the display address in section 7.2 as 00H - 03H, then mentions address 0C4 & above are invalid.
Looking at https://github.com/freekode/TM1651 it uses 0xC0 in TM1651.cpp
If you get a nogo try changing back to TMaddr 0xC0
are you driving 7seg's or Bargraph ?
Last edit: ToniG 2023-05-06
Good - not quite there.. but, good.
Driving 3 x 7 segments.
0XC0 works - well done
The issues are the decimal points are always on - The two right 7 segs.
Sending
tmSndDig(0, Cnt1)
does not clear. Note the0
. The left 7 decimal point does not operate - at all.Here is the actual 7seg info. https://github.com/coopzone-dc/GotekLEDC68/wiki
Looking at the sch for the board, dp is connected to seg 5.
This shouldn't be causing your issues but set #Define
TM_DispLen 3
Try slowing down your program with a wait 1000ms to see each digit being written en it should.
Do all segments come on at power up ? & then clear. (if you are running the supplied test program.)
Sending a 0 byte with tmSndDig should clear the digit. (this is what tmCLRdisp uses)
Have you got a delay after the display clear(if you have an endless loop it could be writing again the digits)
What MCU are you using?
Please include your program.
cheers
Resolved! Works nicely.
I installed the latest build and it fixed the issue. I guess I had a mix of builds.
I have uploaded the code to GitHub.
https://github.com/GreatCowBASIC/Demonstration_Sources/tree/main/7_Segment_LED_Solutions/7_Segment_TM1651_OEM_Solutions
See
THANK YOU!
Good to see you got it working.
The TM1651 lib code I attached to this post is identical to the TM1637, I just cut down the demo to simplify testing, & .h include text.
The 'TM1651_HW_Driver.h' file can be deleted (It's unused)
I am very grateful. I changed the library to refer to TM1651.
I will delete that extra file.
Great job!