要用freescale codewarrior ide写一个定时中断程序,是用mc9s12dt128b,但是我不知道怎么设置定时器,达到每隔一段时间就执行中断的目的。下面是我写的部分代码
#include <hidef.h> /* common defines and macros */
#include "derivative.h" /* derivative-specific definitions */
int count=0;
void Init (void) {
DisableInterrupts;
}
void main(void) {
/* put your own code here */
Init();
EnableInterrupts;
for(;;) {
_FEED_COP(); /* feeds the dog */
} /* loop forever */
/* please make sure that you never leave main */
}
#pragma CODE_SEG_NEAR_SEG NON BLANKED
interrupt 16 void RTInt (void) {
count++;
}
#pragma CODE_SEG DEFAULT
希望有人告诉我:
1、如何设置定时器的寄存器
或者2、在数据手册中关于设置定时器的介绍在哪里
百度没分了,请高手无私帮助