??? 07/21/05 01:14 Read: times |
#97705 - Timer ISR Pretty Long Responding to: ???'s previous message |
I would also set a flag in the timer ISR and then exit, then check the flag in the main loop and process the remainder of the function (check port pins etc) in another function. ie
"NOT REAL CODE" Timer-ISR(){ SetFLAG } Main(){ if SetFLAG(){ Clear SetFLAG Call WalkFunctions() } } WalkFunctions(){ stuff to make device walk (cut and paste mainly from your timer ISR) } In this manner you are not reliant on the interrupts, if you want to use another interrupt the way it is at the moment you may have issues with interrupt priorities etc. Regards Marshall |