首页 | 本学科首页   官方微博 | 高级检索  
     

STC15单片机外部中断的特点及应用研究
引用本文:刘宝成.STC15单片机外部中断的特点及应用研究[J].单片机与嵌入式系统应用,2021,21(2):39-43.
作者姓名:刘宝成
作者单位:内蒙古民族大学工学院,通辽028043
基金项目:内蒙古自治区高等学校科学研究项目—无线电波充电技术的研究;内蒙古民族大学教育教学研究课题—实践教学的综合改革与实践的研究
摘    要:外部中断在单片机应用系统中经常用于系统故障处理、采集数据的处理、人机交互的键盘输入以及通过按键唤醒单片机退出掉电工作模式等工作场景。STC15系列单片机外部中断0、外部中断1增加了上升沿或下降沿均可触发中断的新特性,这种新特性在使用时如果不加以注意可能会使中断服务程序重复执行两次,导致程序出错,尤其是在采集数据的处理、人机交互的键盘输入等应用场合埋下隐患。通过对使用STC15系列单片机的外部中断0、外部中断1的实例分析,给出解决方案。对使用STC15系列单片机进行系统设计,尤其是对原来使用STC89系列等通用51单片机的系统进行硬件升级后的软件移植具有重要指导意义和参考价值。

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

Research on Characteristics and Application of External Interrupt on STC15 MCU
Liu Baocheng.Research on Characteristics and Application of External Interrupt on STC15 MCU[J].Microcontrollers & Embedded Systems,2021,21(2):39-43.
Authors:Liu Baocheng
Affiliation:(College of Engineering,Inner Mongolia University for Nationalities,Tongliao 028043,China)
Abstract: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.
Keywords:STC15  MCU  external interrupt  ADC
本文献已被 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号