??? 03/03/10 22:44 Read: times |
#173802 - Use a dedicated timer Responding to: ???'s previous message |
If you have a spare timer, just reset on each call.
If you are busy using every timer, you will do something like: alarm = T2L + ticks; while (T2L != alarm) ; If your timer is not being prescaled, you can miss the equality. And the macro gets complicated if you have to account for timer-wrapping. So life is a lot easier with a dedicated timer. David. |
Topic | Author | Date |
fixed length delays in C | 01/01/70 00:00 | |
Can't do it without assembly. | 01/01/70 00:00 | |
HLL gives no guarantees | 01/01/70 00:00 | |
Using a timer in C | 01/01/70 00:00 | |
overheads | 01/01/70 00:00 | |
Use a dedicated timer | 01/01/70 00:00 | |
non-functional code | 01/01/70 00:00 | |
Interrupts aren't the biggest problem ... | 01/01/70 00:00 | |
break apart![]() | 01/01/70 00:00 |