SlideShare a Scribd company logo
1 of 36
Introduction
• An interrupt is an event which informs the
CPU that its service (action) is needed.
• Sources of interrupts:
– internal fault (e.g.. divide by zero, overflow)
– software
– external hardware :
• maskable
• nonmaskable
– reset
Basic Procedure for Processing
Interrupts
• When an interrupt is executed, the mp:
– finishes executing its current instruction (if any).
– saves (PUSH) the flag register, IP and CS register
in the stack.
– goes to a fixed memory location.
– reads the address of the associated ISR.
– Jumps to that address and executes the ISR.
– gets (PULL) the flag register, CS:IP register from
the stack.
– continues executing the previous job (if any).
8088/86 Hardware Interrupts pins
INTR: Interrupt Request.
– Input signal into the CPU
– If it is activated, the CPU will finish the current instruction and
respond with the interrupt acknowledge operation
– Can be masked (ignored) thru instructions CLI and STI
• NMI: NonMaskable interrupt.
– Input signal
– Cannot be masked or unmasked thru CLI and STI
– Examples of use: power frailer. Memory error
• INTA: Interrupt Acknowledge.
– Output signal
The Interrupt flag
• IF (Interrupt Enable Flag) D9: used to mask
any hardware interrupt that may come in
from the INTR pin.
• When IF=0, all hardware interrupt requests
through INTR are masked.
• This has no effect on interrupts coming
from the NMI pin or “INT nn” instructions.
• CLI sets IF to 0, STI sets IF to 1.
INT n and ISR
• n is multiplied by 4
• In the address “4n” the offset address the
ISR is found.
• Example:Intel has set aside INT 2 for the
NMI interrupt.
• Whenever the NMI pin is activated, the
CPU jumps to physical memory location
00008 to fetch the CS:IP of the interrupt
service routine associated with the NMI.
8259
• 8259 is Programmable Interrupt Controller (PIC)
• It is a tool for managing the interrupt requests.
• 8259 is a very flexible peripheral controller chip:
– PIC can deal with up to 64 interrupt inputs
– interrupts can be masked
– various priority schemes can also programmed.
• originally (in PC XT) it is available as a separate IC
• Later the functionality of (two PICs) is in the
motherboards chipset.
• In some of the modern processors, the functionality of
the PIC is built in.
Pin description
• 8-bit bi-directional data bus, one address line is needed,
PIC has two control registers to be programmed, you can think of them as two
output ports or two memory location.
• The direction of data flow is controlled by RD and WR.
• CS is as usual connected to the output of the address decoder.
• Interrupt requests are output on INT which is connected to
the INTR of the processor. Int. acknowledgment is received
by INTA.
• IR0-IR7 allow 8 separate interrupt requests to be inputted
to the PIC.
• sp/en=1 for master , sp/en=0 for slave.
• CAS0-3 inputs/outputs are used when more than one PIC to
cascaded.
FIGURE 9-4 Block diagram and pin definitions for the 8259A Programmable Interrupt Controller (PIC). (Courtesy of Intel Corporation.)
John Uffenbeck
The 80x86 Family: Design, Programming,
and Interfacing, 3e
Copyright ©2002 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
FIGURE 9-5 Interfacing the PIC to the 386 and 486 processors. Two I/O ports are required.
John Uffenbeck
The 80x86 Family: Design, Programming,
and Interfacing, 3e
Copyright ©2002 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
FIGURE 9-7 All interrupt requests must pass through the PIC’s interrupt request register (IRR) and interrupt mask register (IMR). If put
in service, the appropriate bit of the in-service (IS) register is set.
John Uffenbeck
The 80x86 Family: Design, Programming,
and Interfacing, 3e
Copyright ©2002 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Example of two cascaded PICs
OPERATION
• PIC is to be initialized and programmed to control
its operation.
• The operation in simple words:
when an interrupt occurs , the PIC determines the highest
priority, activates the processor via its INTR input, and
sends the type number onto the data bus when the
processor acknowledges the interrupt.
• Priority:
What is used in PC is fully nested mode. That is the lowest
numbered IRQ input has highest priority. Lower priority
interrupts will not be forwarded to the processor until the
higher priority interrupts have been serviced.
FIGURE 9-8 (a) Simultaneous interrupt requests arrive on IR4 and IR6. IR4 has highest priority and its IS bit is set as the IR4 service
routine is put in service. (b) The IR4 service routine issues a rotate-on-nonspecific-EOI command, resetting IS4 and assigning it lowest
priority. IR6 is now placed in service. (c) The IR6 service routine issues a rotate-on-nonspecific-EOI command, resetting IS6 and assigning
it lowest priority.
John Uffenbeck
The 80x86 Family: Design, Programming,
and Interfacing, 3e
Copyright ©2002 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
FIGURE 9-9 Example illustrating the difference between the rotate-on-nonspecific-EOI command and the rotate-on-specific-EOI
command.
John Uffenbeck
The 80x86 Family: Design, Programming,
and Interfacing, 3e
Copyright ©2002 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Modes
• Fully Nested mode
• Special Fully Nested mode
• Nonspecific Rotating
• Specific Rotating
• Special Mask
• Polling
FIGURE 9-11 8259A initialization control word format. (Courtesy of Intel Corporation.)
John Uffenbeck
The 80x86 Family: Design, Programming,
and Interfacing, 3e
Copyright ©2002 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
FIGURE 9-12 8259A initialization sequence. (Courtesy of Intel Corporation.)
John Uffenbeck
The 80x86 Family: Design, Programming,
and Interfacing, 3e
Copyright ©2002 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
FIGURE 9-13 8259A operation control word format. (Courtesy of Intel Corporation.)
John Uffenbeck
The 80x86 Family: Design, Programming,
and Interfacing, 3e
Copyright ©2002 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
DMA
• Direct Memory Access.
• In memory-memory or memory-peripherals communication, the
processor is a “middleman” which is not really needed.
• Used with HOLD HOLDA signals.
• DMA requires another processor - The DMA Controller or DMAC-
to generate the memory and I/O addresses.
• 8237 is a DMAC.
• In IBM PC, 8237 was used to speed up the read or write operation by
the slow 8088 processor.
• Nowadays, It is usually used by sound cards and by memory
controllers to generate row address for refreshing.
FIGURE 9-17 A DMA controller allows the peripheral to interface directly with memory without processor intervention. This allows the
data transfer rate to approach the access time of memory.
John Uffenbeck
The 80x86 Family: Design, Programming,
and Interfacing, 3e
Copyright ©2002 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Types:
Sequential DMA
Simultaneous DMA
FIGURE 9-18 Three methods (MODES) of DMA operation: (a) byte; (b) burst; (c) block.
John Uffenbeck
The 80x86 Family: Design, Programming,
and Interfacing, 3e
Copyright ©2002 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
IO/summery
Three ways to synchronize the processor to data rate
of peripherals:
1- Polling: which provides a fast response but it the
processor recourses are dedicated to one peripheral.
2- Interrupt approach: is much more efficient. the
processor only services the peripheral when data is
required. requires high software overhead.
3-DMA is a third solution but it increases the
complexity of the hardware system.
Serial I/O
• Microprocessors are by nature parallel machines.
They transmit/receive data in parallel bits (8,16,32,64).
• It is required sometimes to send the data serially
(one bit at a time).
• serial transmitting is slower but requires less wires
and it is easier to send it for long distances.
Synchronous vs. Asynchronous
• Asynchronous : Start bits, Stop bits, and Data
• Ex: the data byte is 7BH:
FIGURE 10-5 (a) Serial data transmitted at the proper rate. (b) The data rate is too fast. (c) The data rate is too slow.
John Uffenbeck
The 80x86 Family: Design, Programming,
and Interfacing, 3e
Copyright ©2002 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Serial Frame (Synchronous)
Bit 7 0 1 2 3 4 5 6 7 0
No start or stop bits, timing synchronized with special ASCII
characters (SYN)
Time
FIGURE 10-2 One-bit input and output port. With appropriate software this circuit can function as a serial I/O channel.
John Uffenbeck
The 80x86 Family: Design, Programming,
and Interfacing, 3e
Copyright ©2002 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
UART/USART
• Writing a program compatible with all different serial communication
protocols is difficult and it is an inefficient use of microprocessor.
UART:
Universal Asynchronous Receiver/Transmitter chip.
USART:
Universal Synchronous/Asynchronous Receiver/Transmitter chip.
• The microprocessor sends/receives the data to the UART in parallel,
while with I/O, the UART transmits/receive data serially.
• So, the UART appears to the microprocessor to be a conventional
parallel port.
• 8251 functions are integrated into standard PC interface chip.
UART / CPU interface
CPU
8251
status
(8 bit)
data
(8 bit)
serial
port
xmit/
rcv
UART/USART
• 8251 USART
• 8250/16450 UART is a newer version of 8251.
• 16550 is the latest version UART.
Bus Standards
• ISA (Industry Standard Architecture)
– 8 or 16 bit, fast disappearing
• PCI (Peripheral Component Interconnect)
– 32 bit, still widely in use
Graphics Cards
• Old cards are ISA or PCI
• Now: AGP (Accelerated Graphics Port)
– Connects directly to CPU and RAM
– Fast: 66 MHz on a 32-bit bus
– No other devices sharing same bus
Is there any thing going to replace serial ports, parallel
ports and some expansion cards.
Maybe
USB
(Universal Serial Bus)
• Features of USB
• One type of device cable. USB also standardizes connectors and cables. USB cables have
two connectors: an A connector and a B connector. The A connector is the end that goes into
the computer, and the B connector goes into the device. The total cable length between
devices must not exceed 5 meters, or 16 feet.
• Operating System support. USB driver support is built into the latest versions of the
Windows and Apple operating systems, but Windows 98, Windows 2000, MAC OS 8.1 or
higher offer much more USB support.
• Two device speeds. Low speed (1.5 Mbps) is mostly used for input devices such as mice and
keyboards, while high speed (up to 12 Mbps) is used mostly for video/audio capture devices
and storage devices.
• Hot pluggable. Devices can be attached to and detached from the computer without turning
off the system. No jumper or IRQ settings are necessary.
• Plug-and-Play. Once the device is connected to the computer, the system automatically
recognizes the device connected and installs the appropriate drivers.
• 127 peripherals. USB makes it possible to simultaneously use and connect up to 127 devices
to a single bus. The computer typically has 2 USB ports, so USB hubs are used to connect
additional devices to the computer. USB hubs have multiple USB ports for connection of
USB devices and for daisy chaining one or more hubs.
• Bus-powered and self-powered. USB supports both bus-powered and self-powered devices.
Good examples of bus-powered and self-powered devices are USB hubs. USB hubs can draw
power either from the host device (bus-powered) or from an external AC power supply (self-
powered). Each downstream port on a bus-powered hub typically supplies up to 100 mA. On
the other hand, each downstream port on a self-powered hub typically supplies up to 500mA.

