[Swlug] LED drivers (Alan Gray)
Alan Gray
alan at grayhs.org
Thu Nov 28 12:47:43 UTC 2024
Hello Rhys,
It was the article rather than the library that caught my attention. It was the only one I came across that gave a good explanation as to how to communicate with TM1637.
Somewhere else they showed another line split off the DIO via a resistor. It makes sense as DIO acts as both input and output. This is relevant as there is an ACKnowledge output from the TM1637. That means you need to switch your device from output to input and wait for the acknowledge before proceeding. Obviously others are using separate lines for input and output rather than switching a single line.
It seems to me that software might be set up for two or three line operation and I wonder how it handles switching lines between output and input on different hardware. Is this why you had problems with the libraries you tried?
Regards
Alan Gray
On 28 November 2024 00:20:31 GMT, Rhys Sage via Swlug <swlug at mailman.lug.org.uk> wrote:
>Thanks Alan, that's interesting. I had seen that library but hadn't tried it. I'll have to try it over the weekend.
>
>Looking at the article, it says:
>
>"To display a digit, the TM1637 must receive 0x40 first (command 1) then a 0xCX (command 2) where X is the position indicating which display to use. For example, if a digit is to be on the 3rd display, then the second command should be 0xC2. The next byte is the encoded value of whatever character you want to display. Finally, the last byte is 0x8Y (command 3) where Y is the 4-bit brightness of the display."
>
>That, to me, looks as though there's a more complex microcontroller inside the TM1637 chip than I had thought possible.
>
>I just looked at the C++ code for the library and printed it out. I'll have a scan through it maybe tomorrow. What puzzles me though is how to import the code into the Arduino IDE as a library that I can use repeatedly. I'll also have to work out a Python version for the Pi Pico.
>
>At the moment my current project seems to be completing building a coil gun ready for use with a 3D gimbal, sonic rangefinder and to use it to defend my tabletop from some invading plastic soldiers attempting to steal my cup of tea. That's for a YouTube video, of course.
>
>Rhys Sage
>
>
>
>
>
>
>On Wednesday, 27 November 2024 at 08:47:39 GMT-5, swlug-request at mailman.lug.org.uk <swlug-request at mailman.lug.org.uk> wrote:
>
>
>
>
>
>Send Swlug mailing list submissions to
> swlug at mailman.lug.org.uk
>
>To subscribe or unsubscribe via the World Wide Web, visit
> https://mailman.lug.org.uk/mailman/listinfo/swlug
>or, via email, send a message with subject or body 'help' to
> swlug-request at mailman.lug.org.uk
>
>You can reach the person managing the list at
> swlug-owner at mailman.lug.org.uk
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Swlug digest..."
>Today's Topics:
>
> 1. Re: LED drivers (Alan Gray)
>Have a look at <https://www.teachmemicro.com/how-to-use-tm1637-seven-segment-display/>
>
>The info is useful, but beware the ads!
>
>Regards
>Alan Gray
>_______________________________________________
>Swlug mailing list
>Swlug at mailman.lug.org.uk
>https://mailman.lug.org.uk/mailman/listinfo/swlug
>
>--
>Swlug mailing list
>Swlug at mailman.lug.org.uk
>https://mailman.lug.org.uk/mailman/listinfo/swlug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/swlug/attachments/20241128/18c5c219/attachment.htm>
More information about the Swlug
mailing list