Maxim7219 LED Driver Object
Nick McClick
Posts: 1,003
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
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;
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
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;
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is no problem that can't be solved with a suitable amount of explosives!
EOD Memorial
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
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
·
edit: posting my code, which includes a random function using jkiss32 and real random...
demov2-bst-archive-120206-094802.zip