More Related Content

What's hot

Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)Zubair Khalid
 
Direct memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA ControllerDirect memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA ControllerMuhammed Afsal Villan
 
Data transfer techniques 8085
Data transfer techniques 8085Data transfer techniques 8085
Data transfer techniques 8085ShivamSood22
 
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. KawareProf. Swapnil V. Kaware
 
Unit – 2
Unit – 2Unit – 2
Unit – 2techbed
 
Introduction to Interfacing Technique
Introduction to Interfacing TechniqueIntroduction to Interfacing Technique
Introduction to Interfacing TechniqueMabeth MaRiyah Ramos
 
Module 3 special purpose programmable devices and their interfacing
Module 3 special purpose programmable devices and their interfacingModule 3 special purpose programmable devices and their interfacing
Module 3 special purpose programmable devices and their interfacingDeepak John
 
Intel 8257 programmable dma controller
Intel 8257 programmable dma controllerIntel 8257 programmable dma controller
Intel 8257 programmable dma controllerabdulugc
 
8259 A P R O G R A M M A B L E I N T E R R U P T C O N T R O L L E R2
8259 A  P R O G R A M M A B L E  I N T E R R U P T  C O N T R O L L E R28259 A  P R O G R A M M A B L E  I N T E R R U P T  C O N T R O L L E R2
8259 A P R O G R A M M A B L E I N T E R R U P T C O N T R O L L E R2Aisu
 
