Optimal solution: don't do it. You can spare a few resistors, cannot you?
Suboptimal solution #1: run the leds hot. leds at 15ma are roughly as bright as leds at 20ma or 25ma, etc.
Suboptinal solution #2: dynamically alter the display duration based on the number of segments lit. If you are lighting up two segments, "1" for example, display it for 1ms; if you are lighting up 5 segments ("5"), you display it for 2ms. This can be easily done with an array and loading up the timer offset / top in the isr.
Easy:
Optimal solution: don't do it. You can spare a few resistors, cannot you?
Suboptimal solution #1: run the leds hot. leds at 15ma are roughly as bright as leds at 20ma or 25ma, etc.
Suboptinal solution #2: dynamically alter the display duration based on the number of segments lit. If you are lighting up two segments, "1" for example, display it for 1ms; if you are lighting up 5 segments ("5"), you display it for 2ms. This can be easily done with an array and loading up the timer offset / top in the isr.
一周热门 更多>