0% found this document useful (0 votes)
25 views

Module 5

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Module 5

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

MODULE 5

Digital to Analog
Convertors(DAC)
• Signals are mainly classified into two
types i.e. Analog & Digital signal.
• The data or information that we perceive
in real world exists in analog form while
the digital devices such as cellphone,
calculator & computer can only
understand a data signal in digital
domain.
• Analog to Digital (ADC) & Digital to
analog converter (DAC) are the two
types of converters that we use in our
daily life to convert the signals into each
other.
What is DAC?
• Digital to analog converter is an
electronic circuit that converts any
digital signal (such as binary
signal) into an analog signal.
• The digital signal such as the
binary signal exist in the form of
bits & it is the combination of 1’s &
0’s (or High & low voltage levels).
The DAC converts these bits into
an analog voltage or current.
Need of DAC
• The information exist in real world is in analog
form.
• Why we convert them into digital form in the
first place if we want to convert them back?
• The processing speed of a digital computer is
very fast & can compute or process any data in
a matter of microseconds.
• It conserves time & helps in processing
complex data according to our need. But we
cannot understand the digital data in real
world.
Need of DAC
• To understand the data that we process in a
digital domain, we need to convert it into
analog domain.
• An example of that would be the process of
audio & video editing. We capture the data
using our digital camera & microphone to
convert the analog data into digital.
• We process it using our computers to edit it
according to over needs.
• To view our edited work, we use DACs to
convert it back into the analog domain to view
& listen it through our screen & speakers.
Types of DAC

• The DAC can be designed using one of the


following types of circuits.
1. Weighted Resistors Method
2. R-2R Ladder Circuit
Weighted Resistors Method
• The basic operation of DAC is
the ability to add inputs that will
ultimately correspond to the
contributions of the various bits of
the digital input.
• In the voltage domain, that is if
the input signals are voltages, the
addition of the binary bits can be
achieved using the
inverting summing
amplifier shown in the below
figure.
Weighted Resistors Method

• A weighted resistor DAC produces an analog


output, which is almost equal to the digital
(binary) input by using binary weighted
resistors in the inverting adder circuit.
• In short, a binary weighted resistor DAC is
called as weighted resistor DAC.
• In the voltage domain, that is if the input
signals are voltages, the addition of the binary
bits can be achieved using the inverting
summing amplifier shown in the above figure.
Weighted Resistors
Method
• The input resistors of the op-
amp have their resistance
values weighted in a binary
format.
• When the logic circuit receiving
binary 1 the switch connects
the resistor to the reference
voltage.
• When the logic circuit receives
binary 0, the switch connects
the resistor to ground.
• All the digital input bits are
simultaneously applied to the
DAC.
• The DAC generates analog output
voltage corresponding to the given
digital data signal.
• For the DAC the given digital
voltage is b3 b2 b1 b0 where each
Weighted Resistors bit is a binary value (0 or 1). The
Method output voltage produced at output
side is:
V0=R0/R (b3+b2/2+b1/4+b0/8) Vref
• As the number of bits is increasing
in the digital input voltage, the range
of the resistor values becomes large
and accordingly, the accuracy
becomes poor.
Disadvantages of a
binary weighted
resistor
• The difference between the
resistance values
corresponding to LSB & MSB
will increase as the number of
bits present in the digital input
increases.
• It is difficult to design more
accurate resistors as the
number of bits present in the
digital input increases.
R-2R Ladder DAC
• The R-2R Ladder DAC overcomes the disadvantages
of a binary weighted resistor DAC.
• As the name suggests, R-2R Ladder DAC produces an
analog output, which is almost equal to the digital
(binary) input by using a R-2R ladder network in the
inverting adder circuit.
R-2R Ladder
DAC(Circuit
Diagram)
R-2R Ladder DAC
• The bits of a binary number can have only
one of the two values. i.e., either 0 or 1.
• Let the 3-bit binary input is b2b1b0.
• Here, the bits b2 and b0 denote the Most
Significant Bit (MSB) and Least Significant
Bit (LSB) respectively.
• The digital switches shown in the above
figure will be connected to ground, when the
corresponding input bits are equal to ‘0’.
• Similarly, the digital switches shown in
above figure will be connected to the
negative reference voltage, −VR when the
corresponding input bits are equal to ‘1’.
R-2R Ladder DAC

• It is difficult to get the


generalized output voltage
equation of a R-2R Ladder DAC.
• But, we can find the analog
output voltage values of R-2R
Ladder DAC for individual
binary input combinations
easily.
Advantages of R-2R
ladder DAC
• R-2R Ladder DAC contains only two
values of resistor: R and 2R.
• So, it is easy to select and design
more accurate resistors.
• If more number of bits is present in
the digital input, then we have to
include required number of R-2R
sections additionally.
• Due to the above advantages, R-2R
Ladder DAC is preferable over binary
weighted resistor DAC.
Analog to Digital • ADC is an electronic device used for
converting an analog signal into a digital

