SlideShare a Scribd company logo
EEN 15252: MICROPROCESSOR & APPLICATIONS
Lecture 19
Dr. Vishal Kumar Gaur
Microprocessor: 8085
The 8237 DMA Controller
Internal Registers
 The 8237 contains 344 bits of internal memory in the form of
registers.
Note: Each channel has its
own CAR, CWCR, BA and BWC.
2
Microprocessor: 8085
The 8237 DMA Controller
1. Current Address Register (CAR):
 Each channel has its own 16-bit current address register.
 This register hold the address of memory location to be accessed during current DMA
cycle.
 When a byte of data is transferred during a DMA operation, CAR is either
incremented or decremented depending on how it is programmed.
 It is read and write register.
 Divided into 2 parts: lower byte & higher byte
 In auto initialization mode, it initialized automatically with original address after EOP
Signal
3
Microprocessor: 8085
The 8237 DMA Controller
2.Current Word Count Register (CWCR): This current word count register programs a
channel for the number of bytes to transferred during a DMA action.
 Each channel has 16 bit current word count register.
 This register determines the number of transfers to be performed.
 The word count is decremented after each transfer the current count, indicate the
no. of pending transfer.
 When the value in the register reaches zero, a TC will be generated
 Divided into 2 parts: lower byte & higher byte.
 In auto initialization mode, it initialized automatically with original count value after EOP
signal.
4
Microprocessor: 8085
The 8237 DMA Controller
3. The base address (BA)
 Each channel has 16 bit base address register
 It is a write only register
 It hold original value of address during all DMA transfer i.e. the content of this
register not updated during DMA transfer
 When EOP is activated the 8237 transfer content of base register into current
address register in auto initialize mode.
 This register is written along with current address register during initialization format
is same as current address register
5
Microprocessor: 8085
The 8237 DMA Controller
4. Base word count register (BWCR)
 16 bit,write only,
 It hold original count value during all DMA cycle means content of this register
are not updated during DMA transfer.
 When EOP is activated the 8237 transfer content of this register into current word
register in auto initialization mode.
 This register is written along with current address register during initialization format
is same as current word register.
6
Microprocessor: 8085
7
5. Command Register (CR): It is 8-bit write only register.
This register programs the operation of the 8237 DMA controller.
i. Enable/Disable memory-to-memory transfer.
ii. Enable/Disable the DMA controller.
iii. Normal/Compressed timing.
iv. Fixed/Rotating priority.
v. Type of (active low/high) DMA request and acknowledge
signal.
The 8237 DMA Controller
Microprocessor: 8085
5. Command Register (CR)
The 8237 DMA Controller
8
Microprocessor: 8085
The 8237 DMA Controller
6. Mode Register (MR): It is 8-bit write only register.
 It is used to set operative modes.
 It is used to program the following features of
each channel of 8237:
i. Read/Write/Verify transfer.
ii. Demand/Single/Block transfer mode.
iii. Single/Cascaded operation of 8237.
iv. Enable/Disable auto initialization.
9
Microprocessor: 8085
The 8237 DMA Controller
7.Mask Register Set/Reset (MRSR): It is 8-bit
write only register.
 It sets or clears the channel mask to
disable or
enable particular DMA channels.
8. Mask Register (MR): It is 8-bit write only register.
 It sets or clears all of the masks with one
command instead of individual channels as with
the MRSR.
10
Microprocessor: 8085
9. Status Register (MR): 8-bit read
only The status register
shows status of channel.
each
DMA
 The TC bits indicate if the channel has
reached its terminal count
(transferred all its bytes).
 When the terminal count is reached, the
DMA transfer is terminated for most
modes of operation.
The 8237 DMA Controller
11
Microprocessor: 8085
The 8237 DMA Controller
9. Status Register (MR): 8-bit read only
 Bits 0-3 indicate which channels have reached
a
terminal count and which channel has
pending DMA.
 These bits are clear automatically on reading
the status register and upon reset signal.
 Bits 4-7 are set whenever their
