Shop OBEX P1 Docs P2 Docs Learn Events
Maxim7219 LED Driver Object — Parallax Forums

Maxim7219 LED Driver Object

Nick McClickNick McClick Posts: 1,003
edited 2012-02-05 10:15 in Propeller 1
Thought I'd share a little object I've been working on - it's for using a Maxim 7219 Serial LED driver. It the same chip used in the 8x8 matrix display I've had for a while
4730165401_7704a6be12.jpg
I'm using it for a distance alarm in the garage, that's why the ping is on the bottom.

While there's Arduino and PICbasic sample code, I couldn't find any Propeller code, so I wrote my own. The code is pretty rough, but it works. It's specifically designed for the 8x8 matrix display (it puts the chip in direct address mode), but it will work with anything else that uses the Maxim7219, too. It's 100% spin and uses 60 longs. I've tested it at RCFast to 80Mhz without problems.

Object is attached, it includes a demo. I did a video of the demo right here;
4730841084_904cac6451.jpg

Methods;
init: set the scanline, address mode, and display mode. Clear the screen
drawpoint(row,col): clear the screen and draw a single point
clearscreen: clear the screen
sendframe(frameptr): Draw a frame consisting of 8 contiguous bytes starting at frameptr
turnoff: Put the display into shutdown mode

Any feedback would be helpful. A few pending features include multi-panel support and intensity control. Once I give it another go, I'll submit it to the obex.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Forums RSS Feed!

Gadget Gangster - Share your Electronic Projects

Comments

  • eod_punkeod_punk Posts: 146
    edited 2010-06-24 22:39
    I found a demo for the 7219 using the BS2_functions object, but don't recall who made it as its not in the file, its for send numbers to a 7 segment display. Do you have any plans for making a full fledged object for the 7219 to include sending numbers to 7 segment displays or just for the LED matrix? Looks real nice so far.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There is no problem that can't be solved with a suitable amount of explosives!

    EOD Memorial
  • Nick McClickNick McClick Posts: 1,003
    edited 2010-06-25 16:09
    It will work with a seven seg display, but only in direct address mode (where you specify each segment to be illuminated). Supporting the 'Code B' decode mode is easy, though, I'll add that in.

    I couldn't think of any other methods to add for drawing on the LED matrix. Anything else? Maybe 'rectangle' for drawing a box, or 'line' for a line? Not sure if they'd be helpful.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Forums RSS Feed!

    Gadget Gangster - Share your Electronic Projects
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-06-26 00:36
    eod_punk,

    I have written several programs using the MAX7219 with 7-segment displays. One was recently published in Nuts & Volts and on Savage Circuits TV; Digital Alarm Clocks, and in the past the Binary Digital Clock used the same chip and setup. I find it an excellent IC to use for projects that require more than 4 digits.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • rogersydrogersyd Posts: 223
    edited 2012-02-05 10:15
    I recently purchased this board and managed to solder it together without too much hassle. I am really enjoying it. The 7219 is a very well documented chip but even without, the posted demo code could get even a noob up to speed very quickly. For the folks looking for a reasonably priced led matrix solution this is a winner. The ad-copy didn't indicate that soldering the headers on to the board was required but I may have just missed it. Good times.

    edit: posting my code, which includes a random function using jkiss32 and real random...
    IMG_5980.jpg

    demov2-bst-archive-120206-094802.zip
Sign In or Register to comment.