multiplex is a bit slower I see some flickers
the refresh rate is 8mS to speed it up to 4mS change timer1_reload to 33543


if I put in to the "value" variable mumber "1234" the display shows "4321"
sic

the digit scan direction can be reversed easily and would result in even smaller code

the difference with this method is that the mcu can now do other tasks and not spend all its time being just a display controller