corresponding channel is requesting service.
12
Microprocessor: 8085
The 8237 DMA Controller
10. Request Register (RR): 8-bit write only
 It is used to request DMA through software
 Each channel has a request bit associated with
in the request register.
 Each register is set or reset separately.
13
Microprocessor: 8085
The 8237 DMA Controller
DMA Cycles:
 The 8237 is designed to operate in two major cycles: Idle Cycle and Active cycle
 Idle Cycle: When no channel is requesting service, the 8237 will enter the Idle cycle.
 In this cycle, the 8237 will sample the DREQ lines every clock cycle to determine if
any channel is requesting a DMA service.
 The device will also sample CS, looking for an attempt by the microprocessor to write or
read the internal registers of the 8237.
 When CS is low and HLDA is low, the 8237 enters the Program Condition. The processor
can now establish, change or inspect the internal definition of the part by reading from
or writing to the internal registers.
14
Microprocessor: 8085
The 8237 DMA Controller
DMA Cycles:
 The 8237 is designed to operate in two major cycles: Idle Cycle and Active cycle
 Idle Cycle:
 Address lines A0 –A3 are inputs to the device and select which registers will be
read or written.
 The IOR and IOW lines are used to reads or writes the register.
15
Microprocessor: 8085
16
The 8237 DMA Controller
DMA Cycles:
 The 8237 is designed to operate in two major cycles: Idle Cycle and Active cycle
 Active Cycle:
 When the 8237A is in the Idle cycle and a non-masked channel requests a DMA service,
the device will output an HRQ to the microprocessor and enter the Active cycle.
 It is in this cycle that the DMA service will take place, in one of three modes:
 Single Transfer Mode
 Block Transfer Mode
 Demand Transfer Mode
Microprocessor: 8085
17
The 8237 DMA Controller
Active Cycle:
1. Single Transfer Mode
 Transfers one data unit (like a byte or word) at a time.
 The DMA controller transfers a single piece of data from the source to the destination.
 After this one transfer, 8237 gives up control and waits for the processor to approve
the next transfer.
 Means, once it completes the transfer of one data item, it does not continue
automatically; it needs to be triggered again.
 Situations where data needs to be moved one piece at a time, often used with
slower peripherals or for precise control.
Microprocessor: 8085
18
The 8237 DMA Controller
Active Cycle:
1. Single Transfer Mode
 Once the transfer is complete, HRQ goes inactive, temporarily releasing the bus back
to the
processor. It allows the processor to use the bus, if needed.
 To start another transfer, the DMA controller reasserts the HRQ signal (again go active)
 And, upon receipt of a new HLDA, another single transfer will be performed.
 The controller keeps track of how many pieces of data (words) need to be transferred. After each transfer, this count is decremented
(reduced by one).
 The address for the next data item to be transferred is also updated after each transfer. Depending on whether you are transferring
data up or down in memory, the address will be incremented or decremented.
Microprocessor: 8085
The 8237 DMA Controller
Active Cycle:
2. Block Transfer Mode
 The device is activated by DREQ to continue making transfers during the service until a
TC,
caused by word count going to FFFFH, or an external EOP is encountered.
 DREQ need only be held active until DACK becomes active. Again, an Auto-initialization
will occur at the end of the service if the channel has been programmed for it.
19
Microprocessor: 8085
20
The 8237 DMA Controller
Active Cycle:
3. Demand Transfer Mode
 Unlike Block Transfer Mode, where a large block of data is transferred in one go,
Demand
Transfer Mode is more flexible. It can handle data transfers that occur intermittently or
in small quantities.
 Sometimes, I/O device may need some time to process or handle the data
that was
transferred during the previous DMA service.
 If the I/O device was busy or unable to keep up with the data transfers (e.g., it
needed to
perform other operations or process data), there could be a pause or delay..
Microprocessor: 8085
21
The 8237 DMA Controller
Active Cycle:
3. Demand Transfer Mode
 After the I/O device has had a chance to catch up, the DMA service is re-established
by
means of a DREQ.
 During the time between services, when the microprocessor is allowed to
operate, the intermediate values of address and word count are stored in the
8237 Current Address and Current Word Count registers.
Microprocessor: 8085
22
The 8237 DMA Controller
Active Cycle:
Cascade Operation
 This mode is used to cascade more than one 8237 together for simple system expansion.
 The HRQ and HLDA signals from the additional 8237 are connected to the DREQ and
DACK signals of a channel of the initial 8237A.
 This allows the DMA requests of the additional device to propagate through the
priority network circuitry of the preceding device. The priority chain is preserved and
the new device must wait for its turn to acknowledge requests.
 Since the cascade channel of the initial 8237 is used only for prioritizing the additional
device, it does not output any address or control signals of its own.
Microprocessor: 8085
The 8237 DMA Controller
Active Cycle:
Cascade Operation
23
Microprocessor: 8085
The 8237 DMA Controller
Transfer Types:
 Each of the three transfer modes can perform three different types of transfers.
 These are read, write, and verify.
 Write transfers move data from an I/O device to the memory by activating MEMW and
IOR.
 Read transfers move data from memory to an I/O device by activating MEMR and IOW.
 Verify transfers are pseudo transfers.
 In verify transfers, the 8237 operates as in Read or Write transfers generating
addresses, and responding to EOP, etc.
 However, the memory and I/O control lines all remain inactive. The ready input is
ignored in verify mode.
24
Thank You
25

More Related Content

PPTX
DMA information of microprocessor.Shows how it performs
PPTX
Dma and dma controller 8237
PPTX
8237 dma controller
PDF
Direct Memory Access.pdf
PPTX
8237-DMA-Caontroller.pptx for unitiii in
PPTX
8257 DMA Controller
PDF
Direct Memory Access Controller 8257/8237.pdf
PPTX
MPI UNIT 4 - (Introduction to DMA and ADC)
DMA information of microprocessor.Shows how it performs
Dma and dma controller 8237
8237 dma controller
Direct Memory Access.pdf
8237-DMA-Caontroller.pptx for unitiii in
8257 DMA Controller
Direct Memory Access Controller 8257/8237.pdf
MPI UNIT 4 - (Introduction to DMA and ADC)

Similar to Advance Microprocessor application and its uses 2 (20)

PPT
8237 / 8257 DMA
PPTX
Ppt micro fianle (1)
PDF
Module 3 special purpose programmable devices and their interfacing
PPTX
this is all about DMA CONTROLLER 8257.pptx
PDF
3 ijcmes dec-2015-27-simulation of 8257 direct memory access controller (dma)...
PPTX
CS304PC:Computer Organization and Architecture Session 28 Direct memory acces...
PDF
Intel 8257 programmable dma controller
PDF
Intel 8257 programmable dma controller
PPTX
Concept of dma
PDF
Direct Memory Access
PPTX
DMA controller intel 8257
PPTX
24. direct memory access
PPTX
Direct Memory Access_Unit 5.pptx
PPTX
4.programmable dma controller 8257
PPTX
Direct Memory Access
PPTX
PPTX
Direct memory access (dma) with 8257 DMA Controller
PPTX
Microcontroller Basics with all the required parts included
PPTX
Lecture 9.pptx
8237 / 8257 DMA
Ppt micro fianle (1)
Module 3 special purpose programmable devices and their interfacing
this is all about DMA CONTROLLER 8257.pptx
3 ijcmes dec-2015-27-simulation of 8257 direct memory access controller (dma)...
CS304PC:Computer Organization and Architecture Session 28 Direct memory acces...
Intel 8257 programmable dma controller
Intel 8257 programmable dma controller
Concept of dma
Direct Memory Access
DMA controller intel 8257
24. direct memory access
Direct Memory Access_Unit 5.pptx
4.programmable dma controller 8257
Direct Memory Access
Direct memory access (dma) with 8257 DMA Controller
Microcontroller Basics with all the required parts included
Lecture 9.pptx
Ad

Recently uploaded (20)

