[quote:cbb73cfe46="Arera"]Never loop nor wait in a sub. You need to shift all the logig back into the main loop. [/quote:cbb73cfe46]
Your advice is bare nonsense, and as you do programming long enough, you should know better.
Of course one can work with waits and loops in subs of functions. Wether one would do that, depends on the actual situation.
For example, how do you think GetADC() works? It loops till ADSC is reset again. Bascoms LCD routines wouldn't work, if they have no waits in them, a.s.o.
Don't you mistake that with ISR's? There one should never loop nor wait.
↧