This is a circuit I built for a replica of a PKE meter from the cartoon Extreme Ghostbusters.
The array has eight 10-segment bargraphs, of which 8 leds in each are used. One bargraph is lit at a time in this setup, so you can think of each bargraph as a row in your typical multiplexing setup.
The array is updated at 70hz, and as you may notice some of the leds are brighter than others. That's because I'm not simply multiplexing the array. I'm also doing a form of pulse width modulation across the entire array.
At 70hz, each column is lit for 1/640th of a second. That's 1792 microseconds, which divided by 256, is approximately 7 microseconds. Multipying 7 microseconds by the brightness level I want then gives me the length of time each led should be on during that 1792 mirosecond period in which a column may be lit.
In order to update all of this fast enough, I had to write my own slimmed down version of the digitalwrite function. Then, before updating each bargraph I put the time at which each of the 8 leds needs to turn on into an array and sort them from shortest to longest, so I don't have to loop through all of them checking to see if it is their time to shine.
I turn them on at the end of their cycle rather than the beginning because I found it gave better results as far as getting a consitent brightness with the dimmest leds. However, as you can see above, there is a bit of a gradient on each bargraph at the lowest brightness level.
That's because I made a mistake when designing the cicuit, and thought I was going to be able to put 160mA through the array. It turns out, the number was closer to 50mA, which was way less than I needed. I managed to bypas the Pro Mini's voltage regulato with minimal modifications to the board, but I then hit the limit on what the AtMega could handle, and in the end, even after shaving off a few mA here and there, I still only managed to get 100mA through the display. Which was enough to light it nicely, but not enough to get really good reproduction of 256 different brightness levels.
However, it turned out that the lowest brightness level created a nice color gradient due to how I update only one led in the bargraph each time through my loop that checks when it's time for the leds to turn on, and that looked cool enough, even if it wasn't entirely accurate and you couldn't really see the fade-in as well as I'd hoped.
Oh well, lesson learned! I spent four months designing this with little to no experience desgining circuits previously, so I can be forgiven if I made one or two little oversights but still ended up with something that looks way better than the dude that paid for it thought he was gonna get.