Direct Memory Access
Direct Memory AccessDirect Memory Access
Direct Memory AccessTuqa Rmahi
 
Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Jismy .K.Jose
 
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. KawareProf. Swapnil V. Kaware
 
Direct memory access
Direct memory accessDirect memory access
Direct memory accessshubham kuwar
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output OrganizationKamal Acharya
 

What's hot (17)

Dma
DmaDma
Dma
 
1.ppi 8255
1.ppi 8255 1.ppi 8255
1.ppi 8255
 
Direct memory access (dma)
Direct memory access (dma)Direct memory access (dma)
Direct memory access (dma)
 
Direct memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA ControllerDirect memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA Controller
 
Data transfer techniques 8085
Data transfer techniques 8085Data transfer techniques 8085
Data transfer techniques 8085
 
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-1) By Er. Swapnil V. Kaware
 
Unit – 2
Unit – 2Unit – 2
Unit – 2
 
Direct Memory Access
Direct Memory AccessDirect Memory Access
Direct Memory Access
 
Introduction to Interfacing Technique
Introduction to Interfacing TechniqueIntroduction to Interfacing Technique
Introduction to Interfacing Technique
 
Module 3 special purpose programmable devices and their interfacing
Module 3 special purpose programmable devices and their interfacingModule 3 special purpose programmable devices and their interfacing
Module 3 special purpose programmable devices and their interfacing
 
