I am new to programming embedded systems, so any help is appreciated with my question. My task is to program (in C) a timer that counts up on a 7 segment common cathode display such that it will read for example: 000, 001, ..., 010, 011, ... 110, ... 999
I am displaying all 3 digits at the same time via multiplexing with 3 N channel MOSFETs, by quickly switching on and off the gates of the MOSFETs (via GPIO).
What I have so far:
- I have code that will make a timer for one digit; it displays and increments 0 to 9 but for 1 digit
- I also have code that will switch on/off GPIO pins (including the MOSFET gates and each segment of the display
What I am missing is how I can put this all together so that will become what I want. The best I have gotten is that one digit will light and count 0 - 9, then it turns off. Then the next digit will light up and count 0 -9, then it turns off and etc.
Any tips? Not exactly looking for entire code write up, just maybe an outline of steps I can take.