CN102591719A - Interrupt expansion method based on 8051 CPU system - Google Patents

Interrupt expansion method based on 8051 CPU system Download PDF

Info

Publication number
CN102591719A
CN102591719A CN2011100096049A CN201110009604A CN102591719A CN 102591719 A CN102591719 A CN 102591719A CN 2011100096049 A CN2011100096049 A CN 2011100096049A CN 201110009604 A CN201110009604 A CN 201110009604A CN 102591719 A CN102591719 A CN 102591719A
Authority
CN
China
Prior art keywords
interrupt
8051cpu
interruption
address
method based
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011100096049A
Other languages
Chinese (zh)
Inventor
薛重阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Huahong Integrated Circuit Co Ltd
Original Assignee
Shanghai Huahong Integrated Circuit Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Huahong Integrated Circuit Co Ltd filed Critical Shanghai Huahong Integrated Circuit Co Ltd
Priority to CN2011100096049A priority Critical patent/CN102591719A/en
Publication of CN102591719A publication Critical patent/CN102591719A/en
Pending legal-status Critical Current

Links

Images

Abstract

Disclosed is an interrupt expansion method based on an 8051 CPU (central processing unit) system. Using a combination of hardware expansion and traditional software queries, the method realizes the expansion treatment for 8051 CPU system with multiple interrupt sources. The method comprises firstly establishing an interrupt expansion processing module between a system program memory and the 8051 CPU; when 8051 CPU issues access to an interrupt address, using the interrupt expansion processing module to detect and intercept; returning the data according to an interrupt priority vector table and simulating long transfer instructions; and when 8051 CPU receives returned data, obtaining the long transfer jump address, executing the long transfer jump instructions to jump to a corresponding function and entering the interrupt processing. With the interrupt expansion method provided by the invention, processing speed of the multiple interrupt sources in 8051 CPU system can be effectively improved.

Description

A kind of interruption extended method based on the 8051CPU system
Technical field
The present invention relates to a kind of interrupt method, relate in particular to a kind of interruption extended method based on the 8051CPU system.
Background technology
8051CPU (8 single-chip CPU) as the system of classics, is applied to the every field of electron trade.Interrupt source in general situation of 8051CPU system comprises external interrupt 0, external interrupt 1, and timer interrupts 0, and timer interrupts 1 and interrupts with serial.Along with increasing of peripheral hardware, for the interruption of 8051 systems of one process bigger demand is arranged, and higher requirement is also arranged for interrupt response.Along with the continuous increase of interrupt source, a plurality of interrupt sources use the interruption inlet of a 8051CPU inevitable.
When the system break source is not enough, just need original interruption be expanded.The general employing of tradition interrupt source extension realization mode is connected to some interruptions in the interruption of 8051CPU together; An and externally integrated interrupt inquiry register; When interrupting taking place, realize this register of inquiry earlier by software; The corresponding interruption handled in selection more as required, and its execution efficient of the implementation method of this interrupt source expansion is lower.
Be the mode that solution is realized by software, the problem that the interrupt source expansion efficiency is lower, it is higher to design a kind of execution efficient, and can be technology contents to be solved by this invention by the interrupt source extended method of hardware and software realization.
Summary of the invention
The object of the invention provides a kind of interruption extended method based on the 8051CPU system, and the implementation that adopts the inquiry of hardware expanding and traditional software to combine can effectively improve the processing speed in multiple interrupt source in the 8051CPU system.
A kind of interruption extended method based on the 8051CPU system comprises following content:
(1) in the middle of system program storer and 8051CPU, sets up interruption extension process module;
(2) interrupt extension process module detection 8051CPU and whether begin to get into the interrupt routine processing;
When (3) 8051CPU sends certain interrupt address of visit, interrupt the extension process module and detect and tackle, also simulate the long jump instruction of shifting according to interrupt priority level vector table return data;
(4) after 8051CPU receives return data, obtain the long jump address that shifts, the executive chairman shifts jump instruction and jumps to corresponding function, gets into Interrupt Process;
(5) interrupt the extension process module and continue interception, and return corresponding address successively, carry out system break and handle according to interrupt address inlet vector table.
Interrupting the extension process module provides interrupt priority level control vector table, interrupts the entry address vector table and interrupts access detection three partial contents.The interrupt priority level vector is used to judge the preferential interrupt handling routine that gets into when multiple interrupt triggers simultaneously, and the user can be configured according to application.Interrupt address inlet vector table is used to provide the entry address of interrupt routine, and the user also can be configured according to demand.Interrupt access detection, be used to detect 8051CPU and when visit interrupt routine and offer and interrupt the extension process module and handle.
Description of drawings
Fig. 1 interruption extended method provided by the invention basic flow sheet
The interruption extension process electrical block diagram of Figure 28 051CPU system
Fig. 3 interrupts the inside realization synoptic diagram of extension process module
Long transfer instruction order code in the 8051CPU instruction set among Fig. 4 embodiment
Embodiment
Below in conjunction with each accompanying drawing, the content that the present invention proposes is carried out detailed description.
Fig. 1 has provided the interruption extended method basic flow sheet based on the 8051CPU system provided by the invention.It is example that case of external interrupts 0, interrupts the extension process module and is arranged between 8051CPU and the program storage, as shown in Figure 2.When central stopping pregnancy is given birth to, interrupt the extension process module and start working, detect 8051CPU and whether begin to get into the interrupt routine processing.At first produce interrupt trigger signal on the external interrupt 0,8051CPU gets into the Interrupt Process process, therefrom breaks read-in programme data on the port address.When the address of external interrupt 0 acquiescence enters the mouth is 0003, and then 8051CPU will visit 0003 this address and read interrupt handling routine.
When 8051CPU sends visit 0003 address, detect and tackle by interrupting the extension process module, return data 02 is also simulated the long jump instruction of shifting.8051CPU can continue the address that visit 0004,0005 address obtains redirect after having received 02 instruction, it is as shown in Figure 4 that length shifts jump instruction.Interrupt the extension process module and continue interception, and return corresponding address successively according to the interrupt address vector table.After 8051CPU obtains data, will the executive chairman shift jump instruction and jump to corresponding function, accomplish the different Interrupt Process of 8051CPU.Interrupting the extension process inside modules realizes as shown in Figure 3.

