51单片机 定时器0中断点亮LED灯.rar

上传者: 54311788 | 上传时间: 2021-06-10 22:03:47 | 文件大小: 315KB | 文件类型: RAR
51单片机 定时器0中断 点亮小灯的一个小程序参考 希望对你有所帮助 以下给出一部分代码 #include "int_0time.h" //自定义的头文件 void Timer0_Tint(void) //初始化定时器0 { // AUXR &= 0X7F; //定时/计数器辅助寄存器,用51单片机此处忽略屏蔽 TMOD &= 0XF0; //定时器计数器的工作模式寄存器(配置为定时器启动仅由TR0决定) TH0 = 0XDC; //给计数寄存器赋值 //(选择为定时模式,工作模式0) TL0 = 0X00; //TH0、TR0配置的定时值为10ms TR0 = 1 ; //运行控制位(允许允许) ET0 = 1 ; //定时器0的中断允许控制位(允许T0中断) EA = 1 ; //总中断(使用中断,必须打开总中断) } /**************************************** void Timer0_Rountine(void) interrupt 1 (定时器0的中断函数,中断号为 1 ) ****************************************/ void Timer0_Rountine(void) interrupt 1

文件下载

资源详情

[{"title":"( 17 个子文件 315KB ) 51单片机 定时器0中断点亮LED灯.rar","children":[{"title":"定时器0中断点亮LED灯","children":[{"title":"C","children":[{"title":"int_0time.c <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false}],"spread":true},{"title":"H","children":[{"title":"int_0time.h <span style='color:#111;'> 379B </span>","children":null,"spread":false}],"spread":true},{"title":"main","children":[{"title":"main.c <span style='color:#111;'> 307B </span>","children":null,"spread":false}],"spread":true},{"title":"project","children":[{"title":"LED.uvgui.YANG小新15AIR <span style='color:#111;'> 88.74KB </span>","children":null,"spread":false},{"title":"LED.uvproj <span style='color:#111;'> 14.32KB </span>","children":null,"spread":false},{"title":"Objects","children":[{"title":"int_0time.obj <span style='color:#111;'> 4.72KB </span>","children":null,"spread":false},{"title":"LED.lnp <span style='color:#111;'> 115B </span>","children":null,"spread":false},{"title":"LED.hex <span style='color:#111;'> 649B </span>","children":null,"spread":false},{"title":"LED.build_log.htm <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"main.obj <span style='color:#111;'> 3.82KB </span>","children":null,"spread":false},{"title":"LED <span style='color:#111;'> 8.39KB </span>","children":null,"spread":false}],"spread":true},{"title":"LED.uvopt <span style='color:#111;'> 5.58KB </span>","children":null,"spread":false},{"title":"Listings","children":[{"title":"main.lst <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false},{"title":"LED.m51 <span style='color:#111;'> 5.27KB </span>","children":null,"spread":false},{"title":"int_0time.lst <span style='color:#111;'> 2.40KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"图片","children":[{"title":"5KCCYWM[}`{IZ%Q1`ZF]YC5.jpg <span style='color:#111;'> 145.74KB </span>","children":null,"spread":false},{"title":"7[RFJLO)H_($F5J~9]4S~V2.jpg <span style='color:#111;'> 150.07KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明