Intel 8257 programmable dma controller
Intel 8257 programmable dma controllerIntel 8257 programmable dma controller
Intel 8257 programmable dma controller
 
8259 A P R O G R A M M A B L E I N T E R R U P T C O N T R O L L E R2
8259 A  P R O G R A M M A B L E  I N T E R R U P T  C O N T R O L L E R28259 A  P R O G R A M M A B L E  I N T E R R U P T  C O N T R O L L E R2
8259 A P R O G R A M M A B L E I N T E R R U P T C O N T R O L L E R2
 
Direct Memory Access
Direct Memory AccessDirect Memory Access
Direct Memory Access
 
Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086
 
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. KawareMicroprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
Microprocessor & Interfacing (Part-2) By Er. Swapnil V. Kaware
 
Direct memory access
Direct memory accessDirect memory access
Direct memory access
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 

Similar to dma controller Direct Memory Access,The 8237 DMA Controller dma

8251
82518251
8251Aisu
 
Microprocessors-based systems (under graduate course) Lecture 9 of 9
Microprocessors-based systems (under graduate course) Lecture 9 of 9 Microprocessors-based systems (under graduate course) Lecture 9 of 9
Microprocessors-based systems (under graduate course) Lecture 9 of 9 Randa Elanwar
 
PIC Introduction and explained in detailed
PIC Introduction and explained in detailedPIC Introduction and explained in detailed
PIC Introduction and explained in detailedAnkita Tiwari
 
B sc e5.2 mp unit 3 interfacing
B sc e5.2 mp unit 3 interfacingB sc e5.2 mp unit 3 interfacing
B sc e5.2 mp unit 3 interfacingMahiboobAliMulla
 
With suitable diagram explain the working of 8255 a and inerrupts
With suitable diagram explain the working of 8255 a and inerruptsWith suitable diagram explain the working of 8255 a and inerrupts
With suitable diagram explain the working of 8255 a and inerruptsransherraj
 
Introduction to microprocessor
Introduction to microprocessorIntroduction to microprocessor
Introduction to microprocessorRamaPrabha24
 
Chp4 introduction to the pic microcontroller copy
Chp4 introduction to the pic microcontroller   copyChp4 introduction to the pic microcontroller   copy
Chp4 introduction to the pic microcontroller copymkazree
 
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchDPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchJim St. Leger
 
MICROPROCESSOR_Notes.pptx
MICROPROCESSOR_Notes.pptxMICROPROCESSOR_Notes.pptx
MICROPROCESSOR_Notes.pptxWorkingad
 
Microprocessor questions converted
Microprocessor questions convertedMicroprocessor questions converted
Microprocessor questions convertedArghodeepPaul
 
Timing n interrupt.pptx
Timing n interrupt.pptxTiming n interrupt.pptx
Timing n interrupt.pptxJasaRChoudhary
 
Live B tech Projects & Industrial Training @Technogroovy
Live B tech Projects & Industrial Training @Technogroovy Live B tech Projects & Industrial Training @Technogroovy
Live B tech Projects & Industrial Training @Technogroovy Technogroovy India
 
Digital Electronics & Fundamental of Microprocessor-II
Digital Electronics & Fundamental of Microprocessor-IIDigital Electronics & Fundamental of Microprocessor-II
Digital Electronics & Fundamental of Microprocessor-IIpravinwj
 

