0% found this document useful (0 votes)
35 views52 pages

Microcontroller Architecture and Memories 1

MECE-228 is a course on microcontrollers taught in the 2023-2024 spring semester. Microcontrollers allow systems to be smaller, lighter, and more functional compared to previous technologies. A microcontroller system consists of hardware components like the CPU and memory, as well as software programs. The CPU fetches and executes instructions to process data, which can be represented in binary, hexadecimal, or other numeric systems in computer memory.

Uploaded by

Hazem Abusalem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views52 pages

Microcontroller Architecture and Memories 1

MECE-228 is a course on microcontrollers taught in the 2023-2024 spring semester. Microcontrollers allow systems to be smaller, lighter, and more functional compared to previous technologies. A microcontroller system consists of hardware components like the CPU and memory, as well as software programs. The CPU fetches and executes instructions to process data, which can be represented in binary, hexadecimal, or other numeric systems in computer memory.

Uploaded by

Hazem Abusalem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 52

MECE-228

Introduction and Memories

HAKAN TÜRKÖZ

2023-2024 Spring Semester


Basic Structure- Introduction

• Advances in technology have made possible the use of digital techniques


for control, data transfer and display in many field of application.
• Microcomputers within this application in systems perform the operations
previously performed by individual components that had to be manually
selected and monitored.
• The introduction of microcontrollers has allowed a vast reduction of system
size and weight, whilst increasing system functional capacity.
• In addition, the operating speed of the microcomputer makes possible
system self-testing during normal operation.

2
Terms and Definitions
• As with all new technologies, computers bring with them abbreviation,
acronyms and terms that are new to us all; some of these are explained in
the, following paragraphs.

• Bit :A bit is the smallest unit of information in computer and communication


theory, representing a logic '1' or logic '0'. It is derived from contracting the
terms binary bit.

• Byte : The basic unit of information used in practical computer storage and
processing. A byte consists of eight (8) adjacent binary bits and this
string of bits is processed as one unit by a computer; they are the smallest
operable units of storage in computer technology. An individual byte can
represent the equivalent of a single character, such as the letter B, a
comma, or a percentage sign (%); or it can represent a number from 0 to
255. Because a byte contains so little information, the processing and
storage capacities of computer hardware are usually given in kilobytes
(1,024 bytes) or megabytes (1,048,576 bytes).

3
Terms and Definitions
• Hardware: Hardware is the collection of components such as display,
keyboard and other base units. These are the most basic units that are
gathered together and constructed without specialist knowledge or tools.

• Software: Software gives the microcomputers instructions on how to


function and what is to be done. This is carried by loadable programs from
memories.

4
Classifications
• Classification of microcontrollers depends on the various technology used,
for example mechanical, electromechanical or electronic, the purpose for
which they were designed; by the type of data they can handle, i.e. digital or
analogue; by the amount they cost and even by their physical size.
• Components or tools of a microcontroller system are grouped into two
categories, Hardware or Software.

Hardware
• The individual components that make up the machine that constitutes a
computer system are called hardware.
• This hardware includes all the mechanical, electrical, electronic, and
magnetic devices within the computer itself, the Central Processing Unit
(CPU), and all related peripheral devices, (printers, magnetic tape units,
magnetic disk drive units, etc).

5
Computer Hardware

Basic components of a computer system


6
Central Processing Unit (CPU)

• The brain of a computer system is the Central Processing Unit (CPU), ie it


is the computer.
• It processes the data from one of the various input devices, and then
transfers either the intermediate or final results of its processing to one of
many output devices.
The following functions are performed by CPU:

• Fetch Instruction: Where the CPU reads an instruction from memory.


• Interpret Instruction: Where the instruction is decoded to determine what
action is required.
• Fetch Data: The execution of an instruction may require reading data from
memory or I/0 module.
• Process data: The execution of an instruction may require performing some
arithmetic or logical operation on data.
• Write data: The result of an execution may require writing data to memory or
an I/0 module.

7
Central Processing Unit (CPU)

• The basic components of a computer system are shown in the following


Figure.
• The main components are:

1. a central processing unit (CPU);

2. a memory, comprising both ‘read/write’ and ‘read only’ devices (commonly


called RAM and ROM, respectively);

3. a means of providing input and output (I/O) (for example, a keypad for input
and a display for output).

8
Central Processing Unit (CPU)

