#include <pic.h> void interrupt Isp()//**************TMR0中断数码管扫描程序********************* { if(T0IE && T0IF) { T0IF=0; //清除中断标志位 {
static int counter=0; static int flag=0; counter++; if(counter>141) { counter=0; if(flag==0) { output_C(0); flag=1; } else { output_C(0x0f); flag=0; } } } //***************TMR0初始**************************
void tmint() { T0CS=0; //TMR0工作于定时器方式 PSA=1; //TMR0不用分频 T0IF=0; //清除TMR0的中断标志 T0IE=1; //TMR0中断允许 void main() { TRISC=0; //C口输出 TMR0_INIT(void) while(1) { }
}
请各位指教了.上面的 编不过发出这样错误 是怎么一回事啊 清除: 正在删除中间文件和输出文件. 清除: 删除的文件 "E:c.mcs". 清除: 完成. Executing: "C:Program FilesHI-TECH SoftwarePICC9.50BINPICC.EXE" -C -E"zhogduan.cce" "zhogduan.c" -O"zhogduan.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F877A Advisory[1207] : some of the command line options you are using are now obsolete Advisory[1208] : use --help option or refer to the user manual for option details Warning[176] E:zhogduan.c 46 : missing newline Warning[349] E:zhogduan.c 4 : non-prototyped function declaration for "" Warning[349] E:zhogduan.c 4 : non-prototyped function declaration for "Isp" Warning[361] E:zhogduan.c 19 : function declared implicit int Error[195] E:zhogduan.c 32 : expression syntax Error[228] E:zhogduan.c 34 : illegal character (037777777643) Error[228] E:zhogduan.c 34 : illegal character (037777777673) Error[228] E:zhogduan.c 35 : illegal character (037777777643) Error[228] E:zhogduan.c 35 : illegal character (037777777673) Error[228] E:zhogduan.c 36 : illegal character (037777777643) Error[228] E:zhogduan.c 36 : illegal character (037777777673) Error[228] E:zhogduan.c 37 : illegal character (037777777643) Error[228] E:zhogduan.c 37 : illegal character (037777777673) Warning[361] E:zhogduan.c 41 : function declared implicit int Error[195] E:zhogduan.c 41 : expression syntax Error[312] E:zhogduan.c 44 : ";" expected Warning[337] E:zhogduan.c 45 : line does not have a newline on the end Halting build on first failure as requested. BUILD FAILED: 这是怎么一回事 |