-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redefine Pins #30
Comments
Hello Ngsjo, At the moment there is no specific API in the library for using a modified segment order. The library kind-of expects the segments to be wired up correctly. Depending demand I may implement such API in a future version, but this won't be very soon. So you may need to make some modifications yourself, for which I'll give you some suggestions. The pin definition is primarily hardcoded in the font (see TM16xxFonts.h). So you could change the font to get the desired result. (First focus on only the numbers in TM16XX_NUMBER_FONT). A more evolved method is implemented in the TM1640Anode class. There a mapping function maps the segments in different order using these functions: If you're a programmer, you could use the TM1620 class as a base and make a derived TM1620ngsjo class that overwrites the setSegments() or the sendChar() method, to change the order of the segments (or perhaps also the position of the digits). Using such class allows you to still use all the features in the library without further changes. |
Hello, I'm looking for where the pins are defined. We have a custom application for the 1620 chip and the pins are defined differently. I'm trying to figure out where in the library to redefine which segment of the display each output pin is connected to.
For whatever reason this is how the PCB designer set it up.
1620 PIN Segment
2 A
3 F
4 B
5 G
6 C
7 DP
8 D
9 E
The text was updated successfully, but these errors were encountered: