7-Segment Display -- Eight Digits


You want digits? Okay, we've got digits! And easy as can be, thanks to the MAX7219 driver chip. In fact, only three port lines are consumed in the process.

This demo is quite remarkable for several reasons. First off, the MAX7219 really is a cool integrated circuit, tremendously reducing both the wiring and the software simultaneously. You'll note in the photo that I'm using a prefab module I picked up from Amazon for less than five bucks. It includes the chip and LED displays mounted on a nice PCB, and even comes with four standoffs and machine bolts. Here's a link, but there are a number of dealers offering this module.


With the module, the schematic is crazy simple:


Next, the source code ought to be a revelation to you. Included with it is a versatile unit I've written to really puts the MAX through its paces. You'll be able to access any digit and/or any segment, change the intensity, blink things, right and left justify the numbers, write in hexadecimal and much, much more. Be sure to read over the MAX7219 unit, for it's heavily documented with lots of helpful advice. Note that it itself calls upon a font unit, which I've also included. Of course, you can even add in any special characters you might have in mind.

Something interesting to note is the the output of the program can be assigned to the standard WRITE() and WRITELN() procedures. Hence, what you'll read in the source code looks like standard Pascal! Just as if you were writing things to a monitor or printer. All data types are accommodated, too.

Click to get the source code.
Click to get the schematic PDF.

Next Project: Text LCD -- via PMP Unit

No comments:

Post a Comment