PPTX
PEDIATRIC OSCE, MBBS, by Dr. Sangit Chhantyal(IOM)..pptx
PPTX
1. Drug Distribution System.pptt b pharmacy
PPTX
Galactosemia pathophysiology, clinical features, investigation and treatment ...
PDF
Assessment of Complications in Patients Maltreated with Fixed Self Cure Acryl...
PPT
Pyramid Points Lab Values Power Point(11).ppt
PPTX
Immunity....(shweta).................pptx
PPTX
Vaginal Bleeding and Uterine Fibroids p
PPTX
ABG advance Arterial Blood Gases Analysis
PPTX
different types of Gait in orthopaedic injuries
PPTX
Basics of pharmacology (Pharmacology I).pptx
PDF
CHAPTER 9 MEETING SAFETY NEEDS FOR OLDER ADULTS.pdf
PPTX
Nursing Care Aspects for High Risk newborn.pptx
PDF
DAY-6. Summer class. Ppt. Cultural Nursing
PPTX
BLS, BCLS Module-A life saving procedure
PPTX
Bronchial_Asthma_in_acute_exacerbation_.pptx
PPTX
Pulmonary Circulation PPT final for easy
PPTX
3. Adherance Complianace.pptx pharmacy pci
PPTX
COMMUNICATION SKILSS IN NURSING PRACTICE
PPTX
CBT FOR OCD TREATMENT WITHOUT MEDICATION
PPTX
Rheumatic heart diseases with Type 2 Diabetes Mellitus
PEDIATRIC OSCE, MBBS, by Dr. Sangit Chhantyal(IOM)..pptx
1. Drug Distribution System.pptt b pharmacy
Galactosemia pathophysiology, clinical features, investigation and treatment ...
Assessment of Complications in Patients Maltreated with Fixed Self Cure Acryl...
Pyramid Points Lab Values Power Point(11).ppt
Immunity....(shweta).................pptx
Vaginal Bleeding and Uterine Fibroids p
ABG advance Arterial Blood Gases Analysis
different types of Gait in orthopaedic injuries
Basics of pharmacology (Pharmacology I).pptx
CHAPTER 9 MEETING SAFETY NEEDS FOR OLDER ADULTS.pdf
Nursing Care Aspects for High Risk newborn.pptx
DAY-6. Summer class. Ppt. Cultural Nursing
BLS, BCLS Module-A life saving procedure
Bronchial_Asthma_in_acute_exacerbation_.pptx
Pulmonary Circulation PPT final for easy
3. Adherance Complianace.pptx pharmacy pci
COMMUNICATION SKILSS IN NURSING PRACTICE
CBT FOR OCD TREATMENT WITHOUT MEDICATION
Rheumatic heart diseases with Type 2 Diabetes Mellitus
Ad

