Seven-segment display object
SSteve
Posts: 808
Here's a general-purpose seven-segment display object. It will control from one to eight digits.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows
links:
My band's website
Our album on the iTunes Music Store
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows
links:
My band's website
Our album on the iTunes Music Store
Comments
Thank you for your time.
This driver works with any number of digits, digits must be on contiguous pins, with the low digit on the low digit-select pin.
The segments are also required to be on contiguous pins, but the order can be re-arranged by editing a lookup table.
Reads characters from a text string to write to the display, numbers "0" through "9", minus "-", decimal point ".", and space " " are recognized.
Includes methods for creating a string from integer values, or from an integer with a divider to a specified number of decimal places.
Works with common-anode and common-cathode displays, and also with transistor-driven displays.
for 8 digits (or 8 pins for 7 digits without DP).
Okay, just added a Charlieplexer to the obex. Nine pins gets you nine 7-segment displays with decimal points, additional displays require additional pins. This driver supports as many displays as you have pins for. Tested it with 10 displays with no noticeable flicker.