• In a microprocessor system the functions of the CPU are provided by a


single very large-scale integrated (VLSI) microprocessor chip.
• This chip is equivalent to many thousands of individual transistors.
• Semiconductor devices are also used to provide the read/write and read-
only memory.
• Strictly speaking, both types of memory permit ‘random access’ since any
item of data can be retrieved with equal ease regardless of its actual
location within the memory.
• Despite this, the term ‘RAM’ has become synonymous with semiconductor
read/write memory.

9
Central Processing Unit (CPU)

• The basic components of the system (CPU, RAM, ROM and I/O) are linked
together using a multiple wire connecting system known as a bus (see
above Figure).

• Three different buses are present; these are:

1. the address bus used to specify memory locations;

2. the data bus on which data is transferred between devices; and

3. the control bus which provides timing and control signals throughout the
system.

10
Central Processing Unit (CPU)

• The number of individual lines present within the address bus and data bus
depends upon the particular microprocessor employed.
• Signals on all lines, no matter whether they are used for address, data or
• control, can exist in only two basic states: logic 0 (low) or logic 1 (high).
• Data and addresses are represented by binary numbers (a sequence of 1s
and 0s) that appear respectively on the data and address bus.
• Some basic microprocessors designed for control and instrumentation
applications have an 8-bit data bus and a 16-bit address bus.
• More sophisticated processors can operate with as many as 64 or 128 bits
at a time.

11
Central Processing Unit (CPU)

• The largest binary number that can appear on an 8-bit data bus
corresponds to the condition when all eight lines are at logic 1.
• Therefore, the largest value of data that can be present on the bus at any
instant of time is equivalent to the binary number 11111111 (or 255).
• Similarly, the highest address that can appear on a 16-bit address bus is
1111111111111111 (or 65,535).
• The full range of data values and addresses for a simple microprocessor of
this type is thus:

• Finally, a locally generated clock signal provides a time reference for


synchronising the transfer of data within the system. The clock usually
consists of a highfrequency square wave pulse train derived from a quartz
crystal.

12
Central Processing Unit (CPU)

A simple single-board computer system

13
DATA REPRESENTATION

• As we have learned previously, binary numbers – particularly large ones –


are not very convenient.
• To make numbers easier to handle we introduced the hexadecimal (base
16) numbering system.
• This format is easier for mere humans to comprehend and also offers the
significant advantage over base 10 numbers in that numbers can be
converted to and from binary with ease.
• A group of eight bits, operated on as a unit, is referred to as a byte.
• Since hexadecimal characters can be represented by a group of four bits, a
byte of data can be expressed using two hexadecimal characters.
• Note that groups of four bits are sometimes referred to as nibbles and that a
byte can take a hexadecimal value ranging from 00 to FF.
• The basic unit of data that can be manipulated as an entity is often referred
to as a word.
• Words can be any convenient length, but 16-, 32- and 64-bit words are
common (see the following Table).

14
DATA REPRESENTATION

• A single byte of data can be stored at each address within the total memory
space of a computer system.
• Hence, one byte can be stored at each of the 65,536 memory locations
within a microprocessor system having a 16-bit address bus. Individual bits
within a byte are numbered from 0 (least significant bit, or LSB) to 7 (most
significant bit, MSB). In the case of 16-bit words (which are stored in
consecutive memory locations) the bits are numbered from 0 (LSB) to 15
(MSB).
• Negative numbers (or signed numbers) are usually represented using two’s
complement notation where the leading (most significant) bit indicates the
sign of the number (1 = negative, 0 = positive).
• For example, the signed 8-bit number 10000001 represents the decimal
number
–1.

15
DATA REPRESENTATION

Some common data types

16
COMPARISION

• Microcontroller vs microprocessor selection can be a tricky process during a


digital design, and engineers still struggle to find the right compromise
between power consumption, computational capabilities, embedded
features and price.
• The first big decision a designer should make during the project is to
whether implement a microcontroller vs microprocessor as the main logical
unit. To help you in this task, here we present and compare the main
differences between microcontrollers and microprocessors and will help you
choose whether to use Microcontroller or microprocessor.

17
MICROPROCESSOR

