Skip to content

Driver for 8 segment LED and key scan circuits from Titan Micro

License

Notifications You must be signed in to change notification settings

rustrum/tmledkey-hal-drv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Titan Micro LED controller driver

crates.io Released API docs

Titan Micro is a Chinese manufacturer that produce several type of controllers for 7 segment LED displays with additional keyboard key scan functionality.

At least next controller variants are exist on the market:

  • TM1636 - 2 wire interface, 4 displays, 16 keys
  • TM1637 (popular) - 2 wire interface, 6 displays, 16 keys
  • TM1638 (popular) - 3 wire interface, 8 displays (10 segments), 24 keys
  • TM1639 - 3 wire interface, 8 displays (12 segments ?), 8 keys
  • TM1640 - 2 wire interface, 16 displays, no keys

This driver implements low level functions to send/read data with 2 or 3 wire interface. User friendly API would be implemented for popular controller models later.

Project status and future plans

Available functionality:

  • Support 2 and 3 wire interfaces, tested on TM1637 and TM1698
  • Writing bytes to MCU
  • Reading key scan bytes from MCU
  • Basic utility and animation features are present

Hardware crate was tested on:

  • TM1637 clock module
  • TM1638 module with 8 displays, 8 buttons and 8 additional LEDs
  • STM32 Blue Pill
  • Raspberry Pi

Current functionality looks stable, but implementation is extremely low level. That is mostly because I see no reason to do more friendly API until HAL and it's implementations would stabilize. Right now my goal is to keep it stable and working between HAL updates.

I really do hope that complexity of API is not a big issue. Current HAL state and embedded programming is suited only for hardcore, crazy, masochist developers who should be OK with my code.

Examples

This is how code from examples works.

Click on image to view animation.

TM1637 example

TM1638 example

Licensing

This product is licenses under almost MIT license but with plumbus exception.

About

Driver for 8 segment LED and key scan circuits from Titan Micro

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages