Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
Surely this splits into two scenarios:-1. If you are talking about output pins then you can/could control this in your main loop - depending on how much tolerance the output devices have in the signals you send them2. If you are talking about input pins then it depends on the maximum polling time of your main code (including any interrupts that might happen). So if you are looking for a very short pulse on an input pin then you might miss it (since you are busy processing interrupts for output pins, timers etc). The decision is made more difficult by the number of potential interrupts and how long it might take to process each one. ie if your mcu spends all of its time servicing interrupts, then it may actually miss some anyway. Hence the need to keep ISRs (interrupt service routines) as small as possible. If the number of interrupts become an issue then consider making your ISR store data in variables (so that it can exit quickly) and then use these variables in your main loop.
I've only ever needed interrupts for use on encoders . . .As for timer interrupts . . . I've never needed them . . . I just poll my timer when I need timing data . . . but polling isn't very useful if you require high precision event timing . . .
Hi Admin:I wrote a how to on interrupts; I sent you an e-mail about posting it on your site but didn't get answer back. In the few post here, there has been so much wrong info. give. Quote from: Admin on June 19, 2008, 03:42:59 PMI've only ever needed interrupts for use on encoders . . .As for timer interrupts . . . I've never needed them . . . I just poll my timer when I need timing data . . . but polling isn't very useful if you require high precision event timing . . .
Quote from: ALZ on June 20, 2008, 12:08:53 AMHi Admin:I wrote a how to on interrupts; I sent you an e-mail about posting it on your site but didn't get answer back. In the few post here, there has been so much wrong info. give. Quote from: Admin on June 19, 2008, 03:42:59 PMI've only ever needed interrupts for use on encoders . . .As for timer interrupts . . . I've never needed them . . . I just poll my timer when I need timing data . . . but polling isn't very useful if you require high precision event timing . . .Why don't you post your How to here then?
If your program does everything you want it to and does it faster than another program then that program is better.
Bumper sensors, counters that have reached a set limit, finishing of an Analog to Digital conversion....