I'm looking to build a set of gauges that display values using 7-segment LEDs. Each set will display four different numbers (like temp, voltage etc) simultaneously, so I'll need 10 7-segment LEDs (2x 2-digit and 2x 3-digit).
I know the MAX7219CNG can drive up to 64 LEDs, so I'll need more than one. But do I need one chip per number (so four in total), or can one chip handle two values simultaneously?
Thanks all. I found the pinouts for the chip and discovered that there's an individual pin per digit, then pins for the A-G segments, so it's just a matter of finding the right tutorial to get my head around all the available options. Last time I played with segment LEDs I was using shift registers, so this chip is a new method for me.
The datasheet will show you how to wire your custom display.
Nevertheless I would start with a module like suggested by TomGeorge.
You can proof your software with the premade module.
Afterwards switch over to your custom build.
The trick is to use two of the modules illustrated, use only the digits in the places you need, and mask out the other digits so you have the appearance of four separate displays where there are actually only two.
Thanks all for the support, and thanks especially to noiasca for his library that expands the LEDControl options. I already had components at hand, so I've been able to build a breadboard prototype to explore a few options
All it does is measure values from a pair of voltage dividers and show them in different numbers, but ultimately that's all I need to do. The unused numbers will measure a third variable resistor, and the fourth numbers I need will be shown on a separate 3-digit display, driven either by another max7219 or maybe just using a shift-register-based solution.
With a little creativity, you could show 9 digits with one MAX7219, using the DP from each digit for the segments of the 9th digit. (9 x 7 = 63, so there is even one bit to spare).
You'd have to wire up your own digit, a premade board won't do it.
Thanks for your helpful comments noiasca. About this:
It works, but the behaviour is subtly different. With dtostrf I am declaring 4 characters (inlcuding the decimal point), which places the float character on the right digit of my 3-digit display at all times, even if the number is less than 10. With lc.print, the left digit always takes priority, so the right digit is blank/off if the number is less than 10. For my purposes I'd rather keep the dtostrf behaviour.