Converters(ADC)
signal.
• The analog input signal of ADC
is continuous time & continuous
amplitude signal. The output of ADC is
a discrete time and discrete
amplitude digital signal.
• In the real world, every real quantity such
as voice, temperature, weight etc exists in
the analog state. And it cannot be
processed by any digital device such as a
computer or a cell phone.
• These analog quantities are converted into
digital form so that a digital device can
process it. This conversion is done
using analog to digital converter.
• The analog signal is first applied to the ‘sample‘ block
Block Diagram of where it is sampled at a specific sampling frequency.
ADC • The sample amplitude value is maintained and held in the
‘hold‘ block. It is an analog value.
• The hold sample is quantized into discrete value by the
‘quantize‘ block.
• At last, the ‘encoder‘ converts the discrete amplitude
into a binary number.
Analog To Digital Conversion Steps

Sample
• The sample block function is to sample the input analog signal at
a specific time interval.
• The samples are taken in continuous amplitude & possess real
value, but they are discrete with respect to time.
• The sampling frequency plays important role in the conversion.
So, it is maintained at a specific rate. The sampling rate is set
according to the requirement of the system.
Hold
• The second block used in ADC is the ‘Hold’ block.
• It has no function.
• It only holds the sample amplitude until the next sample is taken.
The hold value remains unchanged till the next sample.
Analog To Digital
Conversion Steps
Quantize
• This block is used for quantization. It converts the analog or
continuous amplitude into discrete amplitude.
• The on hold continuous amplitude value in hold block goes
through ‘quantize’ block & becomes discrete in amplitude. The
signal is now in digital form as it has discrete time & discrete
amplitude.
Encoder
• The encoder block converts the digital signal into binary
form i.e. into bits.
• As we know that the digital devices operate on binary signals, so
it is necessary to convert the digital signal into the binary form
using the Encoder.
• This is the whole process of converting an Analog signal into
digital form using an Analog to Digital Converter. This whole
conversion occurs in a microsecond.
Techniques of Analog-
to-Digital Conversion

• The techniques that are


used for analog to digital
conversion is:
1. Pulse Code
Modulation(PCM)
2. Delta Modulation
Pulse Code
Modulation(PCM)

• The most common technique to change an


analog signal to digital data is called
pulse code modulation (PCM). A PCM
encoder has the following three
processes:
1.Sampling
2.Quantization
3.Encoding
Sampling

• The first step in PCM is sampling.


• Sampling is a process of measuring
the amplitude of a continuous-time
signal at discrete instants, converting
the continuous signal into a discrete
signal.
• There are three sampling methods:
(i) Ideal Sampling
(ii) Natural Sampling
(iii) Flat top Sampling
Ideal Sampling

In ideal Sampling also


This is an ideal sampling
known as Instantaneous
method and cannot be
sampling, pulses from the
easily implemented.
analog signal are sampled.
Natural Sampling

• Natural Sampling is a practical


method of sampling in which pulse
have finite width equal to T.
• The result is a sequence of samples
that retain the shape of the analog
signal.
Flat top Sampling

• In comparison to natural
sampling flat top sampling can
be easily obtained.
• In this sampling technique, the
top of the samples remains
constant by using a circuit.
• This is the most common
sampling method used.
• Nyquist Theorem:
• One important consideration is the
sampling rate or frequency. According to
the Nyquist theorem, the sampling rate
must be at least 2 times the highest
frequency contained in the signal.
• It is also known as the minimum sampling
rate and given by:
Fs =2*fh
Quantization
The result of sampling is a series of
pulses with amplitude values
between the maximum and
minimum amplitudes of the signal.
The set of amplitudes can be infinite
with non-integral values between
two limits.
The following are the steps in
Quantization:
1. We assume that the signal has
amplitudes between Vmax and Vmin
2. We divide it into L zones each of
height d where, d= (Vmax- Vmin)/ L
Quantization
3. The value at the top of each sample in the graph
shows the actual amplitude.
4. The normalized pulse amplitude
modulation(PAM) value is calculated using the
formula amplitude/d.
5. After this we calculate the quantized value which
the process selects from the middle of each zone.
6. The Quantized error is given by the difference
between quantized value and normalised PAM
value.
7. The Quantization code for each sample based on
quantization levels at the left of the graph.
Encodingg

• The digitization of the analog signal is done by the encoder.


• After each sample is quantized and the number of bits per sample is decided,
each sample can be changed to an n bit code.
• Encoding also minimizes the bandwidth used.
• Note that the number of bits for each sample is determined from the number of
quantization levels.
• If the number of quantization levels is L, the number of bits is n bit = log 2 L.
DELTA MODULATION
• Since PCM is a very complex
technique, other techniques have
been developed to reduce the
complexity of PCM.
• The simplest is delta Modulation.
Delta Modulation finds the change
from the previous value.
• Modulator – The modulator is used
at the sender site to create a stream
of bits from an analog signal.
• The process records a small positive
change called delta. If the delta is
positive, the process records a 1 else
the process records a 0.
• The modulator builds a second signal
that resembles a staircase.
• The input signal is then compared
with this gradually made staircase
signal.
• We have the following rules for
output:
1.If the input analog signal is higher
than the last value of the staircase
signal, increase delta by 1, and the
bit in the digital data is 1.
2.If the input analog signal is lower
than the last value of the staircase
signal, decrease delta by 1, and the
bit in the digital data is 0.
Demodulator – The demodulator takes
the digital data and, using the staircase
maker and the delay unit, creates the
analog signal. The created analog
signal, however, needs to pass through
a low-pass filter for smoothing.
Memory
• What is Computer Memory?
• Computer memory is just like the
human brain. It is used to
store data/information
and instructions.
• It is a data storage unit or a
data storage device where data is to
be processed and instructions
required for processing are stored.
• It can store both the input and
output can be stored here.
Characteristics of
Computer Memory

• Primary Memory is faster computer


memory as compared to secondary
memory.
• It is semiconductor memories.
• It is usually a volatile memory, and main
memory of the computer.
• A computer system cannot run without
primary memory.
How Does Computer
Memory Work?
• When you open a program, it is loaded
from secondary memory into primary
memory.
• Because there are various types of
memory and storage, an example would
be moving a program from a solid-state
drive (SSD) to RAM.
• Because primary storage is accessed more
quickly, the opened software can connect
with the computer’s processor more
quickly.
• The primary memory is readily accessible
from temporary memory slots or other
storage sites.
How Does Computer
Memory Work?

• Memory is volatile, which means that


data is only kept temporarily in
memory.
• Data saved in volatile memory is
automatically destroyed when a
computing device is turned off.
• When you save a file, it is sent to
secondary memory for storage.
Types of Memory
• Memory is the most essential
element of a computing system
because without it computer can’t
perform simple tasks.
• Both types of memory (RAM and
ROM) are important for the
computer, but they serve different
purposes.
• RAM is used to store data that the
computer is currently using, while
ROM is used to store data that the
computer needs to boot and operate.
• RAM is faster than ROM, as the data
stored in it can be accessed and
modified in any order, while data
stored in ROM can only be read.
• Computer memory is of two basic types:
1. Primary memory (RAM and ROM)
2. Secondary memory (Hard Drive, CD, etc).
Random Access Memory (RAM)

• It is also called read-write memory or the main


memory or the primary memory.
• The programs and data that the CPU requires
during the execution of a program are stored in
this memory.
• It is a volatile memory as the data is lost when the
power is turned off.
Types of Random Access
Memory (RAM)

1. Static RAM
2. Dynamic RAM
SRAM and DRAM

• Static RAM: SRAM stands for


Static Random Access Memory. It
is a type of semiconductor which
is widely used in computing
devices and microprocessors.
• Dynamic RAM: DRAM stands for
Dynamic Random Access
Memory. It is made of Capacitors
and has smaller data life span
than Static RAM.
Advantages of Random
Access Memory (RAM)
• Speed: RAM is much faster than other
types of storage, such as a hard drive
or solid-state drive, which means that
the computer can access the data
stored in RAM more quickly.
• Flexibility: RAM is volatile memory,
which means that the data stored in it
can be easily modified or deleted. This
makes it ideal for storing data that the
computer is currently using or
processing.
• Capacity: The capacity of RAM can be
easily upgraded, which allows the
computer to store more data in
memory and thus improve
performance.
• Power Management: RAM consumes
less power compared to hard drives,
and solid-state drives, which makes it
an ideal memory for portable devices.
Disadvantages of Random
Access Memory (RAM)
• Volatility: RAM is volatile memory, which
means that the data stored in it is lost when
the power is turned off. This can be a
problem for important data that needs to be
preserved, such as unsaved work or files
that have not been backed up.
• Capacity: The capacity of RAM is limited,
and although it can be upgraded, it may still
not be sufficient for certain applications or
tasks that require a lot of memory.
• Cost: RAM can be relatively expensive
compared to other types of memory, such as
hard drives or solid-state drives, which can
make upgrading the memory of a computer
or device more costly.
Read-Only Memory (ROM)

