STC15单片机外部中断的特点及应用研究  被引量:8

Research on Characteristics and Application of External Interrupt on STC15 MCU

在线阅读下载全文

作  者:刘宝成[1] Liu Baocheng(College of Engineering,Inner Mongolia University for Nationalities,Tongliao 028043,China)

机构地区:[1]内蒙古民族大学工学院,通辽028043

出  处:《单片机与嵌入式系统应用》2021年第2期39-43,共5页Microcontrollers & Embedded Systems

基  金:内蒙古自治区高等学校科学研究项目—无线电波充电技术的研究(NJZY17202);内蒙古民族大学教育教学研究课题—实践教学的综合改革与实践的研究(YB2017008)。

摘  要:外部中断在单片机应用系统中经常用于系统故障处理、采集数据的处理、人机交互的键盘输入以及通过按键唤醒单片机退出掉电工作模式等工作场景。STC15系列单片机外部中断0、外部中断1增加了上升沿或下降沿均可触发中断的新特性,这种新特性在使用时如果不加以注意可能会使中断服务程序重复执行两次,导致程序出错,尤其是在采集数据的处理、人机交互的键盘输入等应用场合埋下隐患。通过对使用STC15系列单片机的外部中断0、外部中断1的实例分析,给出解决方案。对使用STC15系列单片机进行系统设计,尤其是对原来使用STC89系列等通用51单片机的系统进行硬件升级后的软件移植具有重要指导意义和参考价值。External interrupt is typically used in system fault processing,data acquisition,keyboard input and wake-up single-chip microcomputer to quit power-off mode.The external interrupt 0 and external interrupt 1 of STC15 series MCU add a new feature that the interrupt can be triggered by the rising edge or falling edge.If the user does not pay much attention to this feature,it may cause the interrupt service program to be executed twice,which will lead to a program error.This kind of new feature will have an underlying problem in the application of data acquisition processing,keyboard input of human-computer interaction and other applications.The examples of external interrupt 0 and external interrupt 1 of STC15 series MCU are discussed in this paper,the solutions are given.The study of this paper has important guiding significance and reference value for the system designed by STC15 series MCU,especially the software transplantation after a hardware upgrade of the original system used STC89 series and other general-purpose MCS 51 single-chip microcomputer.

关 键 词:STC15 单片机 外部中断 ADC 

分 类 号:TP368.1[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象