Shop OBEX P1 Docs P2 Docs Learn Events
Seven-segment display object — Parallax Forums

Seven-segment display object

SSteveSSteve Posts: 808
edited 2014-07-17 09:12 in Propeller 1
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

Comments

  • Bugman53Bugman53 Posts: 1
    edited 2014-07-13 23:27
    How do i display a decimal point?

    Thank you for your time.
  • abecedarianabecedarian Posts: 312
    edited 2014-07-16 04:14
    Bugman53 wrote: »
    How do i display a decimal point?

    Thank you for your time.
    Convert the number to a string / char array, then find the "." and light the appropriate dot?
  • ChrisGaddChrisGadd Posts: 310
    edited 2014-07-16 09:24
    Just uploaded this seven-segment driver to the obex.

    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.
  • Mark_TMark_T Posts: 1,981
    edited 2014-07-17 01:59
    I usually use Charlieplexing to drive small 7-segment displays, 9 pins total
    for 8 digits (or 8 pins for 7 digits without DP).
  • ChrisGaddChrisGadd Posts: 310
    edited 2014-07-17 09:12
    Shoot, I hadn't even thought about a charlieplexing driver. I'd looked into it a while back for a project with 14 digits, but couldn't spare even that many pins and ended up going with a 7447 BCD-to-seven segment converter and a 74154 four-to-sixteen line decoder. I'd also considered serial shift registers, but didn't have any on hand to test with.


    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.
Sign In or Register to comment.