Menu

TM1651

Anobium
2023-04-27
2023-05-10
  • Anobium

    Anobium - 2023-04-27

    @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

     
  • ToniG

    ToniG - 2023-05-06

    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.

     
    • Anobium

      Anobium - 2023-05-06

      Excellent start for me.

      I will test and report back.

      I like re-use!!!

       
  • ToniG

    ToniG - 2023-05-06

    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
    • Anobium

      Anobium - 2023-05-08

      Good - not quite there.. but, good.

      Driving 3 x 7 segments.

      0XC0 works - well done

      #Define TMaddr   0xC0  
      

      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.

      Here is the actual 7seg info. https://github.com/coopzone-dc/GotekLEDC68/wiki

       
  • ToniG

    ToniG - 2023-05-09

    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

     
  • Anobium

    Anobium - 2023-05-09

    THANK YOU!

     
  • ToniG

    ToniG - 2023-05-09

    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)

     
  • Anobium

    Anobium - 2023-05-10

    I am very grateful. I changed the library to refer to TM1651.

    I will delete that extra file.

    Great job!

     

Log in to post a comment.