用的X IDE器件16f1503编译器XC8 V2.0 写个简单的中断函数,编译提示错误:
"C:\Program Files\Microchip\xc8\v2.00\bin\xc8-cc.exe" -mcpu=16F1503 -c -fno-short-double -fno-short-float -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -Wa,-a -DXPRJ_default=default -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -std=c99 -gdwarf-3 -mstack=compiled:auto:auto -o build/default/production/main.p1 main.c
main.c:76:6: error: variable has incomplete type 'void'
void interrupt isr()
^
main.c:76:15: error: expected ';' after top level declarator
void interrupt isr()
^
;
2 errors generated.
(908) exit status = 1
下面这是中断函数
void interrupt isr()
{
if(T0IE&&T0IF)
{
T0IF=0;
sys_ms++;
}
} |