好文档就是一把金锄头!
欢迎来到金锄头文库![会员中心]
电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本

外部中断0-INT0的C语言源程序(基于80C51单片机-).doc

2页
  • 卖家[上传人]:博****1
  • 文档编号:449401820
  • 上传时间:2023-02-24
  • 文档格式:DOC
  • 文档大小:23.50KB
  • / 2 举报 版权申诉 马上下载
  • 文本预览
  • 下载提示
  • 常见问题
    • include# include#define PORT_OUT P1void delay(uint); //声明延时函数Void main(void){ TCON=0x01;IE=0x85;PORT_OUT=0xfe;while(1){delay(500);PORT_OUT=_crol_( PORT_OUT,1);}}void delay(uint xms) //延时函数{uint i,j;for(i=xms;i>0;i--)for(j=110;j>0;j--);}/*********外部中断0服务*********/void extInterrupt0(void) interrupt 0{ unsigned char counter; EA=0; for(counter=0; counter<3; counter++) { P0=0;delay(100);P0=0xff;delay(100);}EA=1;}。

      点击阅读更多内容
      相关文档
      关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
      手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
      ©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.