欢迎来到天天文库
浏览记录
ID:21954336
大小:109.50 KB
页数:13页
时间:2018-10-25
《中断原理与外部中断实习》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、第五章中断原理与外部中断实习61IC中国电子在线http://www.61ic.com61IC工程师社区http://www.61icbbs.com中国最大的DSP专业技术资料网站,大量DSP资料下载和技术文章cvectors.asm.title"cvectors.asm";文件名.ref_c_int0,_nothing,_INT1_ISR,_INT2_ISR;所要执行的子程序.sect".vectors";中断向量节次reset:b_c_int0;00H(RESET开机复位)int1:b_INT1_ISR;02H(INT1中断)int2:b_I
2、NT2_ISR;04H(INT2中断)int3:b_nothing;06H(INT3中断)int4:b_nothing;08H(INT4中断)int5:b_nothing;0AH(INT5中断)int6:b_nothing;0CH(INT6中断)b_nothing;0EH(保留)b_nothing;10H(INT8软件中断)b_nothing;12H(INT9软件中断)b_nothing;14H(INT10软件中断)b_nothing;16H(INT11软件中断)b_nothing;18H(INT12软件中断)b_nothing;1AH(INT1
3、3软件中断)b_nothing;1CH(INT14软件中断)b_nothing;1EH(INT15软件中断)b_nothing;20H(INT16软件中断)trap:b_nothing;22H(TRAP中断)nmi:b_nothing;24H(NMI中断)b_nothing;26H(保留)b_nothing;28H(INT20软件中断)b_nothing;2AH(INT21软件中断)b_nothing;2CH(INT22软件中断)b_nothing;2EH(INT23软件中断)b_nothing;30H(INT24软件中断)b_nothing;3
4、2H(INT25软件中断)b_nothing;34H(INT26软件中断)b_nothing;36H(INT27软件中断)b_nothing;38H(INT28软件中断)b_nothing;3AH(INT29软件中断)b_nothing;3CH(INT30软件中断)b_nothing;3EH(INT31软件中断)5-1.2不可屏蔽中断实习步骤1:.title"cvectors.asm";文件名.ref_c_int0,_nothing,_TRAP_ISR;所要执行的子程序.sect".vectors";中断向量节次reset:b_c_int0;00
5、H(RESET开机复位)int1:b_nothing;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中断)b_nothing;0EH(保留)b_nothing;10H(INT8软件中断)b_nothing;12H(INT9软件中断)b_nothing;14H(INT10软件中断)b_nothing;16H(INT11软件
6、中断)b_nothing;18H(INT12软件中断)b_nothing;1AH(INT13软件中断)b_nothing;1CH(INT14软件中断)b_nothing;1EH(INT15软件中断)b_nothing;20H(INT16软件中断)trap:b_TRAP_ISR;22H(跳到TRAP指令中断子程序)nmi:b_nothing;24H(NMI中断)b_nothing;26H(保留)..程序:TRAP.C/*=================================================*//*Filename:TRA
7、P.C*//*=================================================*/#include"f240regs.h"#include"LH092.h"inti=0,data=0;voidmain(){OCRA=0;/*设定端口B为一般I/O*/PBDATDIR=0xffff;/*端口B输出初值*/CS0=i;/*CS0输出初值=0*/InitCPU();/*定义CPU的工作环境*/disable();/*Disableallinterrupts*/while(1)/*重复执行*/{while(i<32)/*
8、设定计数小于32*/{CS0=i;/*计数由CS输出*/Delay(70000);/*延时*/i++;/*计数递加*/};i=0;/*若
此文档下载收益归作者所有