Shop OBEX P1 Docs P2 Docs Learn Events
LED Display Drivers — Parallax Forums

LED Display Drivers

ArchiverArchiver Posts: 46,084
edited 2003-01-29 05:28 in General Discussion
Hello: Anyone with experience driving 7 segment LED displays using
the Micrel MM5450 or similar chips. I'd be most interested in sample
code and experience whether or not it's worth the hassle using the
chips. Thanks

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-01-29 05:28
    From: <rgolub@l...>
    > Hello: Anyone with experience driving 7 segment LED displays using
    > the Micrel MM5450 or similar chips. I'd be most interested in sample
    > code and experience whether or not it's worth the hassle using the
    > chips. Thanks

    Sure, they're pretty easy to use. They are best when used with non-standard
    displays, when non-numeric characters are desired, and when individual LEDs
    are being driven. If you just want to drive a display with numbers, you
    might prefer a BCD to 7-seg chip.
    Anyway, here's the code I use for this chip:

    Low CSpin ' Data Enable, CS line low
    Shiftout DATpin, CLKpin, MSBFIRST, [noparse][[/noparse]1\1, Number\16, Number2\16, Number3\3] '
    Output display data
    High CSpin ' Data disable, CS line high

    The 1\1 is the start bit and Number, Number2, and Number3 contain the data
    to be displayed. Three variables are required because the Stamp can only
    shiftout 16 bits at a time, and max variable size is 16 bits. One thing
    you'll want to watch is how many bits you shiftout. You have to use exactly
    36 bits, or you'll get erratic results even if you aren't driving all 35
    outputs.

    - Robert
Sign In or Register to comment.