Shop OBEX P1 Docs P2 Docs Learn Events
TM1637 I2C interface with BS2 family - help needed — Parallax Forums

TM1637 I2C interface with BS2 family - help needed

I recently got a pair of 6-digit serial displays utilizing the TM1637 control chip. I find all kinds of examples on-line but ALL use an Arduino. Does anyone have any code examples of how to use a BS2 series to drive it? A pix of the display board is attached.


  • I've written code for a similar display using the Propeller, but never a BS2. As Spin is much easier to understand than Schmarschmino C++, maybe the attached code will help you. The interface is kind of like I2C -- but not I2C. Since I2C (slow) is possible with the BS2, you may be able to pull this off.

  • I appreciate your response but am NOT a good code writer. I barely understand the Propeller (or Arduino or Pi or etc). Standard look-alike Basic is as deep as I can master.
    But thanks anyway. I'll just hold my breath until someone with my capabilities has an answer I can understand.
    Have a great day Jon.

  • JonnyMacJonnyMac Posts: 8,918
    edited 2023-05-21 21:57

    am NOT a good code writer.

    And you never will be unless you put on your big-boy pants and write more code. Yeah, I know it can be hard. There is no way around that, so you sometimes have to plow through it. Give it a try. It's fun.

    until someone with my capabilities has an answer I can understand.

    Wait, what?

    I thought I'd put on my own big boy pants and give it a try. I made it work. The only TM1637 display I have handy is a spare from a prop I coded (P1) for a TV show, so this example only uses 4 digits, but the code should work with any TM1637 display.

    EDIT: While fixing a "gotcha" I tried SHIFTOUT (versus a code loop); it works and improves display speed by a large margin.
    EDIT 2: Morning after review. Added comments. Added routine to write whole display. Demonstrates pre-built messages in DATA tables.

    480 x 640 - 147K
  • Jon -
    I very much appreciate your help. I'm much older than you think and in pre-A decline. Tried learning C++, Python, and the variants that make up the new world but simply couldn't get good enough to remember command structures and syntax like I used to. But, BS2 basic look-alike is still imprinted and possible for me. Old dog and no new tricks but still enjoy what I can handle. I'm wearing my big boy pants but sometimes I still can't find my way home (mentally).
    Thanks again for the help and being part of this community.

  • PS Jon:
    BTW, have a look at the forum topic "Are there still active Basic stamp users here?". My last three projects are there with pix. Not dead yet, but can still wield a mean soldering iron.

  • JonnyMacJonnyMac Posts: 8,918
    edited 2023-05-21 21:25

    Sorry to learn of your struggles. When cancer spread to my best friend's brain he asked me to keep an eye on him and teach him everything I could -- even though he had just months to live. For him, giving up on learning (something he dearly loved) meant a surrender to the cancer, something he could not abide.

    Good luck to you. Keep learning. Keep living.

Sign In or Register to comment.