Claims (5)

1. interruption extended method based on the 8051CPU system, its characteristic in step do,
(1) in the middle of system program storer and 8051CPU, sets up interruption extension process module;
(2) interrupt extension process module detection 8051CPU and whether begin to get into the interrupt routine processing;
When (3) 8051CPU sends certain interrupt address of visit, interrupt the extension process module and detect and tackle, also simulate the long jump instruction of shifting according to interrupt priority level vector table return data;
(4) after 8051CPU receives return data, obtain the long jump address that shifts, the executive chairman shifts jump instruction and jumps to corresponding function, gets into Interrupt Process;
(5) interrupt the extension process module and continue interception, and return corresponding address successively, carry out system break and handle according to interrupt address inlet vector table.
2. a kind of interruption extended method based on the 8051CPU system as claimed in claim 1 is characterized in that said interruption extension process module provides the content of interrupt priority level control vector table, interruption entry address vector table and interruption access detection.
3. according to claim 1 or claim 2 a kind of interruption extended method based on the 8051CPU system is characterized in that said interrupt priority level vector is used to judge the preferential interrupt handling routine that gets into when multiple interrupt triggers simultaneously, and the user can be configured according to application.
4. according to claim 1 or claim 2 a kind of interruption extended method based on the 8051CPU system is characterized in that said interrupt address inlet vector table is used to provide the entry address of interrupt routine, and the user can be configured according to application.
5. according to claim 1 or claim 2 a kind of interruption extended method based on the 8051CPU system is characterized in that said interruption access detection is used to detect 8051CPU and when visits interrupt routine and offer and interrupt the extension process module and handle.
CN2011100096049A 2011-01-17 2011-01-17 Interrupt expansion method based on 8051 CPU system Pending CN102591719A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011100096049A CN102591719A (en) 2011-01-17 2011-01-17 Interrupt expansion method based on 8051 CPU system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011100096049A CN102591719A (en) 2011-01-17 2011-01-17 Interrupt expansion method based on 8051 CPU system

Publications (1)

Publication Number Publication Date
CN102591719A true CN102591719A (en) 2012-07-18

Family

ID=46480426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011100096049A Pending CN102591719A (en) 2011-01-17 2011-01-17 Interrupt expansion method based on 8051 CPU system

Country Status (1)

Country Link
CN (1) CN102591719A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105279021A (en) * 2015-10-16 2016-01-27 华为技术有限公司 Method and device for executing non-maskable interrupt

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6880030B2 (en) * 2000-12-13 2005-04-12 Wind River Systems, Inc. Unified exception handling for hierarchical multi-interrupt architectures
CN1637712A (en) * 2003-12-25 2005-07-13 松下电器产业株式会社 Apparatus and method for interrupt control
CN101320338A (en) * 2007-06-04 2008-12-10 国际商业机器公司 Method and system for stealing interrupt vectors

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6880030B2 (en) * 2000-12-13 2005-04-12 Wind River Systems, Inc. Unified exception handling for hierarchical multi-interrupt architectures
CN1637712A (en) * 2003-12-25 2005-07-13 松下电器产业株式会社 Apparatus and method for interrupt control
CN101320338A (en) * 2007-06-04 2008-12-10 国际商业机器公司 Method and system for stealing interrupt vectors

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王月姣等: "单片机扩展8259中断控制器的研究", 《中南民族大学学报(自然科学版)》, vol. 23, no. 02, 30 June 2004 (2004-06-30), pages 49 - 51 *
米根锁等: "用8259A扩展8031单片机外部中断源的方法", 《电气传动自动化》, vol. 28, no. 06, 10 December 2006 (2006-12-10), pages 55 - 57 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105279021A (en) * 2015-10-16 2016-01-27 华为技术有限公司 Method and device for executing non-maskable interrupt
WO2017063529A1 (en) * 2015-10-16 2017-04-20 华为技术有限公司 Method and apparatus for executing non-maskable interrupt
CN105279021B (en) * 2015-10-16 2019-05-07 华为技术有限公司 The method and apparatus for executing not maskable interrupts
CN110209615A (en) * 2015-10-16 2019-09-06 华为技术有限公司 The method and apparatus for executing not maskable interrupts
US10437632B2 (en) 2015-10-16 2019-10-08 Huawei Technologies Co., Ltd. Method and apparatus for executing non-maskable interrupt
US10970108B2 (en) 2015-10-16 2021-04-06 Huawei Technologies Co., Ltd. Method and apparatus for executing non-maskable interrupt
US11360803B2 (en) 2015-10-16 2022-06-14 Huawei Technologies Co., Ltd. Method and apparatus for executing non-maskable interrupt
CN110209615B (en) * 2015-10-16 2023-09-12 华为技术有限公司 Method and apparatus for executing non-maskable interrupts

Similar Documents

Publication Publication Date Title
CN101221541B (en) Programmable communication controller for SOC and its programming model
CN106030538B (en) System and method for split I/O execution support through compiler and OS
EP3186704B1 (en) Multiple clustered very long instruction word processing core
ATE554443T1 (en) INSTRUCTION-DRIVEN DATA PROCESSING DEVICE AND METHOD
RU2008116177A (en) WAYS OF SIMULTANEOUS PERFORMANCE OF SEVERAL TASKS IN MEDIA PLAYERS
US20210334228A1 (en) Managing network interface controller-generated interrupts
CN102163141A (en) Addressing module structure for realizing digital signal processor
CN102253921A (en) Dynamic reconfigurable processor
CN102636987A (en) Dual control device
JP2004030222A5 (en)
CN101702144B (en) Control device and control method of DMA controller
JP5271287B2 (en) Interface processor
US11237994B2 (en) Interrupt controller for controlling interrupts based on priorities of interrupts
CN102591719A (en) Interrupt expansion method based on 8051 CPU system
CN106708473B (en) A kind of unified more warp fetching circuits of stainer array
EP4163795A1 (en) Techniques for core-specific metrics collection
CN102043750B (en) Microprocessor bus structure and microprocessor
CN102708079A (en) Data transmission controlling method and system applied to microcontroller
CN102103490B (en) Method for improving memory efficiency by using stream processing
CN103870313A (en) Virtual machine task scheduling method and system
CN108196849A (en) A kind of low latency instruction scheduler
CN202548823U (en) Non-blocking coprocessor interface system
CN101539849B (en) Processor and gating method of register
DE602005002533D1 (en) DMAC OUTPUT MECHANISM USING A STEAMING ID PROCESS
CN204009891U (en) The soft core of a kind of sixteen bit embedded chip

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120718