A simple single digit seven segment display

dhenry:
I will give you a skeleton:

  1. define a bunch of macros to turn on / off segments / digits. Those macros are Common Cathod or Common Anode aware.
  2. use a routine to initialize all pins.
  3. write a code that upon each call, display one digit from a buffer, and rolls over to the next.
  4. set up a timer, pointer a function pointer to the routine in 2) above.
  5. in the timer isr, execute the function pointer (now pointing to the routine in 2)).

Once that is up, the entire display function is transparent to the user. All the user code needs to do is to fill the buffer as needed and the display routine will update the buffer automagically.

Thank you so much @dhenry! Thank you for the support! I will go by what you said!