void interrupt time0_Isr() { if (TMR0IF == 1) { TMR0IF =0; TMR0H = 0xEC; //定时器赋初值 TMR0L = 0x78; time0_2ms = 1; if (++count_20ms == 10) { count_20ms = 0; time0_20ms = 1; } if (++count_3s == 1500) { count_3s = 0; time0_3s = 1; } } } 第一句函数名定义显示语法错误,开发环境是mplab c18 |
更多回帖