Similar to dma controller Direct Memory Access,The 8237 DMA Controller dma (20)

8251
82518251
8251
 
Introduction to 8085svv
Introduction to 8085svvIntroduction to 8085svv
Introduction to 8085svv
 
Microprocessors-based systems (under graduate course) Lecture 9 of 9
Microprocessors-based systems (under graduate course) Lecture 9 of 9 Microprocessors-based systems (under graduate course) Lecture 9 of 9
Microprocessors-based systems (under graduate course) Lecture 9 of 9
 
Coa INTERUPT
Coa INTERUPTCoa INTERUPT
Coa INTERUPT
 
PIC Introduction and explained in detailed
PIC Introduction and explained in detailedPIC Introduction and explained in detailed
PIC Introduction and explained in detailed
 
B sc e5.2 mp unit 3 interfacing
B sc e5.2 mp unit 3 interfacingB sc e5.2 mp unit 3 interfacing
B sc e5.2 mp unit 3 interfacing
 
With suitable diagram explain the working of 8255 a and inerrupts
With suitable diagram explain the working of 8255 a and inerruptsWith suitable diagram explain the working of 8255 a and inerrupts
With suitable diagram explain the working of 8255 a and inerrupts
 
Introduction to 8085 by Adi PPT.pdf
Introduction to 8085 by Adi PPT.pdfIntroduction to 8085 by Adi PPT.pdf
Introduction to 8085 by Adi PPT.pdf
 
22446 s11 dma
22446 s11 dma22446 s11 dma
22446 s11 dma
 
Introduction to microprocessor
Introduction to microprocessorIntroduction to microprocessor
Introduction to microprocessor
 
Chp4 introduction to the pic microcontroller copy
Chp4 introduction to the pic microcontroller   copyChp4 introduction to the pic microcontroller   copy
Chp4 introduction to the pic microcontroller copy
 
Class8
Class8Class8
Class8
 
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchDPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
 
MICROPROCESSOR_Notes.pptx
MICROPROCESSOR_Notes.pptxMICROPROCESSOR_Notes.pptx
MICROPROCESSOR_Notes.pptx
 
Microprocessor questions converted
Microprocessor questions convertedMicroprocessor questions converted
Microprocessor questions converted
 
MP_MC.pdf
MP_MC.pdfMP_MC.pdf
MP_MC.pdf
 
Timing n interrupt.pptx
Timing n interrupt.pptxTiming n interrupt.pptx
Timing n interrupt.pptx
 
2 unit-es-printed
2 unit-es-printed2 unit-es-printed
2 unit-es-printed
 
Live B tech Projects & Industrial Training @Technogroovy
Live B tech Projects & Industrial Training @Technogroovy Live B tech Projects & Industrial Training @Technogroovy
Live B tech Projects & Industrial Training @Technogroovy
 
Digital Electronics & Fundamental of Microprocessor-II
Digital Electronics & Fundamental of Microprocessor-IIDigital Electronics & Fundamental of Microprocessor-II
Digital Electronics & Fundamental of Microprocessor-II
 

Recently uploaded

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 

Recently uploaded (20)

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 

