6672 views|7 replies

28

Posts

0

Resources
The OP

In interrupts, what is the difference between interrupt priority and interrupt priority? [Copy link]

In interrupts, what is the difference between interrupt priority and interrupt priority?
This post is from 51mcu

Latest reply

There is an interrupt priority register, please refer to the device manual for details.  Details Published on 2017-4-1 22:49

1w

Posts

132

Resources
2
Interrupt priority can be set, and higher priority interrupts will be responded to first. Different interrupts have different priorities within the same interrupt priority. For example, external interrupt 0 in the 51 series has the highest priority. Interrupts with higher priority will be responded to first. Interrupt priority cannot be set.
This post is from 51mcu
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang

25

Posts

0

Resources
3
chunyang posted on 2017-3-31 21:16 Interrupt priority can be set, and higher priority interrupts are responded to first. In the same interrupt priority, different interrupts have different priorities. For example, the external interrupts in the 51 series...
So in the 51 single-chip microcomputer, interrupt 0 and timer 0, do these two belong to the same interrupt priority or the same interrupt priority? (In addition, I would like to ask: Can timer 0 be used to control interrupt 1?)
This post is from 51mcu

Comments

If the interrupt priority is not set or the same interrupt priority is set, external interrupt 0 and timer 0 are at the same interrupt priority, but external interrupt 0 has a higher priority. If timer 0 interrupt is required to be responded to first, the interrupt priority of timer 0 needs to be set to high.  Details Published on 2017-3-31 22:37

28

Posts

0

Resources
4
chunyang posted on 2017-3-31 21:16 Interrupt priority can be set, and higher priority ones will be responded to first. In the same interrupt priority, different interrupts have different priorities. For example, the external interrupts in the 51 series...
You said that in the same interrupt priority, different interrupts have different priorities, so external interrupt 0, timer 0, external interrupt 1, timer 1, these should be 4 different interrupt priorities. For example, the priority of external interrupt 0 is the same interrupt priority. How can there be other interrupts in this priority? How can there be different priorities? What are the specific interrupt priorities?
This post is from 51mcu

Comments

Pay attention to the wording: "So external interrupt 0, timer 0, external interrupt 1, timer 1, these should be 4 different interrupt priorities" should be 4 different interrupt priorities. You used the wrong word, so it is naturally confusing. Note that "level" comes first and "priority" comes second. The one with the highest level will respond first, and the one with the same level will respond first.  Details Published on 2017-3-31 22:40

1w

Posts

132

Resources
5
Hu Doudou's Spring published on 2017-3-31 21:23 So in the 51 single-chip microcomputer, interrupt 0 and timer 0, do these two belong to the same interrupt priority or the same interrupt priority? (In addition, I want to...
If the interrupt priority is not set or the same interrupt priority is set, external interrupt 0 and timer 0 are at the same interrupt priority, but external interrupt 0 has a higher priority. If timer 0 interrupt priority response is required, the interrupt priority of timer 0 needs to be set to high. As for whether timer 0 can be used to control external interrupt 1, the answer is that it cannot be controlled directly, because the timer output cannot be used as the input of the external interrupt, otherwise how can it be called "external interrupt"? Of course, there is a way to control it indirectly, using instructions to set a certain IO connected to external interrupt 1 to 0 according to the overflow of timer 0.
This post is from 51mcu
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang

1w

Posts

132

Resources
6
FENFAXIANGSHANG posted on 2017-3-31 21:54 You said that in the same interrupt priority, different interrupts have different priorities, so external interrupt 0, timer 0, external interrupt 1, timer 1, this should be...
Pay attention to the wording: "Then external interrupt 0, timer 0, external interrupt 1, timer 1, these should be 4 different interrupt priorities" should be 4 different interrupt priorities. You used the wrong word, so you are naturally confused. Note that "level" comes first and "right" comes second. The one with priority level will respond first, and the one with higher right will respond first if the same level.
This post is from 51mcu
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang

28

Posts

0

Resources
7
[quote]chunyang posted on 2017-3-31 22:37 If the interrupt priority is not set or the same interrupt priority is set, the external interrupt 0 and timer 0 are at the same interrupt priority, but ...
This post is from 51mcu

Comments

There is an interrupt priority register, please refer to the device manual for details.  Details Published on 2017-4-1 22:49

1w

Posts

132

Resources
8
FENFAXIANGSHANG posted on 2017-4-1 09:22 "If you need to give priority to the timer 0 interrupt, you need to set the interrupt priority of timer 0 to high." I would like to ask, what method can be used to set the timer...
There is an interrupt priority register, please refer to the device manual for details.
This post is from 51mcu
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

    EEWorld
    subscription
    account

    EEWorld
    service
    account

    Automotive
    development
    circle

    Robot
    development
    community

    Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
    快速回复 返回顶部 Return list