??? 12/12/05 08:44 Read: times |
#105064 - Two questions in one Responding to: ???'s previous message |
Timers are useful for generating clock signals and measuring the time between events.
Interrupts are used to let the microprocessor handle two (or more) tasks quickly and efficiently. Interrupts are not the only way of handling two tasks, which can be done with code like this. while(true) { doTaskA(); doTaskB(); } This isn't flexible or efficient because each task function can only do a bit of work before it has to return, so that the task function gets a slice of processing time. If a task needs to run at a steady frequency, such as an ADC conversion, then using a timer to generate an interrupt is the best solution. |
Topic | Author | Date |
interrupt questions | 01/01/70 00:00 | |
the first interrupt you need to use is t | 01/01/70 00:00 | |
interrupt examples | 01/01/70 00:00 | |
C or ASM | 01/01/70 00:00 | |
I don't think it does! | 01/01/70 00:00 | |
Two questions in one | 01/01/70 00:00 | |
flexible or efficient | 01/01/70 00:00 | |
It's all relative.![]() | 01/01/70 00:00 |