• Microprocessors are the core of any modern computer: they are single chip
processing units responsible for computing each operation stored in the
program. The microprocessor reads the algorithm from an external memory,
and executes the commands using a specific language. This language
defines the type of microprocessor, which can be RISC (Reduced
Instruction Set Computer) or CISC (Complex Instruction Set Computer).
• The entire design chain of a microprocessor is focused on improving its
computational power and efficiency, with little to no care for internal
peripherals. This allows the creation of extremely fast, precise, and efficient
computation units. However, because the entire manufacturing process is
dedicated for processing only, a microprocessor requires the use of external
peripherals, such as memory, I/O pins, serial communication, power control.
Figure 1 shows the functional diagram of a digital board applying a
microprocessor, and how it interacts with the external peripherals. Because
it does not have internal memories, the microprocessor cannot be
programmed directly, and it can only run instructions provided by the ROM
memory.

18
MICROPROCESSOR

19
MICROCONTROLLER

• Microcontrollers are more complete logical units: they incorporate, in a


single chip, the microprocessor and all required peripherals: memories, I/O
pins, timers, serial interface, analog-to-digital converters, power
management, etc. This allows for easier application in single tasks: the
designer only need to choose the microcontroller instead of selecting all the
peripherals and design the interface between them. Different from a
microprocessor, a microcontroller is programmable, that is, it can receive
and store code via serial or parallel communication.
• Microcontrollers are embedded devices, typically being optimized for the
specific tasks they are designed for. They are embedded inside cars,
smartphones, alarms, and refrigerators. However, general purpose
microcontrollers are also largely available in the market. These
microcontrollers are designed for prototyping, and are often sold embedded
in development boards, for prototyping. A popular example of development
boards is the Arduino Uno, which uses an 8-bit ATMega microcontroller as
its core.

20
MICROCONTROLLER

21
Application Comparison

• Microcontrollers are more suitable for applications that require optimized


cost and reduced number of components. Due to the smaller number of
external components required, they can be easily implemented in portable
devices. For instance, microcontrollers are largely used on smart watches,
mobile phones, cameras, and automobiles. Microcontrollers are also the
best choice in applications that require a high level of determinism and
reliability, as the whole digital system is designed to work properly from the
factory, whereas microprocessor applications require the whole digital
system to be developed by the designer, which may introduce functional
errors. As the name suggests, microcontrollers are more suitable on
controlling processes, receiving sensor data, processing it, and providing
controlling signals to external actuators.

22
MICROCONTROLLER

23
Application Comparison

• Due to the need of external components, microprocessor applications have


usually higher cost and higher power consumption. Therefore,
microprocessors are applied in situations where computational performance
is critical, such as personal computers, high quality video processing and
advanced data processing. Also, microprocessors are a good choice in
applications that require peripherals with more capabilities than a
microcontroller can offer, such as large memories and fast communication
speed. Basically, microprocessors are required in applications where large
amounts of data should be processed in a short period of time, such as
high-speed communication systems, personal and multipurpose computers,
video processing and computer vision. This type of application also often
requires more than one microprocessor, which makes the use of
microcontrollers very limited.

24
Conclusion Microcontroller vs Microprocessor

• Microprocessors and microcontrollers are devices designated to similar


niches, and its application range may overlap in some cases.
• However, they are designed for different things:

– microcontrollers are intended to control a system, receiving information


from external sensors and making a decision to perform a single task,
– whereas microprocessors are designed to process large amounts of
data very fast, and operate in a more general fashion. Before selecting
between both, the engineer should consider the type of application
intended, the amount of processing power needed, and design
constraints, such as memory, power consumption, cost, and size.

25
COMPARISION

Some common data types

26
DATA STORAGE

Classifications of Memory

• A computer needs memory in order to complete its calculations, store data,


hold programs etc.
• In a computer, there are several different kinds of memory and these
include:

 Random-Access Memory (RAM)


 Read-Only Memory (ROM)
 Programmable Read-Only Memory (PROM)
 Erasable Programmable Read-Only Memory (EPROM)
 Electrically Erasable and Programmable Read Only Memory (EEPROM)
 Cache Memory

27
DATA STORAGE RAM

• Random Access Memory (RAM) is used by the CPU as a scratchpad and


for storing program information required for it to operate.
• It is like a blackboard on which to scribble down notes, read them, and rub
them out when finished with them.
• In the computer, RAM is the working memory and data can be read from or
written into it just by giving the computer the address of the location where
the data is stored or is to be stored.
• When the data is no longer needed, the CPU can simply write over it.
• However, RAM is usually volatile memory and so is lost whenever power is
removed from the computer, although some use an internal battery to keep
at least part of this memory alive.
• Different types of RAM are being developed all the time, but there there are
generally two broad categories of random access memory:
 Dynamic RAM (DRAM)
 Static RAM (SRAM)

