我用的是mplab ide 6.60+HT-PIC v8.01PL3 我编了个简单的time0定时中断程序,但是中断服务程序怎么无法进行编译,就是中断服务程序无法生成汇编代码。我用HT-PIC v8.01PL3 自带的timer0.c例子也不行。
#include <pic.h>
/*
* Example code for using timer0 on a 17C756
* Just sets up a 1 second interrupt and increments a variable
*/
/*
* Calculate preload value for one second timer
*/
#define PERIOD 1000000 // period in uS - one second here
#define XTAL 4000000 // crystal frequency - 4MHz
#define ICLK (XTAL/4) // crystal is divided by four
#define SCALE 16 // prescale by 16 - check for overflow!