You do not say anything about the processor you want to use, but on it's product website under the tools and software section you can download code examples that also contain some for the timer with interrupts.
↧