Anyone have any example code?
This uses interrupt routines and Timers as one example.

http://www.picbasic.co.uk/forum/cont...le-LED-flasher

Have you considered Persistence of Vision? Some visual routines use this by changing a display at 60Hz so the display looks static but other parts of the program are executing many times in between the display refreshes, changing another LED for example.

Clear as mud?
It is just a case of perception it is not real magic just an illusion!