Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
5 views

5.Interrupt Control

Make it beautiful

Uploaded by

aditya.shh15
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
5 views

5.Interrupt Control

Make it beautiful

Uploaded by

aditya.shh15
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 16
Faro: MAUR sess Ugtert Fifer: Wer A. | 05) Tnlerrupt Control = a ares (5:4) Tnterrupt Sources of interrupt 4 it's classtfication:. | * Wnts PY <, execute pre -de d__routine called 1SR- Cimerrupt Service Routine) in_a_time|y manner. Ne (x02 “ago 4 346 Handling interrupt xX (Trterupt) 2 pm + ALB + 4 Rein Wo orginal problem Ditardwiare interrupts + + keyboard ,mouse_ete imei [Generated by © vice . [then up —recefves interrupt —stqnais_ihrargh pins (hasductarel, are known as hordware tniervucis: 5 hardvoare interrupts! (Tn goes up) here re. TRAP - 8st 5:5 -Rst 45 INTR 7 Rst 65 >) ii) Differewe Acpect Mashable “Inteee QB wmmnw © rear erat often, err qo Those interrupts hich are inserted Iterggered in between Lith, ums There ore 8 software inierrupt jn goes-up- + Reto, 2 Ret gy SSificationy [Hardware interrupts are further classifted into Maskable_ interrupt t Thase wohtch can be disabled or tqnored by the up. Eg. TNTR, RST HS---- RSTSS g Non -Maskable Cant be disabled or ignored by 4up- eg» TRAP = t000-maskable “Tnterript \Dera Hardware ‘Tnterript that cant i A _ tne py. when tt occurs, current ing, Mand fwhen ME occurs, itcan bé are stored in siack for the handled after executing the|cPY to handle the interrupt: current tnstruciion. IPefortty [Hetps t» handle lower higher © [Priority task. Ki Lower: time higher Coy up). Use Case Ited in interface with peri-|Used for emergency purpass IPhera\ devices: For equ Beyer, Fatidie smote. pe: vw mnoy Be —utciated ox —_/A\_are_vectored—___| Non -Vectored % address a1 Enable (Atsable controlled by interrupt Fl © Wot ---- RST TS e- BIS § rTRAP. ° Pins ete Sl a ae rem x of_inerrupts When up receives multiple interrupt reauects Simultaneously, 3 will _evecute _ISReq. ale to prior py of Snverruph Treal P Bgres Rss } Testes} | TESTES i CENTS oO Aton fewest | S These interrupt which have fixed vector address S adieess of TSR is predefined &y irectty Provided i i ihe interrupting device: b cho doesmet need to Search for the ISR address; its readily avattabte- U 7 Howe does 4 work? + When an interrupt occurs, the interrupting device ; Sends the Spectfee interrupt vector (address) 40 ¢Pv- + _€PO uses thes vector to locate & execute the corresp-| ending =SR- | > characterstics + | + Easter tn response ste, as the ISR oddress is_direcily lgrevided: + Requires additional hardvoare support (eg + an inierrupt jeontottler ke Tntel g259 Pic). + Commonty used in medern systems ustth mulhple interrupt Soureés- ectpe _ address of deme tniccrupt pins shan _belowss fj———Tnterrupd | ___vector Address: () |_1) TRAP O02 4 4 a)__Rst_§-5, 0026, 3) kstés oo 34, ‘ 4) est a5 [00 3ex Al BCPu_automaticall Jumps toa predefined mnemores lecatfon when dese tnierrupt occur 2) - TA Definationy 7 * ttn N-v interrupt ithe address Of dhe ISR fs not prede~ Iftned oc Provided b, interrupting device. + ferO must determine the reR address Threw soft ware method. I> How TH voorks? s|wohen fnderrupt occurs, epy execut snectc _ as@ GQgenerar . fo ISR then de: the source t pt—by | pollen: Connected device. lkask fs executed. pence “ihe source ts fcleatified tRe appraprrale _| ~)characterettes +|Slower response itme ,as cpu must manually fd nitty Ithe tnterrupd eource, + |strapier_to _tmplement . 46 fi doesm require additional harevoa re + commorty Uoed tn gystems Ltt feser internph source: Know the tse addre, up) ZWIR pin in_advante ..+ + is NUT, CPO doesnot t lOxfferences» |Aspect __|_Vectored |_wlon = Vectored ‘Interrupt *Deftnatron [The address of rsp ¢. pred:|_Net Ppredefrned, Cro must determine _It- efimed_or provided inieres pling devece. TSR Address * rrecily provide de Determined cpu thru polling or software o Response _|Faster as the IsR add| Slower, ad the crv Teme ress fs readily available|lmust tdentfy inberruph sour Hardware| Requires additional _har-| Stmple, no add@trenal Complexity, Aware eg Inter-- Controle] harduoare requtred: vse case Surtable for ays tem voith ae mulkiple interrupt source [fewer --* eto nak. RST 7:6 - “RST 5S EW TR tctency |More ef fred stems | Less effecrent but __| i devices: lecmpler for small system Fatecruph Automante ) To Atcectty Manual, cev ~~ Xdentificatiop is provided be devrcer me OS @ anu arate Firat ater, sar qo Tnterrupt Request Vv | Fnterrupt Acknowledgment He le i ave the Current store] wv \cetch the 75Q Address | fxecute the xzsex | TL return ie mata program | /4) 8 aise ter td ) areattre Pereart eter, wae ae re onde, ceruiph request the deuce issues [sends an interrupt signal_ta the [aap Yep 2: ‘Tnterrupt Acknowledgement he sip acknowledges the interrupt and completes the current _in ¢truct'on. lStep 3: save the current State . The CPU Saves rogram sjatus wort 2 a [step 4x Feich the TsR » Addressy the cpo feichess the address of ISR from the Jnle- rrapt vector table CIT) or +hrough pollen: Step S** Execute +h: asRr Whe cpo executes the TSR to handte the fnterrupt Step 6+ Return the Saced State | After completing the ISR te cpu Arestores tRe Saved state from the Stack: step T= Return to Matin Pregre She cpu resumes exccuttor of the main program from tohere it ts left off a 8 aan & — Treats ferent eter, FET 10 = ba TET — " = ~f283_r Programmable Interupt Controller. ee +s weed 6 manage multiple tnierrupl requests LC1e9s) in up. Po gal aia pus] Buffer “af 5 ir = =| e RD Read Jwrite R = ’ we ic 7 ld In- Service Prtortt eit : Ao ——} beg Reafsier 7 2 see i IL ISR ae [ ee ey J 3 TRo-| TR CAS0 «J : TI iB { thse es t SKE as Buster] + spo] telecrapt mask eg ray Chess F[e» ——— 8 get td & Treatie Arar q8et, Bat Yo aa TR »| © Sections. Wits sechon cansicic af §- suh-eertian + O|Reincity Resolver: z= “ Ki nae ende request- > 8 ending to the high: tori: erupt i Selected & Stored to Cone sporeting bit of Tse during ANTA Signal 0 interrupt Mask Real der (ime) + Vsed to mask er unmask (disable [Enabie) Speci fte inderr- upt request. « Control Logic: This block has ton pinsy fe 301 anita: J. The apt fs connected to the interrupt pin of cup. fia a tt Monactgad oese e s The ota isy eect —Pranides eer a TH Ss seem at arene ferert ater, zat 9° wera. aK Difinis Bare Butter saritny ~[Mirs_9- bia bidirectional data bus buffer te used to inlerface the $259 with wp. Control Words & Status Information are transfe: thro tthe detabw buffer: D\Read Write control legic Selection > The ¢> of this black is to ace pl ole. Commands from the [hap ~ [wa insists of 4 pins» Rp (Read) - A low staal: in +he. pin, enables the 3259 Pex to send the status of ISR FRR AINE + LWIR (tortte) » A loco signal en this |p pin , enables +e 259 Per. « |& Cchip select) ” + [Ao + The ilp stqnal_ is wed tn conjuction with read Wie ergnal ,to write commands into variou ae og Command regisicr- 4)| Cos cade Gut fer | Cormparartor svsed wh le__gas ips_are b more than 3 interrupt. i ey] FASS CAS, \Se CAS: CM; 0 t CASg# IRS aR a Ig ERO. aia ea 2959 (stave o) | rey 9025 up 9259 espe tea) ev i 5 ay. t Master Te auta -2kt |___Inta F——4 a l a Figs Cascade Buffer | comparator. %Q- How Can We accomedate 48> Inderrupt sources with 8259 A PIC- CB xan © reat fire qetant, Hai 10 we TASe CASS EAS; [e— TRO EAS Cac CAS] TRo TNT 2259 (SLAVE of Ry e55 9259 MASTER) IRs Slave 1) {1 [-—— TR} % 2) 4) lrupt th, a [Palled mS upt chained (vectored) interrupt Po Ne d_iniervupt: ri me dh, i interr Hh he _cPv actively checks (polls) eo devece to determine hich one trigger the interrupt. Oi wed intery: i crupitng deur lpravides tne address of SR jin polled interrupts , the ceo must inden trey dhe source of the fnterrupt manu-| ally. Hows does Polled Interrupt work? Tnierrupt Request* + An external device? sends an interrupt request to chu: ‘ollings. The eg polis each device by checking HS status regi-| ater ov flag 4o delermtne whrch urce. eqused the | inde rrupt- ISR Evecutfony bOnce the interrupitna deuce is tdentifred We cpu execujes the Corres SerresPending ESR. Refurn fn Progia “After completing the JSR rhe cpu resumes the main ete is 5 [Advantages d)FlentBle_eince eciablished by Software. i)|Lower Cos} since tk needs very tous hardware. » {disadvantages ) ate. re tre oll witces can exceed the time i‘ ae tee by cs Device 0 J Sewree suk (seme tue | No- { Device? Ye; seve | | Soy pert perma 6 cre, aT 40 FT THT atte sete aE 8 ‘Areata fetert pry g 4 3 4 | 4 4 4 de = Tr | 3 30B5 | 4p | Ba evel od Beets 3) Had fm FH) || TTT | hy q : PoP ott | 4 | I gad: d 4 veh Be 4 3 9 ate 1} Vector intertupl: 4 ce , 8 wiser td & reat fare qétert, wat 90 — t ae 6 Moatt warts + 4) Tod teupt Reqte: te 2) Interrupt areas ies DITSR Address prowded A)L TSR execedron 5) Return 40 Mtatn Pozen 4 [Advantages: * faster Response -ttme > Le 4 + Rutomati¢ priori Msadvantage* eo Hardcoare Complexity + [hess flexi bilby » > [Thdetrupt vector Table —C1V1 [vt_ts 0 daotn_cteucture used in up 4 uc tp_manaf— Inlereupis x1 _candains 4he oddress of =5Qs_for_dif event) intervupt types-_hohen on jolenupl occur, +he cry uses the, overuse the corre sponding IoR- 1vT_4o locate Iniernipt in g025* 4)TRAP (non -Mas kale) 2) RST 2-5 RST +5 (Rectari_interupt) 3) THTR (Maskable). l4) RSTH (Softusare Interrupt) a i Ss: ory Locaction where the CPU it us: pases ee loHov does tmierrupk Loo rt: STPAP. on 94 4 4) Tnlerrupt Occurs RST 4-5. 00 36H 2)_ Jump to Fixed Memon Location aj est ee | OF2%y | 3) Bvecute rs@ 4) Return to Math Peagram: Rst 55. oo 30H NTR Not fied:

You might also like