28
DATA STORAGE RAM

• Random Access Memory (RAM) is used by the CPU as a scratchpad and


for storing program information required for it to operate.
• It is like a blackboard on which to scribble down notes, read them, and rub
them out when finished with them.
• In the computer, RAM is the working memory and data can be read from or
written into it just by giving the computer the address of the location where
the data is stored or is to be stored.
• When the data is no longer needed, the CPU can simply write over it.
• However, RAM is usually volatile memory and so is lost whenever power is
removed from the computer, although some use an internal battery to keep
at least part of this memory alive.
• Different types of RAM are being developed all the time, but there there are
generally two broad categories of random access memory:
 Dynamic RAM (DRAM)
 Static RAM (SRAM)

29
DATA STORAGE RAM

• Read/Write Memory (RWM) is a memory system in which we can store and


retrieve information. Although not a proper name, most RWMs used today
are called Random Access Memories (RAM).
• Like a ROM, a RAM has address and control inputs and data outputs, but it
also has data inputs. The inputs and outputs of a simple 2nx8-bit RAM are
shown in the following Figure. The control inputs are comparable to those of
a ROM, with the addition of a write-enable (WE) input. When WE is
asserted, the data inputs are written into the selected memory location.
• RAM normally has just two defined access operations:
• Read An address is placed on the address inputs while CS and OE are
asserted. The binary data stored in the selected memory location are
delivered to DOUT.
• Write An address is placed on the address inputs and a data word is
placed on DIN; then CS and WE are asserted. The input word is stored in
the selected memory location.

30
DRAM structure

Circuit symbol for RAM

31
DATA STORAGE RAM

• Each bit of memory (or RAM cell) in a RAM has the same functional
behavior as the circuit in Figure . The storage device in each cell is a D
latch. When a cell's SEL_L input is asserted, the stored data is placed on
the cell's output. When both SEL_L and WR_L are asserted, the latch is
open and a new data bit is stored.
• RAM cells are combined in an array with additional control logic to form a
complete static RAM, as shown in Figure for an 8 x 4 RAM. As in a simple
ROM, a decoder on the address lines selects a particular row of the SRAM
to be accessed.

32
SRAM structure

A SRAM cell

33
DATA STORAGE DRAM

• DRAM is the type of semiconductor-based memory usually used for a


computer's main RAM.
• All DRAMs are made up of memory cells.
• These cells are composed of one capacitor and one transistor.
• When loaded, the logical state of the capacitor is equal to 1, otherwise it is
0, meaning that each capacitor represents one memory bit.
• As the capacitors can lose their charge over time, they require the computer
to continually rewrite or 'refresh' the information they store.
• To achieve this each capacitor is coupled with a transistor enabling
(recovery) or amendment of the status of the capacitor.
• These transistors are arranged in the form of a table (matrix) allowing
access via a line and a column, shown in the following Figure.
• However, DRAM chips are cheaper and store more information than their
equivalent SRAM chips and so can be produced in small sizes.

34
DRAM structure

35
DATA STORAGE SRAM

• SRAM chips, on the other hand, can retain their stored information without
being continuously refreshed by the computer.
• SRAM chips use a matrix of 4 or 6- transistors and no capacitors and
accessing data in SRAM chips is up to ten times faster than accessing
memory in DRAM chips.
• In SRAM two of the transistors are used to provide access to the memory.
• When the cell is not addressed, the two access transistors are closed and
the data is kept to a stable state.
• The data in an SRAM cell is volatile, but does not "leak away" like in a
DRAM, so the SRAM does not require a refresh cycle.
• However, SRAM chips can store less information and are more expensive to
produce.
• Technically speaking, the RAM memory does not have any kind of influence
on the processor performance of the computer. RAM memory does not
actually have the capability to make the computer processor work faster,
therefore does not increase the processing performance of the processor.

36
DRAM

Four transistor version of the SRAM cell Six transistor version of the SRAM cell

