SlideShare a Scribd company logo
1 of 20
DIRECT MEMORY
ACCESS
DMA CONTROLLER 8237 INTERFACING
Er. Sulav Paudel | MSc
DMA
◦ An I/O technique commonly used for high data transfer.
◦ For example, data transfer between system memory and a floppy disk.
◦ In status check, I/O and interrupt I/O, data transfer is relatively slow
because each instruction needs to be fetched and executed.
◦ In DMA, the MPU release the control of the buses to a device called a
DMA Controller.
◦ The controller manages data transfer between memory and a peripheral
under its control, thus by passing the MPU
Er. Sulav Paudel | MSc
DMA
◦ DMA uses two signals – HOLD and HLDA in 8085 microprocessor
◦ HOLD:
 This is an active high signal to 8085 from another master requesting the use
of address and data buses.
 After receiving the HOLD request, the MPU relinquishes the buses in the
following machine cycle.
 All buses are tri-stated and hold acknowledge (HLDA) signal is sent out.
 MPU regains the control of the buses after HOLD goes low.
Er. Sulav Paudel | MSc
DMA
◦ HLDA
 This is active high output signal indicating that MPU is relinquishing
control of the buses.
 A DMA Controller uses these signals as if it were a peripheral
requesting the MPU for the control of the buses.
Er. Sulav Paudel | MSc
Concept of DMA
Er. Sulav Paudel | MSc
Block Diagram of DMA Transfer
Er. Sulav Paudel | MSc
DMA Controller
◦ The data transfer technique in which peripherals manage the memory
buses for direct interaction with main memory without involving the
CPU is called direct memory access (DMA).
◦ Using DMA technique large amounts of data can be transferred between
memory and the peripheral without severely impacting CPU
performance.
◦ During the DMA transfer, the CPU is idle and has no control of the
memory buses.
◦ A DMA controller takes over the buses to manage the transfer directly
between the I/O device(s) and main memory.
Er. Sulav Paudel | MSc
DMA Controller
◦ The control unit communicates the CPU via data bus and control lines.
◦ The DMA controls/relinquishes the system bus using BR (Bus Request)
and BG (Bus Grant) signals.
◦ DMA operates read and write operations via RD (Read) and WR (Write)
signals.
◦ DMA sends request and acknowledge to I/O devices via DMA request
and DMA acknowledge signals.
◦ The registers in DMA are selected by CPU through the address bus by
enabling DS (DMA Select) and RS (Register Select) inputs.
Er. Sulav Paudel | MSc
DMA Controller
◦ All registers in the DMA appear to the CPU as I/O interface registers.
◦ The address register contains an address to specify the desired location
in memory.
◦ It is incremented after each word that is transferred to the memory.
◦ The word count register holds the number of words to be transferred.
◦ It is decremented by one after each word transfer and internally tested
for zero.
Er. Sulav Paudel | MSc
DMA Transfer Operation
◦ The DMA request CPU to handle control of buses to the DMA using bus request
(BR) signal.
◦ The CPU grants the control of buses to DMA using bus grant (BG) signal after
placing the address bus, data bus and read and write lines into high impedance
state (which behave like open circuit).
◦ CPU initializes the DMA by sending following information through the data bus.
1. Starting address of memory block for read or write operation.
2. The word count which is the no. of words in the memory block.
3. Control to specify the mode of transfer such as read or write.
4. A control to start the DMA transfer.
Er. Sulav Paudel | MSc
DMA Transfer Operation
◦ The DMA takes control over the buses directly interacts with memory
and I/O units and transfers the data without CPU intervention.
◦ When the transfer completes, DMA disables the BR line.
◦ Thus CPU disable BG line, takes control over the buses and return to its
normal operation.
Er. Sulav Paudel | MSc
Sequence of DMA Transfer
The sequence of DMA transfer as shown in the previous block diagram can be
explained below:
1. Originally, microprocessor is connected to the memory as shown in figure
above with switches closed for address, data and control buses. When
peripheral wants to transfer data using DMA Transfer, it sends DMA request,
DREQ signal to the DMA controller.
2. If the input (channel) of the DMA controller is unmasked, the DMA controller
will send a hold-request, HRQ signal to the microprocessor HOLD input.
Er. Sulav Paudel | MSc
3. The microprocessor finishes the current machine cycle and floats its
buses, sending out a hold acknowledge signal, HLDA to the DMA
controller.
4. When DMA controller receives HLDA signal, it will send a control
signal which throws the 3 bus switches down to their DMA position.
This disconnects the processor from buses and connects DMA
controller to the buses. Now DMA controller sends out the address
of the byte to the transferred and sends out DMA acknowledge
(DACK) signal to the peripheral device to tell it to get ready to output
the byte.
Er. Sulav Paudel | MSc
5. Then the DMA transfer begins and finally when the data transfer is
complete, the DMA controller unasserted its hold-request signal to
the processor and releases the buses.
Er. Sulav Paudel | MSc
8237 DMA Controller
◦ On chip four independent DMA channels. Number of channels can be
increased by cascading DMA controller chips.
◦ Transfers data between two memory blocks in DMA mode:
 Memory to Memory Transfer
 Memory to I/O Device
 I/O Device to Memory
 I/O Device to I/O Device
Er. Sulav Paudel | MSc
8237 DMA Controller
◦ In memory to memory transfer a single word can be written into all
locations of memory block.
◦ Data transfer rate is very high e.g. 1.6M bytes/second for 8237-2 of 5
Mhz.
◦ Directly expandable to any number of channels. It does not require any
additional chip for cascading. There is no limitations on cascading.
◦ It provides EOP line that is used to terminate DMA operation. This signal
is generated by external hardware.
Er. Sulav Paudel | MSc
8237 DMA Controller
◦ The address of memory is either incremented or decremented after each DMA
cycle depending upon the mode.
◦ DMA can be requested by setting an appropriate bit of request register.
◦ Independent control of DREQ and DACK signal, DREQ and DACK signals can be
initialize either for active high or active low.
◦ Provides compressed timings to improve throughput of the system.
◦ It can compress the transfer time to two cycles(2S).
Er. Sulav Paudel | MSc
DMA Data Transfer
Er. Sulav Paudel | MSc
Block Diagram of 8237
Er. Sulav Paudel | MSc
Signals of 8237 DMA
◦ CLK:
 CLK input line ignored in slave mode.
 In master mode, this signal controls all internal and external DMA
operations.
 The data transfer rate depends upon the frequency of this signal.
 CS:
 In slave mode, this signal is generated by address decoder to select
8287 chip to communication between CPU and 8237.
 In master mode, this signal is ignored.
Er. Sulav Paudel | MSc

More Related Content

What's hot

Modes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output OrganizationModes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output OrganizationMOHIT AGARWAL
 
Direct Memory Access & Interrrupts
Direct Memory Access & InterrruptsDirect Memory Access & Interrrupts
Direct Memory Access & InterrruptsSharmilaChidaravalli
 
Computer organization memory
Computer organization memoryComputer organization memory
Computer organization memoryDeepak John
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chipsSrikrishna Thota
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output OrganizationKamal Acharya
 
Cache memory
Cache memoryCache memory
Cache memoryAnuj Modi
 
Direct Memory Access
Direct Memory AccessDirect Memory Access
Direct Memory AccessTuqa Rmahi
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architectureFaisal Hussain
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 MicroprocessorNahian Ahmed
 
Memory organisation ppt final presentation
Memory organisation ppt final presentationMemory organisation ppt final presentation
Memory organisation ppt final presentationrockymani
 
Microprocessor 8085 complete
Microprocessor 8085 completeMicroprocessor 8085 complete
Microprocessor 8085 completeShubham Singh
 

What's hot (20)

Modes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output OrganizationModes Of Transfer in Input/Output Organization
Modes Of Transfer in Input/Output Organization
 
Direct Memory Access & Interrrupts
Direct Memory Access & InterrruptsDirect Memory Access & Interrrupts
Direct Memory Access & Interrrupts
 
Direct memory access
Direct memory accessDirect memory access
Direct memory access
 
Direct Memory Access ppt
Direct Memory Access pptDirect Memory Access ppt
Direct Memory Access ppt
 
Computer organization memory
Computer organization memoryComputer organization memory
Computer organization memory
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chips
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
8086 memory segmentation
8086 memory segmentation8086 memory segmentation
8086 memory segmentation
 
Cache memory
Cache memoryCache memory
Cache memory
 
DMA presentation [By- Digvijay]
DMA presentation [By- Digvijay]DMA presentation [By- Digvijay]
DMA presentation [By- Digvijay]
 
Direct Memory Access
Direct Memory AccessDirect Memory Access
Direct Memory Access
 
Cache memory
Cache memoryCache memory
Cache memory
 
8251 USART
8251 USART8251 USART
8251 USART
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Memory organization in computer architecture
Memory organization in computer architectureMemory organization in computer architecture
Memory organization in computer architecture
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
 
Modes of transfer
Modes of transferModes of transfer
Modes of transfer
 
Control unit
Control unitControl unit
Control unit
 
Memory organisation ppt final presentation
Memory organisation ppt final presentationMemory organisation ppt final presentation
Memory organisation ppt final presentation
 
Microprocessor 8085 complete
Microprocessor 8085 completeMicroprocessor 8085 complete
Microprocessor 8085 complete
 

Similar to Direct Memory Access

Dma and dma controller 8237
Dma and dma controller 8237Dma and dma controller 8237
Dma and dma controller 8237Ashwini Awatare
 
MPI UNIT 4 - (Introduction to DMA and ADC)
MPI UNIT 4 - (Introduction to DMA and ADC)MPI UNIT 4 - (Introduction to DMA and ADC)
MPI UNIT 4 - (Introduction to DMA and ADC)RaviKiranVarma4
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA ControllerShivamSood22
 
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257MdFazleRabbi18
 
8237 / 8257 DMA
8237 / 8257 DMA8237 / 8257 DMA
8237 / 8257 DMAAJAL A J
 
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
 
I/O Interfaces: Bridging the Digital and Physical Worlds
I/O Interfaces: Bridging the Digital and Physical WorldsI/O Interfaces: Bridging the Digital and Physical Worlds
I/O Interfaces: Bridging the Digital and Physical WorldsGreen University of Bangladesh
 
Dma transfer
Dma transferDma transfer
Dma transfergmnithya
 
DMA airctecture.pptx
DMA airctecture.pptxDMA airctecture.pptx
DMA airctecture.pptxsuryansh85
 
DMA controller intel 8257
DMA controller intel 8257DMA controller intel 8257
DMA controller intel 8257Daniel Ilunga
 
MICROPROCESSOR INPUT OUTPUT OPERATIONS
MICROPROCESSOR INPUT OUTPUT OPERATIONSMICROPROCESSOR INPUT OUTPUT OPERATIONS
MICROPROCESSOR INPUT OUTPUT OPERATIONSGeorge Thomas
 
DMA Controller Modes Of Operation
DMA Controller Modes Of OperationDMA Controller Modes Of Operation
DMA Controller Modes Of OperationNoor Nabi
 
Unit – 2
Unit – 2Unit – 2
Unit – 2techbed
 

Similar to Direct Memory Access (20)

Dma and dma controller 8237
Dma and dma controller 8237Dma and dma controller 8237
Dma and dma controller 8237
 
MPI UNIT 4 - (Introduction to DMA and ADC)
MPI UNIT 4 - (Introduction to DMA and ADC)MPI UNIT 4 - (Introduction to DMA and ADC)
MPI UNIT 4 - (Introduction to DMA and ADC)
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
 
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257
 
Direct Memory Access.pdf
Direct Memory Access.pdfDirect Memory Access.pdf
Direct Memory Access.pdf
 
8237 / 8257 DMA
8237 / 8257 DMA8237 / 8257 DMA
8237 / 8257 DMA
 
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
 
DMA
DMADMA
DMA
 
I/O Interfaces: Bridging the Digital and Physical Worlds
I/O Interfaces: Bridging the Digital and Physical WorldsI/O Interfaces: Bridging the Digital and Physical Worlds
I/O Interfaces: Bridging the Digital and Physical Worlds
 
Dma transfer
Dma transferDma transfer
Dma transfer
 
Concept of dma
Concept of dmaConcept of dma
Concept of dma
 
DMA airctecture.pptx
DMA airctecture.pptxDMA airctecture.pptx
DMA airctecture.pptx
 
Programmable dma controller 8237
Programmable dma controller 8237Programmable dma controller 8237
Programmable dma controller 8237
 
DMA controller intel 8257
DMA controller intel 8257DMA controller intel 8257
DMA controller intel 8257
 
MICROPROCESSOR INPUT OUTPUT OPERATIONS
MICROPROCESSOR INPUT OUTPUT OPERATIONSMICROPROCESSOR INPUT OUTPUT OPERATIONS
MICROPROCESSOR INPUT OUTPUT OPERATIONS
 
UNIT 3.pptx
UNIT 3.pptxUNIT 3.pptx
UNIT 3.pptx
 
DMA Controller Modes Of Operation
DMA Controller Modes Of OperationDMA Controller Modes Of Operation
DMA Controller Modes Of Operation
 
Unit – 2
Unit – 2Unit – 2
Unit – 2
 
Es notes unit 2
Es notes unit 2Es notes unit 2
Es notes unit 2
 
DDR2 SDRAM
DDR2 SDRAMDDR2 SDRAM
DDR2 SDRAM
 

Recently uploaded

Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 

Recently uploaded (20)

Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 

Direct Memory Access

  • 1. DIRECT MEMORY ACCESS DMA CONTROLLER 8237 INTERFACING Er. Sulav Paudel | MSc
  • 2. DMA ◦ An I/O technique commonly used for high data transfer. ◦ For example, data transfer between system memory and a floppy disk. ◦ In status check, I/O and interrupt I/O, data transfer is relatively slow because each instruction needs to be fetched and executed. ◦ In DMA, the MPU release the control of the buses to a device called a DMA Controller. ◦ The controller manages data transfer between memory and a peripheral under its control, thus by passing the MPU Er. Sulav Paudel | MSc
  • 3. DMA ◦ DMA uses two signals – HOLD and HLDA in 8085 microprocessor ◦ HOLD:  This is an active high signal to 8085 from another master requesting the use of address and data buses.  After receiving the HOLD request, the MPU relinquishes the buses in the following machine cycle.  All buses are tri-stated and hold acknowledge (HLDA) signal is sent out.  MPU regains the control of the buses after HOLD goes low. Er. Sulav Paudel | MSc
  • 4. DMA ◦ HLDA  This is active high output signal indicating that MPU is relinquishing control of the buses.  A DMA Controller uses these signals as if it were a peripheral requesting the MPU for the control of the buses. Er. Sulav Paudel | MSc
  • 5. Concept of DMA Er. Sulav Paudel | MSc
  • 6. Block Diagram of DMA Transfer Er. Sulav Paudel | MSc
  • 7. DMA Controller ◦ The data transfer technique in which peripherals manage the memory buses for direct interaction with main memory without involving the CPU is called direct memory access (DMA). ◦ Using DMA technique large amounts of data can be transferred between memory and the peripheral without severely impacting CPU performance. ◦ During the DMA transfer, the CPU is idle and has no control of the memory buses. ◦ A DMA controller takes over the buses to manage the transfer directly between the I/O device(s) and main memory. Er. Sulav Paudel | MSc
  • 8. DMA Controller ◦ The control unit communicates the CPU via data bus and control lines. ◦ The DMA controls/relinquishes the system bus using BR (Bus Request) and BG (Bus Grant) signals. ◦ DMA operates read and write operations via RD (Read) and WR (Write) signals. ◦ DMA sends request and acknowledge to I/O devices via DMA request and DMA acknowledge signals. ◦ The registers in DMA are selected by CPU through the address bus by enabling DS (DMA Select) and RS (Register Select) inputs. Er. Sulav Paudel | MSc
  • 9. DMA Controller ◦ All registers in the DMA appear to the CPU as I/O interface registers. ◦ The address register contains an address to specify the desired location in memory. ◦ It is incremented after each word that is transferred to the memory. ◦ The word count register holds the number of words to be transferred. ◦ It is decremented by one after each word transfer and internally tested for zero. Er. Sulav Paudel | MSc
  • 10. DMA Transfer Operation ◦ The DMA request CPU to handle control of buses to the DMA using bus request (BR) signal. ◦ The CPU grants the control of buses to DMA using bus grant (BG) signal after placing the address bus, data bus and read and write lines into high impedance state (which behave like open circuit). ◦ CPU initializes the DMA by sending following information through the data bus. 1. Starting address of memory block for read or write operation. 2. The word count which is the no. of words in the memory block. 3. Control to specify the mode of transfer such as read or write. 4. A control to start the DMA transfer. Er. Sulav Paudel | MSc
  • 11. DMA Transfer Operation ◦ The DMA takes control over the buses directly interacts with memory and I/O units and transfers the data without CPU intervention. ◦ When the transfer completes, DMA disables the BR line. ◦ Thus CPU disable BG line, takes control over the buses and return to its normal operation. Er. Sulav Paudel | MSc
  • 12. Sequence of DMA Transfer The sequence of DMA transfer as shown in the previous block diagram can be explained below: 1. Originally, microprocessor is connected to the memory as shown in figure above with switches closed for address, data and control buses. When peripheral wants to transfer data using DMA Transfer, it sends DMA request, DREQ signal to the DMA controller. 2. If the input (channel) of the DMA controller is unmasked, the DMA controller will send a hold-request, HRQ signal to the microprocessor HOLD input. Er. Sulav Paudel | MSc
  • 13. 3. The microprocessor finishes the current machine cycle and floats its buses, sending out a hold acknowledge signal, HLDA to the DMA controller. 4. When DMA controller receives HLDA signal, it will send a control signal which throws the 3 bus switches down to their DMA position. This disconnects the processor from buses and connects DMA controller to the buses. Now DMA controller sends out the address of the byte to the transferred and sends out DMA acknowledge (DACK) signal to the peripheral device to tell it to get ready to output the byte. Er. Sulav Paudel | MSc
  • 14. 5. Then the DMA transfer begins and finally when the data transfer is complete, the DMA controller unasserted its hold-request signal to the processor and releases the buses. Er. Sulav Paudel | MSc
  • 15. 8237 DMA Controller ◦ On chip four independent DMA channels. Number of channels can be increased by cascading DMA controller chips. ◦ Transfers data between two memory blocks in DMA mode:  Memory to Memory Transfer  Memory to I/O Device  I/O Device to Memory  I/O Device to I/O Device Er. Sulav Paudel | MSc
  • 16. 8237 DMA Controller ◦ In memory to memory transfer a single word can be written into all locations of memory block. ◦ Data transfer rate is very high e.g. 1.6M bytes/second for 8237-2 of 5 Mhz. ◦ Directly expandable to any number of channels. It does not require any additional chip for cascading. There is no limitations on cascading. ◦ It provides EOP line that is used to terminate DMA operation. This signal is generated by external hardware. Er. Sulav Paudel | MSc
  • 17. 8237 DMA Controller ◦ The address of memory is either incremented or decremented after each DMA cycle depending upon the mode. ◦ DMA can be requested by setting an appropriate bit of request register. ◦ Independent control of DREQ and DACK signal, DREQ and DACK signals can be initialize either for active high or active low. ◦ Provides compressed timings to improve throughput of the system. ◦ It can compress the transfer time to two cycles(2S). Er. Sulav Paudel | MSc
  • 18. DMA Data Transfer Er. Sulav Paudel | MSc
  • 19. Block Diagram of 8237 Er. Sulav Paudel | MSc
  • 20. Signals of 8237 DMA ◦ CLK:  CLK input line ignored in slave mode.  In master mode, this signal controls all internal and external DMA operations.  The data transfer rate depends upon the frequency of this signal.  CS:  In slave mode, this signal is generated by address decoder to select 8287 chip to communication between CPU and 8237.  In master mode, this signal is ignored. Er. Sulav Paudel | MSc