dma controller Direct Memory Access,The 8237 DMA Controller dma

  • 1. Introduction • An interrupt is an event which informs the CPU that its service (action) is needed. • Sources of interrupts: – internal fault (e.g.. divide by zero, overflow) – software – external hardware : • maskable • nonmaskable – reset
  • 2. Basic Procedure for Processing Interrupts • When an interrupt is executed, the mp: – finishes executing its current instruction (if any). – saves (PUSH) the flag register, IP and CS register in the stack. – goes to a fixed memory location. – reads the address of the associated ISR. – Jumps to that address and executes the ISR. – gets (PULL) the flag register, CS:IP register from the stack. – continues executing the previous job (if any).
  • 3. 8088/86 Hardware Interrupts pins INTR: Interrupt Request. – Input signal into the CPU – If it is activated, the CPU will finish the current instruction and respond with the interrupt acknowledge operation – Can be masked (ignored) thru instructions CLI and STI • NMI: NonMaskable interrupt. – Input signal – Cannot be masked or unmasked thru CLI and STI – Examples of use: power frailer. Memory error • INTA: Interrupt Acknowledge. – Output signal
  • 4. The Interrupt flag • IF (Interrupt Enable Flag) D9: used to mask any hardware interrupt that may come in from the INTR pin. • When IF=0, all hardware interrupt requests through INTR are masked. • This has no effect on interrupts coming from the NMI pin or “INT nn” instructions. • CLI sets IF to 0, STI sets IF to 1.
  • 5. INT n and ISR • n is multiplied by 4 • In the address “4n” the offset address the ISR is found. • Example:Intel has set aside INT 2 for the NMI interrupt. • Whenever the NMI pin is activated, the CPU jumps to physical memory location 00008 to fetch the CS:IP of the interrupt service routine associated with the NMI.
  • 6. 8259 • 8259 is Programmable Interrupt Controller (PIC) • It is a tool for managing the interrupt requests. • 8259 is a very flexible peripheral controller chip: – PIC can deal with up to 64 interrupt inputs – interrupts can be masked – various priority schemes can also programmed. • originally (in PC XT) it is available as a separate IC • Later the functionality of (two PICs) is in the motherboards chipset. • In some of the modern processors, the functionality of the PIC is built in.
  • 7. Pin description • 8-bit bi-directional data bus, one address line is needed, PIC has two control registers to be programmed, you can think of them as two output ports or two memory location. • The direction of data flow is controlled by RD and WR. • CS is as usual connected to the output of the address decoder. • Interrupt requests are output on INT which is connected to the INTR of the processor. Int. acknowledgment is received by INTA. • IR0-IR7 allow 8 separate interrupt requests to be inputted to the PIC. • sp/en=1 for master , sp/en=0 for slave. • CAS0-3 inputs/outputs are used when more than one PIC to cascaded.
  • 8. FIGURE 9-4 Block diagram and pin definitions for the 8259A Programmable Interrupt Controller (PIC). (Courtesy of Intel Corporation.) John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
  • 9. FIGURE 9-5 Interfacing the PIC to the 386 and 486 processors. Two I/O ports are required. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
  • 10. FIGURE 9-7 All interrupt requests must pass through the PIC’s interrupt request register (IRR) and interrupt mask register (IMR). If put in service, the appropriate bit of the in-service (IS) register is set. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
  • 11. Example of two cascaded PICs
  • 12. OPERATION • PIC is to be initialized and programmed to control its operation. • The operation in simple words: when an interrupt occurs , the PIC determines the highest priority, activates the processor via its INTR input, and sends the type number onto the data bus when the processor acknowledges the interrupt. • Priority: What is used in PC is fully nested mode. That is the lowest numbered IRQ input has highest priority. Lower priority interrupts will not be forwarded to the processor until the higher priority interrupts have been serviced.
  • 13. FIGURE 9-8 (a) Simultaneous interrupt requests arrive on IR4 and IR6. IR4 has highest priority and its IS bit is set as the IR4 service routine is put in service. (b) The IR4 service routine issues a rotate-on-nonspecific-EOI command, resetting IS4 and assigning it lowest priority. IR6 is now placed in service. (c) The IR6 service routine issues a rotate-on-nonspecific-EOI command, resetting IS6 and assigning it lowest priority. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
  • 14. FIGURE 9-9 Example illustrating the difference between the rotate-on-nonspecific-EOI command and the rotate-on-specific-EOI command. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
  • 15. Modes • Fully Nested mode • Special Fully Nested mode • Nonspecific Rotating • Specific Rotating • Special Mask • Polling
  • 16. FIGURE 9-11 8259A initialization control word format. (Courtesy of Intel Corporation.) John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
  • 17. FIGURE 9-12 8259A initialization sequence. (Courtesy of Intel Corporation.) John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
  • 18. FIGURE 9-13 8259A operation control word format. (Courtesy of Intel Corporation.) John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
  • 19. DMA • Direct Memory Access. • In memory-memory or memory-peripherals communication, the processor is a “middleman” which is not really needed. • Used with HOLD HOLDA signals. • DMA requires another processor - The DMA Controller or DMAC- to generate the memory and I/O addresses. • 8237 is a DMAC. • In IBM PC, 8237 was used to speed up the read or write operation by the slow 8088 processor. • Nowadays, It is usually used by sound cards and by memory controllers to generate row address for refreshing.
  • 20. FIGURE 9-17 A DMA controller allows the peripheral to interface directly with memory without processor intervention. This allows the data transfer rate to approach the access time of memory. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved. Types: Sequential DMA Simultaneous DMA
  • 21. FIGURE 9-18 Three methods (MODES) of DMA operation: (a) byte; (b) burst; (c) block. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
  • 22. IO/summery Three ways to synchronize the processor to data rate of peripherals: 1- Polling: which provides a fast response but it the processor recourses are dedicated to one peripheral. 2- Interrupt approach: is much more efficient. the processor only services the peripheral when data is required. requires high software overhead. 3-DMA is a third solution but it increases the complexity of the hardware system.
  • 23. Serial I/O • Microprocessors are by nature parallel machines. They transmit/receive data in parallel bits (8,16,32,64). • It is required sometimes to send the data serially (one bit at a time). • serial transmitting is slower but requires less wires and it is easier to send it for long distances.
  • 24. Synchronous vs. Asynchronous • Asynchronous : Start bits, Stop bits, and Data • Ex: the data byte is 7BH:
  • 25. FIGURE 10-5 (a) Serial data transmitted at the proper rate. (b) The data rate is too fast. (c) The data rate is too slow. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
  • 26. Serial Frame (Synchronous) Bit 7 0 1 2 3 4 5 6 7 0 No start or stop bits, timing synchronized with special ASCII characters (SYN) Time
  • 27. FIGURE 10-2 One-bit input and output port. With appropriate software this circuit can function as a serial I/O channel. John Uffenbeck The 80x86 Family: Design, Programming, and Interfacing, 3e Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.
  • 28. UART/USART • Writing a program compatible with all different serial communication protocols is difficult and it is an inefficient use of microprocessor. UART: Universal Asynchronous Receiver/Transmitter chip. USART: Universal Synchronous/Asynchronous Receiver/Transmitter chip. • The microprocessor sends/receives the data to the UART in parallel, while with I/O, the UART transmits/receive data serially. • So, the UART appears to the microprocessor to be a conventional parallel port. • 8251 functions are integrated into standard PC interface chip.
  • 29. UART / CPU interface CPU 8251 status (8 bit) data (8 bit) serial port xmit/ rcv
  • 30. UART/USART • 8251 USART • 8250/16450 UART is a newer version of 8251. • 16550 is the latest version UART.
  • 31. Bus Standards • ISA (Industry Standard Architecture) – 8 or 16 bit, fast disappearing • PCI (Peripheral Component Interconnect) – 32 bit, still widely in use
  • 32.
  • 33.
  • 34. Graphics Cards • Old cards are ISA or PCI • Now: AGP (Accelerated Graphics Port) – Connects directly to CPU and RAM – Fast: 66 MHz on a 32-bit bus – No other devices sharing same bus
  • 35. Is there any thing going to replace serial ports, parallel ports and some expansion cards. Maybe USB (Universal Serial Bus)
  • 36. • Features of USB • One type of device cable. USB also standardizes connectors and cables. USB cables have two connectors: an A connector and a B connector. The A connector is the end that goes into the computer, and the B connector goes into the device. The total cable length between devices must not exceed 5 meters, or 16 feet. • Operating System support. USB driver support is built into the latest versions of the Windows and Apple operating systems, but Windows 98, Windows 2000, MAC OS 8.1 or higher offer much more USB support. • Two device speeds. Low speed (1.5 Mbps) is mostly used for input devices such as mice and keyboards, while high speed (up to 12 Mbps) is used mostly for video/audio capture devices and storage devices. • Hot pluggable. Devices can be attached to and detached from the computer without turning off the system. No jumper or IRQ settings are necessary. • Plug-and-Play. Once the device is connected to the computer, the system automatically recognizes the device connected and installs the appropriate drivers. • 127 peripherals. USB makes it possible to simultaneously use and connect up to 127 devices to a single bus. The computer typically has 2 USB ports, so USB hubs are used to connect additional devices to the computer. USB hubs have multiple USB ports for connection of USB devices and for daisy chaining one or more hubs. • Bus-powered and self-powered. USB supports both bus-powered and self-powered devices. Good examples of bus-powered and self-powered devices are USB hubs. USB hubs can draw power either from the host device (bus-powered) or from an external AC power supply (self- powered). Each downstream port on a bus-powered hub typically supplies up to 100 mA. On the other hand, each downstream port on a self-powered hub typically supplies up to 500mA.