I have input pins on a 8051 based micro, that test whether to increment or decrement from a value displayed on 7-segements . After I've decided that the counter should be incremented for example, I'm wondering what's the best way to determine what digit I'm currrently on and display the next.
I'm thinking a separate variable which I increment and decrement which I can test to see what number I'm on, but I'd like to know if there's better ideas before i start, since these counter projects are common.
I'm thinking a separate variable which I increment and decrement which I can test to see what number I'm on, but I'd like to know if there's better ideas before i start, since these counter projects are common.
Last edited: