??? 04/05/09 12:37 Read: times |
#164349 - how to avoid timer interrupt interrupts serial communication |
I am doing a project which need to use timer interrupt to moves the stepper motor and at the same same time need to receive data form serial port(to analyze the receive data for movement direction).
I design the code into 2 parts using C(Keil C51) :Main is to receive data and when timer interrupt occurs it jumps into ISR to moves the motor. when i use the timer interrupt some of the portion of data losses which makes my code stuck initially. I would like to know is there any method or advise in avoiding serial data loses when interrupt occurs> |