What are the characteristics of the two methods of extending external interrupts in MCS 51 described

Updated on technology 2024-05-13
6 answers
  1. Anonymous users2024-02-10

    A method for extending the external interrupt source of the MCS-51 microcontroller with the 8259A.

    Hou Baosheng Abstract]:In applications that require multiple external interrupts, the 8259A programmable interrupt controller interface chip can be used to extend the external interrupt source to the MCS-51 microcontroller. This paper mainly solves the MCS-51 microcontroller system, how to generate the interrupt response signal matching the 8259A, the initialization program of the 8259A and the design of the interrupt response program of the MCU.

    Author Affilications]: Department of Telecommunications Engineering, Shaanxi University of Technology.

    Body Snapshot]:

    1 Introduction In single-chip microcomputer systems with high real-time requirements, the functions of the interrupted system need to be used. However, there are still only two external interrupt sources that MCS-51 MCU system can provide users with different purposes, and if you want to provide users with interrupt sources for more purposes, you need to extend the external interrupt source to the MCU. The extension of the interrupt source can be achieved by using parallel input interfaces combined with software queries.

  2. Anonymous users2024-02-09

    It is possible to use a combination of 6 channels and gates or gates (depending on whether the high level interrupts or the low level interrupts) with 6 IO ports, as long as one interrupt source is required. But it's going to be slower. The specific method and principle are as follows:

    After one of the six channels (depending on the circuit, it can theoretically be infinitely expanded) produces an interrupt, then use the method of wheel patrol IO port to find out which one has a level flip, and then know which one produces an interrupt. And the priorities can be arranged by themselves.

  3. Anonymous users2024-02-08

    The interrupt number is 0, and the interrupt entry address is 0x0003h; External interrupt 1 (int1): the interrupt number is 1, and the interrupt entry address is 0x0013h; Timer 0 interrupt (TF0): The interrupt number is 2, and the interrupt entry address is 0x000bh; Timer 1 Interrupt (TF1):

    The interrupt number is 3, and the interrupt entry address is 0x001bh; Serial port interrupt (RI TI): The interrupt number is 4 and the interrupt entry address is 0x0023h. The above is the common interrupt number and the corresponding interrupt entry address of MCS-51 microcontroller.

    When designing the program, you can select the corresponding interrupt source for interrupt processing according to your needs.

    This paper briefly describes the interrupt number inside the MCS-51 microcontroller and the corresponding interrupt entry address.

    There are 5 interrupt sources inside MCU, and their numbers and corresponding interrupt inlet addresses are as follows: external interrupt 0 (int0): the interrupt number is 0, and the interrupt inlet address is 0x0003h; Outside the demolition part interrupt 1 (int1):

    The interrupt number is 1, and the interrupt entry address is 0x0013h; Timer 0 interrupt (tf0): the interrupt number is 2, and the interrupt entry address is 0x000bh; Timer 1 interrupt (TF1): the interrupt number is 3, and the interrupt entry address is 0x001bh; Serial Port Interrupt (RI TI):

    The interrupt number is 4, and the interrupt entry address is 0x0023h. The above is the common interrupt number inside the MCS-51 microcontroller and the corresponding interrupt entry address of open bend burial. When designing the program, you can select the corresponding interrupt source for interrupt processing according to your needs.

    In addition to the above 5 commonly used interrupt sources, the MCS-51 microcontroller also supports two additional external interrupt sources, namely INT2 and INT3. Their interrupt entry addresses are 0x002bh and 0x0033h, respectively. At the same time, the MCS-51 microcontroller also supports two kinds of software interrupts, namely TRAP and RST, and their interrupt entry addresses are 0x0023h and 0x003bh respectively.

    In practical applications, if the chain is missing, if the resistance needs to use these additional interrupt sources, it can be configured and processed accordingly according to the needs.

  4. Anonymous users2024-02-07

    First, the method of hardware request and software query is adopted

    This method is to introduce each interrupt source into the external interrupt source input of the microcontroller through the hardware "OR NOT" (high active, such as CD4002) (AND, low active) gate.

    terminal (int0 or int1), and at the same time send an external interrupt source to an input and output port of the microcontroller.

    When an external interrupt occurs, the microcontroller interrupts through the "or" (and) gate, and is reconnected in the interrupt service program.

    Through the software query, and then transfer the corresponding interrupt service program. Obviously, the disruption priority of this approach depends.

    The order in which the software is queried. Its hardware connection and software programming are as follows:

    void zhongduan (void) interrupt 0 using 3 interrupt function.

    Interrupt the query. if(p0 1=1) interrupts the query.

    if(p0 2=1) interrupts the query.

    ex0=1;On interrupt.

    Second, use ordinary diodes to form interrupt selection.

    The 8 external interrupt sources of the extension all request interrupts from i n t (x=0 or i) via diodes. When an external interrupt source requests to interrupt the service, the output is low, the i nt of the single-chip microcomputer is grounded by the diode, the single-chip microcomputer meets the response to the external interrupt (i n t) request condition, responds to the interrupt, the program immediately turns to the interrupt entry address corresponding to the i nt to start executing the interrupt service program, queries the state of the interrupt source outside the port through the software, identifies the extended interrupt source that makes the request, and turns to the interrupt service program to serve it, and its query order is the interrupt priority order of the external extension interrupt source. In the figure, the status information input port is selected as the source of the expansion interrupt request.

    Somewhat similar to the first method.

    3. Use a timer counter for external interrupts.

    The timer counter of the microcontroller is a plus one counter, whenever there is a negative "1-0" at the counting input.

    When a jump occurs, the counter is added by one, and when the counter overflows with one is added, an interrupt is sent to the CPU to take advantage of this feature.

    The way to extend the interrupt is to first set the timer counter to the counting mode, and preset the full value.

    An external interrupt source is input to pin 4 or pin 5 (counter input) of port P3 so that it can be utilized.

    The timer counter is interrupted as external to the microcontroller. Note that the ingress address for this method of interrupting the service should be.

    at 000bh or 001bh.

    Fourth, use a dedicated interrupt to expand the chip 8259A

    The 8259A is a programmable interrupt control interface, and the single-chip microcomputer controls the eight-level interrupt. In the system, the cascade mode can also be adopted, and a master can be cascaded with 8 slaves to form a 64-level interrupt processing system.

    In this way, when the program is less than 8k, it can be realized with a single-chip microcomputer, without the need to use two-chip single-chip microcomputer control, and the single-chip microcomputer point-to-point communication is also required.

  5. Anonymous users2024-02-06

    In MCS-51, the opening and closing of interrupts is controlled by the allow bits in the interrupt allow register IE, as shown in the figure below, with 5 interrupt sources, controlled by 6 allow bits.

  6. Anonymous users2024-02-05

    MCS-51 MCU interrupts the withering process ().

    a.Interrupt the request.

    b.Response. c.The service is not quiet.

    d.Return. The answer is positive: ABCD

Related questions
2 answers2024-05-13

1. Be bold to discover the rules of the first letter and memorize IELTS vocabulary. >>>More

14 answers2024-05-13

Asking about the weather is a common expression in English >>>More

8 answers2024-05-13

Aloe vera, spider plant, saxifera, one-leaf orchid, and monstera are natural scavengers that remove harmful substances from the air. >>>More

6 answers2024-05-13

Yes. Vitex Interpretation: Yellow Vitex.

Xiao Jing, Chu. In fact, they are all the same plant, but they are different in different dialects and different names. >>>More

7 answers2024-05-13

1: Adding a bone wall is the same as adding a tooth damage bonus, but adding a bone wall can add a bonus to the absorption damage of the bone shield, the level 33 bone dungeon of the bug shoes can also add a bonus to the bone shield, and the bone wall can absorb nearly a thousand physical damage with the bug shoes and other equipment bone shields to bring higher security. Usually you don't need to fight with your teeth, and the bone spear has a little less damage bonus, and it is not slow to kill. >>>More