0 Members and 1 Guest are viewing this topic.
Quote from: scrat on December 09, 2010, 06:02:30 pmQuote from: FreeThinker on December 09, 2010, 05:27:04 pmQuote from: scrat on December 09, 2010, 02:29:44 pm@Hypernova:In interrupt routines, even if they take some time to execute, time distance between successive executions remains the same, provided that you don't use jumps to different length code branches. This is especially important for control purposes, where different sampling/refresh periods can be an issue.The LENGTH of time the interrupt takes is also crucial. If it takes 10ms to service your ISR and the interrupt interval is 8ms then you either REstart your Interrupt (endless loop) or more likley IGnore the interrupt until the 1st one finishes, time till next interrupt is then twice the 8ms expectedI was assuming one would not demand a processor to do in 8ms a 10ms task, of course. Although sometimes it is quite difficult to say how much a particular process will take to execute, while the timing constraint may be already known.If it's too much work load you should package the work and throw it to a lower level and reduce you loop speed to longer than 10ms, so you don't hog the cpu. Otherwise you need to find a time machine.
Quote from: FreeThinker on December 09, 2010, 05:27:04 pmQuote from: scrat on December 09, 2010, 02:29:44 pm@Hypernova:In interrupt routines, even if they take some time to execute, time distance between successive executions remains the same, provided that you don't use jumps to different length code branches. This is especially important for control purposes, where different sampling/refresh periods can be an issue.The LENGTH of time the interrupt takes is also crucial. If it takes 10ms to service your ISR and the interrupt interval is 8ms then you either REstart your Interrupt (endless loop) or more likley IGnore the interrupt until the 1st one finishes, time till next interrupt is then twice the 8ms expectedI was assuming one would not demand a processor to do in 8ms a 10ms task, of course. Although sometimes it is quite difficult to say how much a particular process will take to execute, while the timing constraint may be already known.
Quote from: scrat on December 09, 2010, 02:29:44 pm@Hypernova:In interrupt routines, even if they take some time to execute, time distance between successive executions remains the same, provided that you don't use jumps to different length code branches. This is especially important for control purposes, where different sampling/refresh periods can be an issue.The LENGTH of time the interrupt takes is also crucial. If it takes 10ms to service your ISR and the interrupt interval is 8ms then you either REstart your Interrupt (endless loop) or more likley IGnore the interrupt until the 1st one finishes, time till next interrupt is then twice the 8ms expected
@Hypernova:In interrupt routines, even if they take some time to execute, time distance between successive executions remains the same, provided that you don't use jumps to different length code branches. This is especially important for control purposes, where different sampling/refresh periods can be an issue.