37
DATA STORAGE SRAM
• There are two key features to SRAM - Static Random Access Memory, and
these set it out against other types of memory that are available:
• The data is held statically: This means that the data is held in the
semiconductor memory without the need to be refreshed as long as the
power is applied to the memory.
• SRAM memory is a form of random access memory: A random access
memory is one in which the locations in the semiconductor memory can be
written to or read from in any order, regardless of the last memory location
that was accessed.
• The circuit for an individual SRAM memory cell comprises typically four
transistors configured as two cross coupled inverters. In this format the
circuit has two stable states, and these equate to the logical "0" and "1"
states.
• The transistors are MOSFETs because the amount of power consumed by
MOS circuit is considerably less than that of bipolar transistor technology
which is the other feasible option, but it will consume much more.
• Using bipolar technology limits the level fo integration because the issue of
heat removal becomes a major issue. In view of this bipolar technology is
rarely used.

38
DATA STORAGE SRAM
• The main advantage of the six transistor SRAM circuit is the reduced static
power. In the four transistor version, there is a constant current flow through
one or other of the pull down resistors and this increases the overall power
consumption of the chip. This can limit the level of integration as well as
increasing the circuit design issues as a result of increased power
dissipation.
• It is also worth mentioning that the four transistor SRAM computer memory
cell provides some advantages in terms of its density but this comes at the
cost of manufacturing complexity as resistors need to be fabricated and this
requires additional processing. Also, the resistors must have small
dimensions and large values to meet the requirements for the cell.

39
COMPARISION OF SRAM AND DRAM

40
DATA STORAGE ROM

• Read-Only Memory (ROM)


• In computers, it is always useful to have commonly used instructions, such
as those used to bootstrap the computer, i.e. load initial system data,
pennanently stored inside the computer.
• As its name implies, ROM is read only and is available at all times, i.e. even
when the computer is powered down, the data can be re trieved over and
over a:gain without destroying its contents.
• Usually, only the computer manufacturer can provide these programs in
ROM
• and once done, cannot be changed.
• Consequently, the CPU cannot put any data or programs in ROM, but many
complex functions, control laws, and translators for programming languages
are often stored in ROM.
• Since these instructions are permanent, they can be performed quickly and
accurately and can be accessed when required. Such programs are
sometimes called micro programs or firmware.

41
ROM

Circuit symbol for ROM

42
DATA STORAGE PROM

• PROM
• An alternative to ROM is Programmable Read Only Memory (PROM) that
can be purchased already programmed by the manufacturer or as a blank
unit.
• By using a blank PROM, designers and programmers can put their own
information into the memory, but once the PROM has been written into, it
can never be altered or changed.
• Therefore, it has the advantage of ROM with the additional flexibility to
program the memory to meet a unique or specific need.
• The main disadvantage of PROM is that if a mistake is when inputting data
into the PROM, it cannot be corrected or erased; in addition, a special
device called a PROM programmer or PROM bumer is required to input or
'burn' the data into PROM.

43
DATA STORAGE EPROM

• EPROM
• The Erasable Programmable Read-Only Memory (EPROM) was
developed to overcome the one-time use of the PROM.
• EPROMs can also be purchased blank from the manufacturer and
programmed locally as with PROM, but the big difference between them is
that EPROM can be erased if and when it is necessary.
• Each of its arrays of memory elements is designed to accept and retain a
charge of electrons, and hence assume either of the two logic states
needed for programming.
• Elements that are to read logic 1 are given a charge and those, which are to
be read logic 0, are left unchanged.
• A programmer is also used for this purpose.
• To erase a program the memory elements are exposed to ultraviolet light
radiated through a 'window' in the cover of the IC pack causing the electron
charge to leak away.

44
DATA STORAGE EEPROM

• Electrically Erasable and Programmable Read Only Memory (EEPROM)


• As the name suggests, EEPROM can be programmed and erased
electrically.
• It can be erased and reprogrammed about ten thousand times.
• In EEPROM, any location can be selectively erased and programmed; the
time taken for both erasing and programming is about 4 to 10 ms
(milliseconds).
• The big advantage of EEPROMs is that they can be erased one byte at a
time, rather than erasing the entire chip.
• As such, the process of re-programming is flexible but slow.
• EEPROM is also known as Flash Memory as a whole block of memory cells
can be erased in a single action, or in a 'flash,' which is how this device got
its name.
• As with all types of ROM, Flash memory is non-volatile, i.e., it can retain its
memory contents even if it is powered off.

45
RAM and EPROM

