- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
中断号及interrupt和using(Interrupt and interrupt and using)
中断号及interrupt和using(Interrupt and interrupt and using)
I. interruption number
External interrupt 0 0
Timer T0 1
External interrupt 1 2
Timer T1 3
Serial interrupt 4
The use of interrupt and using in C51 interrupts
The basic structure of the 8051 series MCU includes: 32 I/O ports (4 sets of 8 bit ports); Two 16-bit timing counters; Full duplex serial communication; 6 interrupt sources (2 external interrupts, 2 timing/counter interrupts, 1 serial port input/output interrupts), and two levels of interrupt priority; 128 bytes of built-in RAM; Independent 64K byte addressable data and code area. After the interrupt occurs, MCU goes to one of the five interrupts and then performs the corresponding interrupt service handler. Interrupt program of entry by the compiler in the interrupt vector address, interrupt vector address on the lowest level in program code, pay attention to the serial port input/output interrupt sharing an interrupt vector. The interruption of 8051 is as follows:
Interrupt source interrupt vector
The power is reset to 0000H
External interrupt 0, 0003H
Timer 0 overflow 000BH
External interrupt 1 0013H
Timer 1 overflow 001BH
Serial port interrupt 0023H
Timer 2 overflow 002BH
Direct access to registers and ports
define
SFR P0 0 x80
SFR P1 0 x81
SFR ADCON; 0 xde
Sbit EA 0 x9f
operation
ADCON = 0 x08;
P1 = 0 XFF;
Io_status = P0;
EA = 1;
After using the interrupt 1 keyword, the interrupt vector is automatically generated
You cant share local variables with other the background loop code in the ISR
Because the connector will reuse the location of these variables in RAM, they will have different meanings depending on the different functions that are currently being used
Multiplexing variables will be important to RAM limited 51. So, these functions want to execute in a certain order and not be interrupted.
Timer0_int () interrupt 1 using 2
{
Unsigned char temp1;
Unsigned char temp2;
The executable C statements;
}
The interrupt statement says that the vector is
您可能关注的文档
- 铝合金焊接知识(Knowledge of aluminum alloy welding).doc
- 铝合金状态代号(Aluminum alloy status symbol).doc
- 铝合金铸棒缺陷的产生原因(Cause of defects of aluminum alloy casting rod).doc
- 铝合金铸造工艺性能(Aluminum alloy casting process performance).doc
- 铝材知识(Aluminum knowledge).doc
- 铝板资料的解释(Interpretation of aluminum sheet data).doc
- 铝活金的伙同(The people of aluminum live gold).doc
- 铝材质量(Quality of aluminum).doc
- 铝铸件的抛光和氧化(Polishing and oxidation of aluminum castings).doc
- 铝边条发光字制作方法(The method of making the luminescent word of aluminum edge).doc
- 中瑞金融经济复苏VS产能过剩 铝价震荡区间抬升(China and Switzerland finance economic recovery VS capacity surplus aluminum price oscillation range uplift).doc
- 中石北京 风险工程学 第二次在线作业(Zhongshi Beijing risk engineering the second online operation).doc
- 中电电气集团,定义品类的新产品赢取电力系统变压器市场(Cec, the defining category of new products to win the power system transformer market).doc
- 中石北京11春《渗流力学》第2次在线作业(Zhongshi Beijing 11 spring seepage mechanics the second time online homework).doc
- 中石油《计算机应用基础》第二阶段在线作业(Middle oil computer application foundation second stage online homework).doc
- 中科大电子系统设计考点总结(自动化)(USTC electronic system design test point summary (automation)).doc
- 中石油北京13秋《企业战略管理》在线作业1、2、3 试题及答案(Beijing 13 autumn enterprise strategy management online homework 1, 2, 3 questions and answers).doc
- 中科院课程(Chinese academy of sciences).doc
- 中级电气工程师考试科目(Intermediate electrical engineer examination subject).doc
- 中科院量子力学考研真题及答案详解(The Chinese academy of sciences' quantum mechanics tests the real questions and answers).doc
文档评论(0)