|
用过2407,现在用2812,中断不会做了。我照2407的写法,编译就出问题了。请问
1:中断也要自己写一个vector.asm的文件吧?
2:vector.asm该如何写?(我写的在下面,不能用)
3:可以自定义中断名吗?比如timer1int
4:中断服务程序这样写对吗?void interrupt T1PINT_ISR()
还差些什么,请指教!!
我写的vector.asm:
.ref _c_int0,_nothing,_T1PINT_ISR
.sect \"vectors\"
rset: B _c_int0 ;00h reset
int1: B _T1PINT_ISR ;02h INT1
int2: B _nothing ;04h INT2
int3: B _nothing ;06h INT3
int4: B _nothing ;08h INT4
int5: B _nothing ;0Ah INT5
int6: B _nothing ;0Ch INT6
int7: B _nothing ;0Eh reserved
int8: B _nothing ;10h INT8 (software)
int9: B _nothing ;12h INT9 (software)
int10: B _nothing ;14h INT10 (software)
int11: B _nothing ;16h INT11 (software)
int12: B _nothing ;18h INT12 (software)
int13: B _nothing ;1Ah INT13 (software)
在CMD文件中声明:
VECTORS : origin = 0x3FFFC2, length = 0x00003E
在程序中写服务程序:void interrupt T1PINT_ISR()
|
|