Advance Microprocessor application and its uses 2

  • 1. EEN 15252: MICROPROCESSOR & APPLICATIONS Lecture 19 Dr. Vishal Kumar Gaur
  • 2. Microprocessor: 8085 The 8237 DMA Controller Internal Registers  The 8237 contains 344 bits of internal memory in the form of registers. Note: Each channel has its own CAR, CWCR, BA and BWC. 2
  • 3. Microprocessor: 8085 The 8237 DMA Controller 1. Current Address Register (CAR):  Each channel has its own 16-bit current address register.  This register hold the address of memory location to be accessed during current DMA cycle.  When a byte of data is transferred during a DMA operation, CAR is either incremented or decremented depending on how it is programmed.  It is read and write register.  Divided into 2 parts: lower byte & higher byte  In auto initialization mode, it initialized automatically with original address after EOP Signal 3
  • 4. Microprocessor: 8085 The 8237 DMA Controller 2.Current Word Count Register (CWCR): This current word count register programs a channel for the number of bytes to transferred during a DMA action.  Each channel has 16 bit current word count register.  This register determines the number of transfers to be performed.  The word count is decremented after each transfer the current count, indicate the no. of pending transfer.  When the value in the register reaches zero, a TC will be generated  Divided into 2 parts: lower byte & higher byte.  In auto initialization mode, it initialized automatically with original count value after EOP signal. 4
  • 5. Microprocessor: 8085 The 8237 DMA Controller 3. The base address (BA)  Each channel has 16 bit base address register  It is a write only register  It hold original value of address during all DMA transfer i.e. the content of this register not updated during DMA transfer  When EOP is activated the 8237 transfer content of base register into current address register in auto initialize mode.  This register is written along with current address register during initialization format is same as current address register 5
  • 6. Microprocessor: 8085 The 8237 DMA Controller 4. Base word count register (BWCR)  16 bit,write only,  It hold original count value during all DMA cycle means content of this register are not updated during DMA transfer.  When EOP is activated the 8237 transfer content of this register into current word register in auto initialization mode.  This register is written along with current address register during initialization format is same as current word register. 6
  • 7. Microprocessor: 8085 7 5. Command Register (CR): It is 8-bit write only register. This register programs the operation of the 8237 DMA controller. i. Enable/Disable memory-to-memory transfer. ii. Enable/Disable the DMA controller. iii. Normal/Compressed timing. iv. Fixed/Rotating priority. v. Type of (active low/high) DMA request and acknowledge signal. The 8237 DMA Controller
  • 8. Microprocessor: 8085 5. Command Register (CR) The 8237 DMA Controller 8
  • 9. Microprocessor: 8085 The 8237 DMA Controller 6. Mode Register (MR): It is 8-bit write only register.  It is used to set operative modes.  It is used to program the following features of each channel of 8237: i. Read/Write/Verify transfer. ii. Demand/Single/Block transfer mode. iii. Single/Cascaded operation of 8237. iv. Enable/Disable auto initialization. 9
  • 10. Microprocessor: 8085 The 8237 DMA Controller 7.Mask Register Set/Reset (MRSR): It is 8-bit write only register.  It sets or clears the channel mask to disable or enable particular DMA channels. 8. Mask Register (MR): It is 8-bit write only register.  It sets or clears all of the masks with one command instead of individual channels as with the MRSR. 10
  • 11. Microprocessor: 8085 9. Status Register (MR): 8-bit read only The status register shows status of channel. each DMA  The TC bits indicate if the channel has reached its terminal count (transferred all its bytes).  When the terminal count is reached, the DMA transfer is terminated for most modes of operation. The 8237 DMA Controller 11
  • 12. Microprocessor: 8085 The 8237 DMA Controller 9. Status Register (MR): 8-bit read only  Bits 0-3 indicate which channels have reached a terminal count and which channel has pending DMA.  These bits are clear automatically on reading the status register and upon reset signal.  Bits 4-7 are set whenever their corresponding channel is requesting service. 12
  • 13. Microprocessor: 8085 The 8237 DMA Controller 10. Request Register (RR): 8-bit write only  It is used to request DMA through software  Each channel has a request bit associated with in the request register.  Each register is set or reset separately. 13
  • 14. Microprocessor: 8085 The 8237 DMA Controller DMA Cycles:  The 8237 is designed to operate in two major cycles: Idle Cycle and Active cycle  Idle Cycle: When no channel is requesting service, the 8237 will enter the Idle cycle.  In this cycle, the 8237 will sample the DREQ lines every clock cycle to determine if any channel is requesting a DMA service.  The device will also sample CS, looking for an attempt by the microprocessor to write or read the internal registers of the 8237.  When CS is low and HLDA is low, the 8237 enters the Program Condition. The processor can now establish, change or inspect the internal definition of the part by reading from or writing to the internal registers. 14
  • 15. Microprocessor: 8085 The 8237 DMA Controller DMA Cycles:  The 8237 is designed to operate in two major cycles: Idle Cycle and Active cycle  Idle Cycle:  Address lines A0 –A3 are inputs to the device and select which registers will be read or written.  The IOR and IOW lines are used to reads or writes the register. 15
  • 16. Microprocessor: 8085 16 The 8237 DMA Controller DMA Cycles:  The 8237 is designed to operate in two major cycles: Idle Cycle and Active cycle  Active Cycle:  When the 8237A is in the Idle cycle and a non-masked channel requests a DMA service, the device will output an HRQ to the microprocessor and enter the Active cycle.  It is in this cycle that the DMA service will take place, in one of three modes:  Single Transfer Mode  Block Transfer Mode  Demand Transfer Mode
  • 17. Microprocessor: 8085 17 The 8237 DMA Controller Active Cycle: 1. Single Transfer Mode  Transfers one data unit (like a byte or word) at a time.  The DMA controller transfers a single piece of data from the source to the destination.  After this one transfer, 8237 gives up control and waits for the processor to approve the next transfer.  Means, once it completes the transfer of one data item, it does not continue automatically; it needs to be triggered again.  Situations where data needs to be moved one piece at a time, often used with slower peripherals or for precise control.
  • 18. Microprocessor: 8085 18 The 8237 DMA Controller Active Cycle: 1. Single Transfer Mode  Once the transfer is complete, HRQ goes inactive, temporarily releasing the bus back to the processor. It allows the processor to use the bus, if needed.  To start another transfer, the DMA controller reasserts the HRQ signal (again go active)  And, upon receipt of a new HLDA, another single transfer will be performed.  The controller keeps track of how many pieces of data (words) need to be transferred. After each transfer, this count is decremented (reduced by one).  The address for the next data item to be transferred is also updated after each transfer. Depending on whether you are transferring data up or down in memory, the address will be incremented or decremented.
  • 19. Microprocessor: 8085 The 8237 DMA Controller Active Cycle: 2. Block Transfer Mode  The device is activated by DREQ to continue making transfers during the service until a TC, caused by word count going to FFFFH, or an external EOP is encountered.  DREQ need only be held active until DACK becomes active. Again, an Auto-initialization will occur at the end of the service if the channel has been programmed for it. 19
  • 20. Microprocessor: 8085 20 The 8237 DMA Controller Active Cycle: 3. Demand Transfer Mode  Unlike Block Transfer Mode, where a large block of data is transferred in one go, Demand Transfer Mode is more flexible. It can handle data transfers that occur intermittently or in small quantities.  Sometimes, I/O device may need some time to process or handle the data that was transferred during the previous DMA service.  If the I/O device was busy or unable to keep up with the data transfers (e.g., it needed to perform other operations or process data), there could be a pause or delay..
  • 21. Microprocessor: 8085 21 The 8237 DMA Controller Active Cycle: 3. Demand Transfer Mode  After the I/O device has had a chance to catch up, the DMA service is re-established by means of a DREQ.  During the time between services, when the microprocessor is allowed to operate, the intermediate values of address and word count are stored in the 8237 Current Address and Current Word Count registers.
  • 22. Microprocessor: 8085 22 The 8237 DMA Controller Active Cycle: Cascade Operation  This mode is used to cascade more than one 8237 together for simple system expansion.  The HRQ and HLDA signals from the additional 8237 are connected to the DREQ and DACK signals of a channel of the initial 8237A.  This allows the DMA requests of the additional device to propagate through the priority network circuitry of the preceding device. The priority chain is preserved and the new device must wait for its turn to acknowledge requests.  Since the cascade channel of the initial 8237 is used only for prioritizing the additional device, it does not output any address or control signals of its own.
  • 23. Microprocessor: 8085 The 8237 DMA Controller Active Cycle: Cascade Operation 23
  • 24. Microprocessor: 8085 The 8237 DMA Controller Transfer Types:  Each of the three transfer modes can perform three different types of transfers.  These are read, write, and verify.  Write transfers move data from an I/O device to the memory by activating MEMW and IOR.  Read transfers move data from memory to an I/O device by activating MEMR and IOW.  Verify transfers are pseudo transfers.  In verify transfers, the 8237 operates as in Read or Write transfers generating addresses, and responding to EOP, etc.  However, the memory and I/O control lines all remain inactive. The ready input is ignored in verify mode. 24