• Stores crucial information essential to operate the system, like the


program essential to boot the computer.
• It is non-volatile.
• Always retains its data.
• Used in embedded systems or where the programming needs no
change.
• Used in calculators and peripheral devices.
• ROM is further classified into four types- MROM(Mask Read Only
Memory), PROM, EPROM, and EEPROM.
EPROM

• The Erasable Programmable Read Only Memory is a


memory chip that does not lose data even when the power
is switched off.
• This is a non-volatile memory type i.e. it retains data even
when the power is switched off.
• Each EPROM is individually programmed by an electronic
device.
• After that, the data can be erased by exposing the EPROM
to strong ultraviolet light.
EPROM Operation

• A single field effect transistor constitutes a storage location.


• This field effect transistor contains a channel.
• This channel contains source and drain contacts at its ends.
• An insulated layer of oxide covers the channel and then a
conductive gas electrode on top of it.
• All this is followed by a control gate electrode and more
oxide.
EPROM Operation

• Data can be extracted from the EPROM by decoding the


address at the address pins and then connecting it to the
output buffers.
• The programming process in EPROM is not reversible
electrically.
• Ultraviolet light is used to cause ionization within the oxide
which allows the stored charge to dissipate and the memory
is also deleted.
Applications of EPROM

• On-chip EPROM was used by some microcontrollers such as


Intel 8048, Freescale 68HC11, PIC microcontroller (C
version) etc.
Advantages of EPROM

• EPROM is non-volatile so it retains its memory even without power. So no


external memory is required.
• EPROM is quite effective.
• EPROM is reprogrammable i.e. the data in the EPROM can be erased and
reprogrammed.
Disadvantages of EPROM

• Transistors used in EPROM have a higher resistance.


• The EPROM needs UV light to erase the data. This can’t be done using
electrical signals.
• It is not possible to erase a particular byte of data in EPROM. The whole
data is deleted.
• The static power consumption of EPROM is quite high.
• It takes some time to erase the data in EPROM. This is different than
EEPROM where the data can be instantaneously erased.
EEPROM

• EEPROM (Electrically Erasable Programmable read-


only memory) is a type of non- volatile memory
technology that may be programmed, erased and
reprogrammed electrically.
• It allows for information to be saved even if electricity is
removed, making it useful in numerous electronic devices
that require information storage.
Working Principle of EEPROM

• EEPROM works by using a grid of transistors and capacitors to save


binary records.
• Each transistor and capacitor pair, called a memory cellular, can save a
single bit of data.
• When a voltage is applied to the control gate of the transistor, it permits
electrons to pass through the insulating layer, either charging or
discharging the capacitor to represent a 1 or 0.
• To change the saved information, a better voltage is applied to the gate,
which causes the insulating layer to interrupt down and erase the stored
charge.
• The memory cell can then be reprogrammed with new data through
applying the suitable voltages to the control gate and the other
electrodes.
Advantages of EEPROM over other types of ROM

• EEPROM is rewritable, whereas traditional ROMs including prom and


EPROM are not. This allows for more flexibility in data storage and
updating.
• Unlike traditional ROMs, EEPROM no longer requires the use of UV light for
erasure, making the system much easier and faster.
• EEPROM may be erased and reprogrammed electronically, without the
need for a separate device or programmer.
• EEPROM gives faster read and write times than conventional ROMs.
• EEPROM is non-volatile, which means it keeps information even if
electricity is removed, making it ideal for applications that require long-
term data storage.
Applications of EEPROM

• Microcontrollers − EEPROM is normally used in microcontrollers to store


application code and data, as well as to store configuration settings and
other essential information.
• Smart cards − To store data such as user identity, balances of accounts, and
records of transactions, EEPROM is used in smart cards.
• Automotive electronics − EEPROM is used in automotive electronics for
storing calibration and diagnostic information, as well as for storing safety
codes and different sensitive data.
Applications of EEPROM

• Client electronics − EEPROM is used in many client electronics products,


consisting of digital cameras, MP3 players, and different portable devices,
to store user settings and other data.
• Industrial control systems − EEPROM is used in industrial control systems
to store configuration and calibration information for sensors, vehicles, and
other equipment.
Advantages

• Fast erasing of data as it uses electrical signals and can


erase all contents or can erase by particular byte.
• Data stored is non-volatile and retains even if the power
is off.
• Easy to reprogram without taking it out from computer
and does not require any additional equipments for
reprogramming.
Disadvantages

• Data retention problem as insulator used is not a perfect


insulator and manufacture provides data retention upto
10 years.
• It requires different voltages for reading, writing and
erasing the content.
Comparison
between EPROM
and EEPROM
Comparison
between
EPROM and
EEPROM

You might also like