mcauser / micropython-tm1638

MicroPython driver for TM1638 dual quad 7-segment LED modules with switches
MIT License
28 stars 15 forks source link

Common anode seven-segment displays are showing garbled characters. #4

Open maxadc opened 1 year ago

maxadc commented 1 year ago

电路图:https://mega.nz/file/kjN11LYT#6cBTBc2qtN3b1zZoZwOlvEIwgFWEGEINRQoPTtnvLSE

A very good library, the code is written beautifully. However, when I tested it, there was a problem. Since my library is for common anode seven-segment displays, it does not match the code. Even if I try to invert the _SEGMENTS, the display still shows garbled characters.

一个非常好的库,代码写很美。我测试了一下,有个问题。 由于我的库是共阳级数码管,和代码不匹配,我将_SEGMENTS取反测试依然不行。数码管乱码

mcauser commented 1 year ago

That is unfortunately the correct behaviour for this library. It was designed to work with common cathode display modules.

It'll need a significant rewrite to support both common cathode and common anode displays.

In common cathode, one byte of _SEGMENTS represents a single 8. 7-segment character. In common anode, the same 7-segment character is spread across 8 bytes.

Same issue as #2