Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/05/09 18:31
Read: times


 
#164361 - Not sure, whether I got you...
Responding to: ???'s previous message
Benny said:
As timer interrupt occurs, it interrupts the serial communication. I am now looking for any suggestion..

Hhm, if you poll the RI flag of UART in the stepping routine at least every 1msec (10bit at 9600 Bds) without using a serial transmission interrupt and allow the stepping routine to be interrupted by the timer interrupt only for outputting the phase control bits, then no transmitted byte should get lost. Keep the ISR much shorter than 1msec, though. Well, whether this works depends also on the rest of code, of course.

Take care that the motor timing for the 4 phases per step isn't corrupted, because this can result in an ugly sound...

Kai


List of 40 messages in thread
TopicAuthorDate
how to avoid timer interrupt interrupts serial communication            01/01/70 00:00      
   Here the timing is relevant!            01/01/70 00:00      
   how to avoid timer interrupt interrupts serial communication            01/01/70 00:00      
      reply Kai            01/01/70 00:00      
         Do ms-class delays in any interrupt.            01/01/70 00:00      
            re: Per Westermark            01/01/70 00:00      
               ISR frequency * time significantly below 100%            01/01/70 00:00      
               Not sure, whether I got you...            01/01/70 00:00      
               That is not the main problem            01/01/70 00:00      
                  It's a common mistake...            01/01/70 00:00      
                     oops            01/01/70 00:00      
                        Long ISRs are no problem, unless...            01/01/70 00:00      
          instruction execution cycle/time in C language            01/01/70 00:00      
   ISR is set to 1ms but...            01/01/70 00:00      
      That is the problem            01/01/70 00:00      
         oops            01/01/70 00:00      
            What is the baud rate?            01/01/70 00:00      
               9600 baud            01/01/70 00:00      
                  He has got to be sitting in a interupt            01/01/70 00:00      
                     reply            01/01/70 00:00      
                        Many many more details needed!!            01/01/70 00:00      
                           reply Kai            01/01/70 00:00      
                              Further questions...            01/01/70 00:00      
                                 reply Kai            01/01/70 00:00      
                                    Who tells your micro how the stepper is to be moved?            01/01/70 00:00      
                                       reply            01/01/70 00:00      
                                          So, the stepper is running all the time?            01/01/70 00:00      
                                             ya...this is the purpose of having interrupt            01/01/70 00:00      
                                                Ok, then confirm this please...            01/01/70 00:00      
                                                   reply Kai            01/01/70 00:00      
                                                      Still delays in the ISR?            01/01/70 00:00      
                                                         reply per            01/01/70 00:00      
                                                      I suspect that your ISR is longer than 1msec!            01/01/70 00:00      
                                                         reply            01/01/70 00:00      
                                                         ISR code            01/01/70 00:00      
                                                            Post full ISR            01/01/70 00:00      
                                                               reply            01/01/70 00:00      
                                                                  Still not full ISR shown - and debounce?            01/01/70 00:00      
                                                                     Addendum            01/01/70 00:00      
   T_T            01/01/70 00:00      

Back to Subject List