RAM (left) and UV EPROM (right) used in a small computer system

46
DATA STORAGE Cache Memory

• Cache Memory
• The most microcontrollers use DRAM chips for their main RAM.
• However, modern microcontrollers usually also include an internal memory
cache, located on the CPU itself, together with an external memory cache,
that uses SRAM chips, to speed up memory access.
• Cache memory is extremely fast memory that is built into a computer's
central processing unit (CPU), or located next to it on a separate chip.
• The CPU uses cache memory to store instructions that are repeatedly
required to run programs, improving overall system speed.
Internal Memory Cache
• A memory cache has been integrated on Intel processors since the
introduction of the Intel 80486 series and this stores data that the CPU is
most likely to request from RAM.
• As the internal cache is integrated with the CPU it can supply data much
more quickly than either RAM or external caches can and so can improve
the computer's performance significantly.
• Internal memory cache is also sometimes called a Primary or Level One
cache.

47
DATA STORAGE

• The semiconductor ROM within a microprocessor system provides storage


for the program code, as well as any permanent data that requires storage.
• All of this data is referred to as non-volatile because it remains intact when
the power supply is disconnected.
• The semiconductor RAM within a microprocessor system provides storage
for the transient data and variables that are used by programs.
• Part of the RAM is also used by the microprocessor as a temporary store for
data while carrying out its normal processing tasks.
• It is important to note that any program or data stored in RAM will be lost
when the power supply is switched off or disconnected.
• The only exception to this is low-power CMOS RAM, which is kept alive by
means of a small battery.
• This battery-backed memory is used to retain important data, such as the
time and date.

48
DATA STORAGE

• When expressing the amount of storage provided by a memory device we


usually use Kilobytes (Kbyte).
• It is important to note that a Kilobyte of memory is actually 1,024 bytes (not
1,000 bytes).
• The reason for choosing the Kbyte rather than the kbyte (1,000 bytes) is
that 1,024 happens to be the nearest power of 210 (note that 210 = 1,024).
• The capacity of a semiconductor ROM is usually specified in terms of an
address range and the number of bits stored at each address.
• For example, 2K × 8 bits (capacity 2 Kbytes), 4K × 8 bits (capacity 4
Kbytes), and so on.
• Note that it is not always necessary (or desirable) for the entire memory
space of a computer to be populated by memory devices.

49
DATA STORAGE Cache Memory

• External Memory Cache


• External memory cache serves as an intermediary between the very fast
CPU and the slower DRAM chips of the computer's main RAM.
• These external caches usually include fast SRAM chips, hardware circuitry,
and controlling software and because they are external to the CPU, they are
slower than internal memory caches.
• As with internal cache, external memory cache also stores data that the
CPU is most likely to request from RAM.
• These caches can supply data to the CPU more quickly than RAM and so
also
• can improve the computer's perSecondary or Level Two cache.
• Cache memory is effective because it works on the principle that once a
memory location has been accessed, it is likely to formance significantly.
External memory each is also sometimes called a be accessed again soon
as a lot of computing work is repetitive and so a high 'hit rate' can be
expected.
• Hit rate is an indication of the number of times that cache is accessed
divided by the total number of memory accesses including the main and all
cache memory. A well-designed PC has a typical cache hit rate of 85-90%.
50
DATA STORAGE DMA
• Direct Memory Access (DMA)
• Direct Memory Access (DMA) is a capability provided by some computer
bus architectures that allows data to be sent directly from an attached
device (such as a disk drive) to the memory on the computer's motherboard.
The CPU is not involved with the data transfer, thus speeding up overall
computer operation.
• While most data that is input or output from a computer is processed by the
CPU, some data does not require processing, or can be processed by
another device.
• In these situations, DMA can save processing time and is a more efficient
way to move data from the computer's memory to other devices.
• For example, a sound card may need to access data stored in the
computer's RAM, but since it can process the data itself, it may use DMA to
bypass the CPU.
• Video cards that support DMA can also access the system memory and
process graphics without needing the CPU, see the following Figure.
• Traditionally, without the use of DMA, the CPU would be fully occupied with
this operation for the duration of the read or write transfer operation.
• DMA removes this, and enables the CPU to complete other tasks.
• Although, the CPU still has to initiate the transfer, and will receive an
interrupt to show that DMA transfer has completed. 51
Direct Memory Access (DMA)

52

You might also like