Author Topic: STM8: New library for TM1637 4-digit LED module.  (Read 1985 times)

0 Members and 1 Guest are viewing this topic.

Offline rhodgesTopic starter

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
  • Available for embedded projects.
    • My public libraries, code samples, and projects for STM8.
STM8: New library for TM1637 4-digit LED module.
« on: February 01, 2019, 07:05:26 pm »
Hey, STM8 fans! I just put up my library code for the TM1637 4-digit LED module on github:
Quote
This library gives you easy control of the TM1637 4-digit LED module. These are very cheap on eBay. I just bought five for 81 cents each. Like my other LED libraries, you get the decimal digits, many alphabetic characters, space, hyphen, and underscore.
https://github.com/unfrozen/stm8_libs/wiki/lib_tm1637:-4-digit-LED-controller

Unlike the TM1638 controller used on a lot of 8-digit LED modules, this controller uses a variation of I2C. There is no slave address, so you can't share the bus easily. And where I2C sends the high bits first, this takes low bits first. Start, stop, and ack are compatible with I2C.

Here is my test / example code:
https://github.com/unfrozen/stm8_tests/blob/master/test_tm1637.c

So far, my libraries for cheap I/O include three LED controllers (max7219, tm1637, tm1638), generic LCD (2x16 to 4x20) modules, generic matrix keypads, ultrasonic range finder, and rotary encoder. Does anyone have suggestions for other cheap and useful things to connect?
Currently developing STM8 and STM32. Past includes 6809, Z80, 8086, PIC, MIPS, PNX1302, and some 8748 and 6805. Check out my public code on github. https://github.com/unfrozen
 
The following users thanked this post: elecdonia


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf