SlideShare a Scribd company logo
1 of 13
MICROPROCESSOR 8085
LECTURE 27
DIRECT MEMORY ACCESS (DMA)
DMA CONTROLLER (IC 8257)
PROF. SANDIP DAS
DIFFERENT I/O TECHNIQUES FOR DATA
TRANSFER
• Simple Parallel I/O
• Serial I/O
• Program Initiated I/O
• Interrupt driven I/O
All these I/O techniques involves CPU as the central controller which leads to slow
process.
If transfer mechanism is program initiated and if I/O device is slow then CPU has
to go into many wait state.
If Interrupt driven technique is used then the CPU has to branch to an Interrupt
Service Routine.
If large amount of data needs to be transferred the entire I/O process slows down.
One way to overcome this problem is to isolate the CPU and allow the memory and
I/O device to perform data transfer operation directly. This is known as Direct
Memory Access (DMA).
DIRECT MEMORY ACCESS
8085
Mircroprocesso
r
DMA
Controller
I/O Device
Memory
Address
Bus
Data Bus
Control
Bus
Hold
HLDA
DRQ
DACK
Slave
Mode
Master
Mode
DMA CONTROLLER- IC 8257
DMA CONTROLLER- INTEL 8257 BLOCK
DIAGRAM
CHANNEL
16 bit Address Register
• This registers are initially loaded by CPU when it is
Slave mode
• The address register contains 16 bit starting
address from which direct memory access starts.
• After every byte transfer this register is incremented
by 1.
• Count register is also 16 bit
16 bit Count Register
• Contains 14 bit count number and a 2 bit code.
This 2 bit code indicates the direction of DMA
transfer.
• The number of bytes that could be transferred is
214 = 16 𝐾𝐵 in one DMA operation.
D1
5
D14 D1
3
D0
Count
register
16 BIT COUNT REGISTER
D15 D14 Actions
0 0 DMA Verify
0 1 Write DMA
1 0 Read DMA
1 1 illegal
PRIORITY RESOLVER
Channel No. Priority
Channel 0 Highest Priority
Channel 1 2nd Highest Priority
Channel 2 3rd Highest Priority
Channel 3 Lowest Priority
CONTROL LOGIC
• It has got two registers
• Mode register – 16 bit
• Status Register – 8 bit
• Mode register has to be written into with
the programmers program
• Status register has to be read by the CPU
• Mode registers require input operation
from the CPU while the status register
requires output operation
MODE SET REGISTER
• Extended write is one in which 𝑀𝐸𝑀𝑊 and 𝐼𝑂𝑊 are made available to the
memory and the peripheral ahead of time by one clock period.
• When bit 6 is enabled it automatically disables the channel performing the
DMA transfer whenever the terminal count register of that channel reaches
zero.
• Bit 7 enables an autoload operation. This function is available only for
channel 2.
• If the channel 2 has to be disabled because the terminal count reached
zero, if the autoload has been set, i.e., Bit 7 is set, then the count will be
once again loaded into the count register.
• The DMA transfer will be permitted for the same number of times once
STATUS REGISTER
0 0 0
CH
0
CH
1
CH
2
CH
3
TC Status for different
channels
Update
flag
D0D7
• Only the lower four bits are useful.
• The status registers indicate
whether the channel are still in
count mode or has reached a
terminal count mode.
• D0, D1, D2, D3 will remain zero as
long as terminal count mode of
respective channel has not been
reached.
• In other words, if count register of a
channel has a non zero value then
respective bit of status register will
have zero value. If count register
has a zero value the respective bit
of status register will be set to 1.
• If auto load mode is used then
ADDRESS REGISTER (A3-A0)
A3 A2 A1 A0 Operations
0 0 0 0 CH-0 DMA ADDR. REGISTER
0 0 0 1 CH-0 COUNT REGISTER
0 0 1 0 CH-1 DMA ADDR. REGISTER
0 0 1 1 CH-1 COUNT REGISTER
0 1 0 0 CH-2 DMA ADDR. REGISTER
0 1 0 1 CH-2 COUNT REGISTER
0 1 1 0 CH-3 DMA ADDR. REGISTER
0 1 1 1 CH-3 COUNT REGISTER
1 0 0 0 MODE SET REGISTER (WITH
𝑊𝑅 CONTROL
1 0 0 0 MODE SET REGISTER (WITH
𝑅𝐷 CONTROL
INTERFACING IC 8257 WITH CPU
IC 8257
D
7
D
0
Data bus of
CPU
A7
A6
A5
A4
𝐼𝑂𝑅
𝐼𝑂𝑊 𝐶𝑆
5V
Addresses
70 H – 7F H
A3
A2
A1
A0
0
0
0
0
CH 0 Addr
Register0
0
0
1
CH 0 Count
Register
1
0
0
0
MODE set
Register
8257- MASTER MODE OPERATION
MEMORY
PERIPHERAL
𝐼𝑂𝑅
𝐼𝑂𝑊
8257
A7
A0
D
7D
0
A15
A0
𝑀𝐸𝑀𝑅
𝑀𝐸𝑀𝑊
DATA BUS
TC
ADSTB
AEN
HLD
A
HRQ
𝐷𝐴𝐶𝐾
DRQ

More Related Content

What's hot

Register Organisation of 8086 Microprocessor
Register Organisation of 8086 MicroprocessorRegister Organisation of 8086 Microprocessor
Register Organisation of 8086 Microprocessor
Nikhil Kumar
 
Register Organisation of 8086 Microprocessor
Register Organisation of 8086 MicroprocessorRegister Organisation of 8086 Microprocessor
Register Organisation of 8086 Microprocessor
Nikhil Kumar
 
3 organization of intel 8086
3 organization of intel 80863 organization of intel 8086
3 organization of intel 8086
ELIMENG
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386
yash sawarkar
 

What's hot (20)

Architecture of 8086
Architecture of 8086Architecture of 8086
Architecture of 8086
 
Introduction to 8086 microprocessor
Introduction to 8086 microprocessorIntroduction to 8086 microprocessor
Introduction to 8086 microprocessor
 
1326 Introduction To 8086 Microprocessor
1326 Introduction To 8086 Microprocessor1326 Introduction To 8086 Microprocessor
1326 Introduction To 8086 Microprocessor
 
Introduction of 8086 micro processor .
Introduction of 8086 micro processor .Introduction of 8086 micro processor .
Introduction of 8086 micro processor .
 
3. Addressing Modes in 8085 microprocessor.pptx
3. Addressing Modes in 8085 microprocessor.pptx3. Addressing Modes in 8085 microprocessor.pptx
3. Addressing Modes in 8085 microprocessor.pptx
 
Register Organisation of 8086 Microprocessor
Register Organisation of 8086 MicroprocessorRegister Organisation of 8086 Microprocessor
Register Organisation of 8086 Microprocessor
 
Lecture2
Lecture2Lecture2
Lecture2
 
8051 addressing modes
8051 addressing modes8051 addressing modes
8051 addressing modes
 
Register Organisation of 8086 Microprocessor
Register Organisation of 8086 MicroprocessorRegister Organisation of 8086 Microprocessor
Register Organisation of 8086 Microprocessor
 
3 organization of intel 8086
3 organization of intel 80863 organization of intel 8086
3 organization of intel 8086
 
Intel 8086
Intel 8086Intel 8086
Intel 8086
 
8086 Microprocessor
8086 Microprocessor8086 Microprocessor
8086 Microprocessor
 
Introduction to intel 8086 part1
Introduction to intel 8086 part1Introduction to intel 8086 part1
Introduction to intel 8086 part1
 
Presentation on 8086 Microprocessor
Presentation  on   8086 MicroprocessorPresentation  on   8086 Microprocessor
Presentation on 8086 Microprocessor
 
Microprocessor 80386
Microprocessor 80386Microprocessor 80386
Microprocessor 80386
 
Pin Description and Register Organization of 8086 Microprocessor
Pin Description and Register Organization of 8086 MicroprocessorPin Description and Register Organization of 8086 Microprocessor
Pin Description and Register Organization of 8086 Microprocessor
 
Basics of 8086
Basics of 8086Basics of 8086
Basics of 8086
 
8086
8086 8086
8086
 
Protected mode memory addressing 8086
Protected mode memory addressing 8086Protected mode memory addressing 8086
Protected mode memory addressing 8086
 
Timing Diagram.pptx
Timing Diagram.pptxTiming Diagram.pptx
Timing Diagram.pptx
 

Similar to 24. direct memory access

8255.pdf
8255.pdf8255.pdf
8255.pdf
someshdash1
 
Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS
Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS
Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS
Mohanumar S
 
Dma and dma controller 8237
Dma and dma controller 8237Dma and dma controller 8237
Dma and dma controller 8237
Ashwini Awatare
 
8251 a usart programmable communication interface(1)
8251 a usart   programmable communication interface(1)8251 a usart   programmable communication interface(1)
8251 a usart programmable communication interface(1)
divyangpit
 

Similar to 24. direct memory access (20)

Ppt micro fianle (1)
Ppt micro fianle (1)Ppt micro fianle (1)
Ppt micro fianle (1)
 
8255-PPI MPMC text book for engineering.ppt
8255-PPI MPMC text book for engineering.ppt8255-PPI MPMC text book for engineering.ppt
8255-PPI MPMC text book for engineering.ppt
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
 
Programmable dma controller 8237
Programmable dma controller 8237Programmable dma controller 8237
Programmable dma controller 8237
 
MICROPROCESSOR INPUT OUTPUT OPERATIONS
MICROPROCESSOR INPUT OUTPUT OPERATIONSMICROPROCESSOR INPUT OUTPUT OPERATIONS
MICROPROCESSOR INPUT OUTPUT OPERATIONS
 
8255.pdf
8255.pdf8255.pdf
8255.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
 
20ME702– MECHATRONICS -UNIT-3.ppt
20ME702– MECHATRONICS -UNIT-3.ppt20ME702– MECHATRONICS -UNIT-3.ppt
20ME702– MECHATRONICS -UNIT-3.ppt
 
Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS
Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS
Unit 3-PROGRAMMABLE PERIPHERAL INTERFACE-ME6702– MECHATRONICS
 
MPMC
MPMC MPMC
MPMC
 
Dma and dma controller 8237
Dma and dma controller 8237Dma and dma controller 8237
Dma and dma controller 8237
 
PROGRAMMABLE PERIPHERAL INTERFCAE.ppt
PROGRAMMABLE PERIPHERAL INTERFCAE.pptPROGRAMMABLE PERIPHERAL INTERFCAE.ppt
PROGRAMMABLE PERIPHERAL INTERFCAE.ppt
 
8086 Programing.ppt
8086 Programing.ppt8086 Programing.ppt
8086 Programing.ppt
 
UNIT- 3.pptx
UNIT- 3.pptxUNIT- 3.pptx
UNIT- 3.pptx
 
unit 2 lect 6 AND 7 8254.pptx
unit 2 lect 6 AND 7 8254.pptxunit 2 lect 6 AND 7 8254.pptx
unit 2 lect 6 AND 7 8254.pptx
 
Programmableperipheralinterface 8255 ppt
Programmableperipheralinterface 8255 pptProgrammableperipheralinterface 8255 ppt
Programmableperipheralinterface 8255 ppt
 
DMA controller intel 8257
DMA controller intel 8257DMA controller intel 8257
DMA controller intel 8257
 
Microprocessor Architecture-III
Microprocessor Architecture-IIIMicroprocessor Architecture-III
Microprocessor Architecture-III
 
8251 a usart programmable communication interface(1)
8251 a usart   programmable communication interface(1)8251 a usart   programmable communication interface(1)
8251 a usart programmable communication interface(1)
 

More from sandip das

More from sandip das (20)

30. 8086 microprocessor pipelined architecture
30. 8086 microprocessor pipelined architecture30. 8086 microprocessor pipelined architecture
30. 8086 microprocessor pipelined architecture
 
29. 8086 microprocessor pin diagram
29. 8086 microprocessor pin diagram29. 8086 microprocessor pin diagram
29. 8086 microprocessor pin diagram
 
28. 8251 programmable communication interface
28. 8251 programmable communication interface28. 8251 programmable communication interface
28. 8251 programmable communication interface
 
27. 8259 programmable interrupt controller
27. 8259 programmable interrupt controller27. 8259 programmable interrupt controller
27. 8259 programmable interrupt controller
 
26. 8255 control word programming
26. 8255 control word programming26. 8255 control word programming
26. 8255 control word programming
 
25. 8255 programmable peripheral interface
25. 8255 programmable peripheral interface25. 8255 programmable peripheral interface
25. 8255 programmable peripheral interface
 
23. serial and parallel data communication
23. serial and parallel data communication23. serial and parallel data communication
23. serial and parallel data communication
 
22. interrupts ii
22. interrupts ii22. interrupts ii
22. interrupts ii
 
21. interrupts
21. interrupts21. interrupts
21. interrupts
 
20. io interfacing ii
20. io interfacing ii20. io interfacing ii
20. io interfacing ii
 
18. memory interfacing iv
18. memory interfacing iv18. memory interfacing iv
18. memory interfacing iv
 
15. memory interfacing i
15. memory interfacing i15. memory interfacing i
15. memory interfacing i
 
14. 8085 programming example vi
14. 8085 programming example vi14. 8085 programming example vi
14. 8085 programming example vi
 
13. 8085 programming example v
13. 8085 programming example v13. 8085 programming example v
13. 8085 programming example v
 
12. 8085 programming example iv
12. 8085 programming example iv12. 8085 programming example iv
12. 8085 programming example iv
 
11. 8085 programming example iii
11. 8085 programming example iii11. 8085 programming example iii
11. 8085 programming example iii
 
10. 8085 programming example ii
10. 8085 programming example ii10. 8085 programming example ii
10. 8085 programming example ii
 
9. 8085 instruction set v
9. 8085 instruction set v9. 8085 instruction set v
9. 8085 instruction set v
 
8. 8085 programming example
8. 8085 programming example8. 8085 programming example
8. 8085 programming example
 
7. 8085 instruction set iv
7. 8085 instruction set iv7. 8085 instruction set iv
7. 8085 instruction set iv
 

Recently uploaded

FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 

Recently uploaded (20)

FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 

24. direct memory access

  • 1. MICROPROCESSOR 8085 LECTURE 27 DIRECT MEMORY ACCESS (DMA) DMA CONTROLLER (IC 8257) PROF. SANDIP DAS
  • 2. DIFFERENT I/O TECHNIQUES FOR DATA TRANSFER • Simple Parallel I/O • Serial I/O • Program Initiated I/O • Interrupt driven I/O All these I/O techniques involves CPU as the central controller which leads to slow process. If transfer mechanism is program initiated and if I/O device is slow then CPU has to go into many wait state. If Interrupt driven technique is used then the CPU has to branch to an Interrupt Service Routine. If large amount of data needs to be transferred the entire I/O process slows down. One way to overcome this problem is to isolate the CPU and allow the memory and I/O device to perform data transfer operation directly. This is known as Direct Memory Access (DMA).
  • 3. DIRECT MEMORY ACCESS 8085 Mircroprocesso r DMA Controller I/O Device Memory Address Bus Data Bus Control Bus Hold HLDA DRQ DACK Slave Mode Master Mode
  • 5. DMA CONTROLLER- INTEL 8257 BLOCK DIAGRAM
  • 6. CHANNEL 16 bit Address Register • This registers are initially loaded by CPU when it is Slave mode • The address register contains 16 bit starting address from which direct memory access starts. • After every byte transfer this register is incremented by 1. • Count register is also 16 bit 16 bit Count Register • Contains 14 bit count number and a 2 bit code. This 2 bit code indicates the direction of DMA transfer. • The number of bytes that could be transferred is 214 = 16 𝐾𝐵 in one DMA operation. D1 5 D14 D1 3 D0 Count register
  • 7. 16 BIT COUNT REGISTER D15 D14 Actions 0 0 DMA Verify 0 1 Write DMA 1 0 Read DMA 1 1 illegal PRIORITY RESOLVER Channel No. Priority Channel 0 Highest Priority Channel 1 2nd Highest Priority Channel 2 3rd Highest Priority Channel 3 Lowest Priority
  • 8. CONTROL LOGIC • It has got two registers • Mode register – 16 bit • Status Register – 8 bit • Mode register has to be written into with the programmers program • Status register has to be read by the CPU • Mode registers require input operation from the CPU while the status register requires output operation
  • 9. MODE SET REGISTER • Extended write is one in which 𝑀𝐸𝑀𝑊 and 𝐼𝑂𝑊 are made available to the memory and the peripheral ahead of time by one clock period. • When bit 6 is enabled it automatically disables the channel performing the DMA transfer whenever the terminal count register of that channel reaches zero. • Bit 7 enables an autoload operation. This function is available only for channel 2. • If the channel 2 has to be disabled because the terminal count reached zero, if the autoload has been set, i.e., Bit 7 is set, then the count will be once again loaded into the count register. • The DMA transfer will be permitted for the same number of times once
  • 10. STATUS REGISTER 0 0 0 CH 0 CH 1 CH 2 CH 3 TC Status for different channels Update flag D0D7 • Only the lower four bits are useful. • The status registers indicate whether the channel are still in count mode or has reached a terminal count mode. • D0, D1, D2, D3 will remain zero as long as terminal count mode of respective channel has not been reached. • In other words, if count register of a channel has a non zero value then respective bit of status register will have zero value. If count register has a zero value the respective bit of status register will be set to 1. • If auto load mode is used then
  • 11. ADDRESS REGISTER (A3-A0) A3 A2 A1 A0 Operations 0 0 0 0 CH-0 DMA ADDR. REGISTER 0 0 0 1 CH-0 COUNT REGISTER 0 0 1 0 CH-1 DMA ADDR. REGISTER 0 0 1 1 CH-1 COUNT REGISTER 0 1 0 0 CH-2 DMA ADDR. REGISTER 0 1 0 1 CH-2 COUNT REGISTER 0 1 1 0 CH-3 DMA ADDR. REGISTER 0 1 1 1 CH-3 COUNT REGISTER 1 0 0 0 MODE SET REGISTER (WITH 𝑊𝑅 CONTROL 1 0 0 0 MODE SET REGISTER (WITH 𝑅𝐷 CONTROL
  • 12. INTERFACING IC 8257 WITH CPU IC 8257 D 7 D 0 Data bus of CPU A7 A6 A5 A4 𝐼𝑂𝑅 𝐼𝑂𝑊 𝐶𝑆 5V Addresses 70 H – 7F H A3 A2 A1 A0 0 0 0 0 CH 0 Addr Register0 0 0 1 CH 0 Count Register 1 0 0 0 MODE set Register
  • 13. 8257- MASTER MODE OPERATION MEMORY PERIPHERAL 𝐼𝑂𝑅 𝐼𝑂𝑊 8257 A7 A0 D 7D 0 A15 A0 𝑀𝐸𝑀𝑅 𝑀𝐸𝑀𝑊 DATA BUS TC ADSTB AEN HLD A HRQ 𝐷𝐴𝐶𝐾 DRQ