Hello.

I want to drive 4 digit 7 segment led display directly with 16F870, without using MAX7219, HC595 or any other IC. I know how to wrote the needed code and when launched in loop, it works just fine. However, this code needs to be run constantly, to maintain the display reading. So, how to run other tasks together with this code? as I understand, I need to set up an timed loop interrupt, so my main code is interrupted 25 times per second (to avoid the flicker) and lcd indication code is launched?

I need a hint, how to set-up hardware in such way, that say MAINLOOP code is interrupted 25 times a second and DISPLAYLED code launched, completed and then execution returned to MAINLOOP.