51单片机中断优先级
时间: 2023-12-06 22:03:24 浏览: 227
51单片机中断优先级分为查询优先级和执行优先级。查询优先级是指当51单片机的多个中断源同时引起中断时,CPU会逐个查询中断标志位的次序,高优先级的中断标志位将被优先查询到。但是,查询优先级高的中断不一定可以打断正在执行中断处理的低优先级中断。查询优先级是由单片机硬件决定,不可更改。单片机内部自然优先级顺序为:外部中断0→定时器0中断→外部中断1→定时器1中断→串行口中断。
51单片机中断共有五个中断源,包括两个外部中断(INT0,INT1),两个定时器/计数器(T0,T1),以及一个串口中断(TI/RI)。它们在硬件上的排列顺序是INT0,T0,INT1,T1,TI/RI,编号分别为0,1,2,3,4。123
引用[.reference_title]
- 1 2 51单片机中断优先级讲解以及示例说明[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2
allinsert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - 3 51单片机外部中断的使用以及优先级设置[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2
allinsert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
阅读全文
相关推荐













