Unit 4 - Digital Systems - www.rgpvnotes.in (1)
Unit 4 - Digital Systems - www.rgpvnotes.in (1)
Unit 4 - Digital Systems - www.rgpvnotes.in (1)
Tech
Subject Name: Digital Systems
Subject Code: CS-304
Semester: 3rd
Downloaded from be.rgpvnotes.in
Analog
Input Clock
EOC
VA Start VA
Comparator Conversion
Reset VAX complete.
Counter
D/A Count stops
counting.
VAX Conve er
rter EOC
(DAC)
Time
Digital result Start
Figure 4.2: Digital Ramp ADC
Operation: Assume that VA is positive. START pulse is applied to RESET the counter to 0 and
AND gate is disabled. With all 0s as its input, DAC output will be VAX = 0v. Since VAX < VA,
comparator output, (EOC)’, is HIGH. When START is LOW, AND gate is enabled and clock
pulses get through to the counter. As the counter advances, DAC output, VAX, increases one
step at a time. This continues until VAX > VA by an amount equal or greater than threshold
voltage (typically 10 to 100μv). At this point comparator output, (EOC)’, goes LOW and
counter stop counting. The conversion process is now complete and the contents of the
counter are the digital representation of VA. Counter will hold the digital value until the next
START pulse initiates a new conversion.
Conversion time, Tc, is the interval between the end of the START pulse and the activation of
the (EOC)’ output. Tc depends upon VA .
For N-bit converter: Tc(max) = (2N – 1) clock cycles. Tc(avg) = Tc(max) / 2 clock cycles.
Major disadvantage of digital ramp ADC is that it is not suitable for where the repetitive A/D
conversion of a fast changing analog signal occurs. In this method the conversion time
essentially doubles for each bit that is added to the counter.
Operation of 4-bit SAC using DAC step size of 1Volt and VA = 10.4 Volts:
MSB VAX
From Q4 DAC 12
CNTL Regis Q3 Step Conversion
logic ter Q2 size=1v VAX 11
completed
10
Q1
LSB 9
VA=
To CNTL logic
T0 T1 T2 T3 T4 T5 T6 Time
Figure 4.4: 4-bit SAC using step size
1V
Operation: Figure 4.4 shows the 4-bit SAC using DAC step size of 1Volt. Let assume that the
analog input is VA=10.4V.
At time T0, VAX = 0V, i.e VA > VAX, comparator output is HIGH. Control logic clearing all bits so,
Q3=Q2=Q1=Q0=0 ie [Q]= 0000.
At time T1, control logic (CNTL) sets MSB = 1. So [Q]= 1000. This produces VAX = 8V. Since, VA
> VAX, comparator output is HIGH. This HIGH tells the CNTL logic that the setting of MSB did
not make VAX exceeds VA, so that MSB is kept at 1.
Now, CNTL logic proceeds to next lower bit, Q2. Q2=1 to produce [Q] = 1100 and VAX = 12V at
time T2. Since VAX > VA, comparator output goes LOW. The value of VAX is too large, so CNTL
logic then clears register contents back to 1000 ie VAX = 8V. Thus, at T3, VAX = 8V.
At time T4, CNTL logic sets the next lower bit Q1 = 1, ie [Q] = 1010 and VAX = 10V.
With VA > VAX, comparator output is HIGH and tells the CNTL logic to keep Q1 set at 1.
Final step, time T5, CNTL logic sets the next lower bit Q0 =1 ie [Q] = 1011 and VAX = 11V.
Since VAX > VA, comparator goes LOW to signal that VAX is too large, and the CNTL logic clears
back Q0 to 0 at time T6.
At this point, all of the register bits have been processed, the conversion is complete and the
CNTL logic activates (EOC)’ output to signal that is digital equivalent of VA is now in the
register. So, digital output for VA = 10.4V is [Q] = 1010.
Conversion time,Tc, for SAC: The control logic goes to each register bit, set it to 1, decides
whether or not to keep it at 1, and goes on to the next bit. The processing of each bit takes
one clock cycle, so that the total conversion time for an N-bit SAC will be N-clock cycles.
Tc = N x 1 clock cycles
FLASH ADC: It is the highest speed ADC, but its circuitry requires much more than other
types ADC. Example: 6-bit flash ADC requires 63 analog comparators; 8-bit requires 255
comparators.
10V
3KΩ
C7
1KΩ 7V MSB
C6 C
1KΩ 6V
Priority
C5 Encoder
5V Digital
1KΩ B output
C4
1KΩ 4V
C3
A
3V
1KΩ
C2
1KΩ 2V
C1
1V
1KΩ
Analog
Input
VA
Figure 4.5: 4-bit Flash Converter
Operation: 3-bit flash converter has a resolution (step size) of 1V. Voltage divider set up a
reference levels for each comparator, so that there are seven levels corresponding to 1V
(weight of LSB), 2V, 3V, 4V, 5V, 6V and 7V (Full Scale). Analog input is connected to other
input of each comparator. 3-bit flash converter ADC operation table is shown below:
will be LOW. Comparator output is feed into active low priority encoder that generates a
binary output corresponding to the highest numbered comparator output, that is LOW. For
example, if VA is between 3V – 4V, output C1, C2 and C3 will be LOW and all others are HIGH.
Priority encoder will respond only to the LOW at C3 and will produce binary output CBA =
011. Conversion Time, Tc of flash converter: Flash converter uses no clock signals.
Conversion time depends only on the propagation delays of the comparators and encoder
logic. So, flash converter has extremely short conversion times.
S
Monostable
Multivibrator
C
R N-bit
Vout
Vc count Display
Vin
er
-Vref VEN
V-F Converter
Figure 4.6: ADC using V-F converter
Voltage to frequency ADC does not require DAC. Instead it uses a linear voltage controlled
oscillator (VCO), that produces an output frequency that is proportional to its input voltage.
The analog input (Vin) that is to be converted, is applied to the VCO to generate the output
frequency. This frequency is fed to the counter to be counted for a fixed time interval (VEN).
The final count is proportional to the value of the analog voltage. Circuit diagram of ADC
using V-F converter shown in figure.
Operation: The Vin is applied to an integrator whose output is applied at the inverting
terminal of a comparator. Non-inverting terminal is connected to –Vref. When switch S is
open, Voltage Vout decreases linearly with time. Thus AND gate is disabled as long as Vout <
Vref. As soon as Vout = Vref, the output Vc becomes positive, enabiling AND gate and hence
counter starts counting. When the switch S is closed, the capacitor discharges and thereby
returning the integrator output, Vout, to zero. After the delay time of multivibrator the switch
S is again open and Vout starts decreasing again and ADC repeats its function.
Block diagram of a voltage to frequency converter is shown in figure4.7 . The analog input is
applied to an integrator. The integrator produces a ramp signal whose slope is proportional
to the input voltage signal.
C
R
Comparator Counter
Input Digital Output
Voltage Integrator
Pulse
Generator
Pulse Trigger O/P
Output of Integrator, a ramp Signal
Zero Level
Trigger Level
When this ramp signal reaches a preset threshold voltage level, a trigger pulse is produced.
Also a current pulse is produced which discharges the capacitor of the integrator, after which
a new ramp is initiated. The time between successive threshold level crossings is inversely
proportional to the slope of the ramp. Since the slope of the ramp is proportional to the
input analog voltage, hence the frequency of output pulses from the comparator is directly
proportional to input voltage. The output frequency can be measured with the help of digital
frequency meter.
VA
Ch
discharge the capacitor voltage during the conversion time of the ADC.
DIGITAL TO ANALOG CONVERSION (DAC):
DAC is the process of taking digital code as input and converting it to a voltage or current
that is proportional to digital value.
Vref = 15V TABLE of 4-bit DAC:
Inputs Output
MSB D C B A Vout
Digital D DAC 0 0 0 0 0
Vout
Inputs C 0 0 0 1 1
Analog
O/P 0 0 1 0 2
B 0 0 1 1 3
A LSB 0 1 0 0 4
0 1 0 1 5
Figure 4.9:Block diagram 4-bit DAC 0 1 1 0 6
0 1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 10
1 0 1 1 11
1 1 0 0 12
1 1 0 1 13
1 1 1 0 14
1 1 1 1 15
From the block diagram as shown in figure 4.9 of 4-bit DAC ,Vref as input is used to
determine the full scale output or maximum value that DAC can produce. For each input
number, DAC output voltage is unique value. In general, Analog output (Vout) = K x Digital
Input; Where, K is proportionality constant. In above block , DAC has K=1, so that, Vout = 1 x
Digital Input.
Example: For digital input (1100)2 = (12)10 , we obtain Vout = 1 x 12 = 12V.
RESOLUTION OR STEP SIZE OF DAC: Resolution of DAC is defined as the smallest change that
can occur in the analog output as a result of a change in the digital input. Resolution is
always equal to the weight of the LSB and also referred to as step size, since it is the amount
that Vout will change as the digital input value is changed from one step to the next.
Resolution= K = AFS / (2n – 1) where, AFS is analog full scale output; n is the number of bits
% Resolution = (Step size / AFS ) x 100 OR % Resolution = (1 / Total no. of steps ) x
100
From the figure4.10 , opamp as summing amplifier, inputs A, B, C and D are binary inputs that
are assumed to have a values either 0V or 5V. OP-AMP as summing amplifier, which
produces the weighted sum of the input voltages. So that, Vout = ─(VD + 1/2 VC + 1/4 VB +
1/8 VA)
So, the summing amplifier output is the analog voltage which represents a weighted sum
of the digital inputs. The resolution of this DAC using opamp as summing amplifier using
binary weighted resistor, is equal to the weighting of the LSB, which is 1 / 8 x 5 = 0.625V.
+Vref
2R 2R 2R 2R
2R
2R
R R R Iout
Vout
B3 B2 B1 B0
(MS B) (LSB)
Example: Assume the Vref = 5V. What are the resolution and full scale output of this R/2R
converter?
Solution: Resolution is equal to weight of LSB. Suppose, [B] = 0001 = (1)10
Resolution = (-5V x 1)/ 8 = -0.625V. The full scale output occur for [B]=1111 =
(15)10 So, full scale output = (-5V x 15)/ 8 = -9.375V.
BISTABLE MULTIVIBRATOR:
If both the states of a multivibrator are stable i.e. the circuit which is in a particular state
continues to remain in that state until it is triggered from an external source to change the
state. Flip Flops are bistable multivibrator circuits as shown in figure 4.12.
Vcc
Input S
C2 C1 0
RC RC
Q’ Q
R1 R1 Vcc Output
T1 T2 of T1
-VBB R2 0
R2
Vcc
Output
S R 0 of T2
Trigger input 1 Trigger input 2
Transistor T1 and T2 are npn transistors and are resistively crosscoupled with each other. Q
and Q’ are outputs. Rc is the collector resistance. C 1 and C2 are commutating capacitors, to
fast turn OFF and ON of two transistors (C1 for T2 and C2 for T1). Supply –VBB and resistor R2
are used to keep the base of the transistors at negative in one state and in other state
provides large base current to drive the transistor into saturation.
Operation: When supply is ON, say T1 is ON, so, Vc1 = 0v, the base of T2 is connected to Vc1,
so T2 is OFF. This makes Vc2 = Vcc, since base of T1 is connected to Vc2, so T1 is ON. This is the
first stable state (ie. T1=ON and T2=OFF ie. Q=1 and Q’=0).
To change the state of transistor T2, a positive pulse is applied at the base of T2. The OFF
transistor T2 will be forced to turn ON (tp > ton ie. Pulse width should be greater than turn ON
time of transistor). Thus Vc2 is forced to 0v. Since base of T1 is connected to Vc2, so T1 is OFF.
This is the second stable state (ie. T1=OFF and T2=ON ie. Q=0 and Q’=1).
MONOSTABLE MULTIVIBRATOR:
Monostable multivibrator as shown in figure 4.13 has one stable state and the other one is
not stable (quasi stable).It is also called as one-shot multivibrator. Transition from stable
state to quasi stable state is done by an external trigger pulse. After transition from stable to
quasi stable state, the multivibrator remains in the quasi stable state for a definite period of
time, decided by comoponents R and C, and then returns to the stable state automatically.
Vcc Trigger
I/P
0
RC C R RC
Q’ Q
R1 Vcc tp Output
T1 T2 of T1
-VBB 0
R2
Vcc Output
of T2
0
Trigger input
Figure4.13: Monostable Multivibrator
In this circuit the base of transistor T2 is capacitively coupled to the collector of T1, while the
base of T1 is resistively coupled to the collector of T2.
Operation: When no trigger pulse applied, T2 is ON, a proper base drive through Vcc and R to
the base of T2. So, Vc2 = 0v. T1 is OFF, because of resistively coupled of base T1 with Vc2(Vc1 =
Vcc). At the instant when T2 is ON, capacitor C charged towards Vcc through Rc. This is the
stable state of multivibrator.
When a sufficient positive trigger pulse is applied to the base of T1, T1 is ON, so Vc1 = 0v.
Now the capacitor discharges through T1 and R. Thus discharge current through R creates a
negative potential at the base of T2. Thus T2 is OFF as long as the voltage drop across R is
negative. This condition is quasi stable state. When the capacitor fully discharges the
negative voltage at the base of T2 reduces to zero and Vcc now drives the T2 ON, so Vc2 = 0v.
So, T1=OFF and Vc1=Vcc. This is the stable state and circuit remains in the stable state until the
next trigger pulse is applied.
Time duration of quasi stable state or the pulse width: tp = 0.693(R.C)
ASTABLE MULTIVIBRATOR:
Astable multivibrator as shown in figure 4.14, has no stable states but has two quasi stable
states. The output oscillates between two quasi stable states without any external
triggering ,therefore this circuit is also called as free running multivibrator. The output at the
collector of transistors is a square wave, therefore also called as square wave generator.
Vcc
RC1 C1 R1 R2 RC2
C2
Q’ Q Vcc Output
T1 T2 of T2
0
Vcc Output
Figure4.14: Astable Multivibrator
0 of T1
Operation: Initially assume that T1 is ON and T2 is OFF due to circuit unbalance. So, Vc1 = 0v
and Vc2 = Vcc. Since T1 is ON, C2 charges towards Vcc through Rc2. Meanwhile C1 which was
charged to Vcc when T2 was ON will discharge through T1 and R1. This makes the potential at
VB2 negative and causes T2 to turn OFF. T1 is kept ON by the base current provided by Vcc
through R2. The charging current of C2 through Rc2 has reduced to zero. The time duration for
which T2 is held OFF is determined by the R1.C1. Once T2 turns ON due to the base drive from
Vcc through R1, then C1 gets charged through Rc1 and T2. At the same time C2 discharges
through T2 and R2 making VB1 negative so that T1 is turned OFF, thus Vc1 = Vcc. T1 is held OFF
by the discharging current for the time duration R2.C2. After this T1 turns ON and allow C1 to
discharge through T1 and then C2 recharges through T1.
SCHMITT TRIGGER:
In digital circuits, fast waveforms are required so that the circuit remans in the active region
for a very short time (of order of nano seconds) to eliminate the effects of noise or undesired
parasitic oscillations causing malfunction of the circuit. Also if the rise time of the input
waveform is long, it requires a large oupling capacitor. Therefore circuits which ca convert a
required. The circuit which performs this waveform is known as Schmitt trigger.
In a Schmitt trigger circuit, the output is in one of the two levels, LOW or HIGH. From the
figure 4.15,when the input voltage is rising, the level of the output changes when the input
passes through a specific voltage VT+ (upper triggering level). Similarly, when the input
voltage is falling, the level of the output changes when the input passes through a specific
voltage VT – (lower triggering level), the level of the output changes. VT+ (upper triggering
level) is always greater than VT – (lower triggering level). The difference of these two voltages
is known as hysteresis as shown in figure 4.16.
VT+ +Vo
+Vo(sat.)
0
Input
VT─
─Vi +Vi
+Vo
Output ─Vo(sat.)
0
─Vo LTL UTL
─Vo
Figure4.16: Hysteresis Loop
Figure4.15: Schmitt Trigger I/P & O/P Waveform
RE
Vi R2
IC-555 TIMER:
Page no: 14 Follow us on facebook to get real-time updates from RGPV
Downloaded from be.rgpvnotes.in
Figure 4.19 (a) shows the circuit diagram of IC-555 as monostable multivibrator and (b)
shows the waveform of trigger pulse, capacitor voltage and output pulse. Since it has only
one stable state (output low), hence name monostable.
VCC
VCC Trigger
R
8 4 0
7 VCC t
2 tP Output
1 5
Pulse (VO)
C 0 t
Figure 4.19(b): Waveforms
Figure 4.19(a): Monostable Multivibrator
It is also called as one-shot multivibrator. From the circuit diagram, Pin-8 is connected to Vcc
and pin-4 (reset pin) also connected to Vcc so that reset condition is disabled. The time
interval for which the output remains high (tP, pulse width) is decided by the external RC
network. The capacitor C is connected between pin 7 and 1 so that it charges through the
resistance R when the transistor Q1 is OFF.
Operation: Initially, trigger pulse is high (Vcc), this drives the output of comparator-2 to low
condition. As the capacitor C is in discharged state, pin-6 and 7 are at ground potential. The
inputs to the flip flop will be S=R=0, hence Q’ = high, so, Q1 is ON, and C discharges to 0V ie.
Vc
= 0V. Since Q’ = 1, output pin-3 = 0 is actually the stable state of multivibrator.
When the trigger input (negative trigger pulse) goes low (from Vcc to 0), comparator-2 output
= high ie. S = 1. The comparator-1 output continue to be 0 ie. R=0, hence the flip flop is in set
condition ie. Q’ = 0, pin-3 = 1(High state). Since Q’ = 0, transistor Q1 is OFF and the capacitor C
starts charging exponentially towards Vcc through the resistor R. When Vc becomes greater
than ((2/3) Vcc), comparator-1 output changes form low to high ie. R = 1. Since the trigger
input has returned back to Vcc from 0, comparator-2 output is equal to zero ie. S =0. So, S =
0 and R= 1, RS flip flop get RESET and Q’ = 1. AS Q’ = 1, transistor Q1 = ON and capacitor C
starts discharging towards zero through the transistor Q1 and capacitor voltage Vc becomes
zero. While discharging, when Vc < ((2/3) Vcc), the comparator-1 output goes to zero ie. R=0.
Since the trigger input = Vcc, the comparator-2 output will be = 0 ie. S=0. Hence, S=0 and
R=0, so no change in the Q’ output condition and hence continuous to be High. Thus, pin-3
output = LOW (0-state).
The monostable multivibrator, thus goes from stable state into quasistable state and then
returns back to the stable state after a time, tP = (1.1)R.C
The output remains to be in LOW state until the next trigger pulse is applied to change the
state.
Figure 4.20 (a) shows the circuit diagram of IC-555 as astable multivibrator and (b) shows the
waveform of capacitor voltage and output pulse. Since no stable state, hence name astable.
VCC
RA VCC Output
8 4
Voltage
7 TON TOFF
RB 0
555 3 T t
6 VO
VCC
2/3VC Capacitor
C 2 1 5
C Voltage
1/3VCC
C t
Figure 4.20(a): Waveforms
Figure 4.20(a): Astable Multivibrator
Astable multivibrator does not requires an external trigger pluse to change the output state,
hence called as free-running multivibrator. The time duration for which the output will
remain high or low is decided by the externally connected two resistors (RA and RB) and a
capacitor (C).
Operation: Initially, when output is high (pin-3 = High), Flip flop output Q’ = 0, hence
transistor Q1 is OFF. Now the capacitor C starts charging towards Vcc through RA and RB. As
soon as the voltage across the capacitor Vc, becomes equal to[ (2/3)Vcc], the comparator-1
output is high and will RESET the flip flop ie. Q’ = 1. Hence the output = 0. As, Q’ =1 , transistor
Q1 = ON and the capacitor C starts discharging through resistor RB and transistor Q1. During
discharging mode of capacitor C, as soon as the voltage across the capacitor C becomes equal
to [(1/3)Vcc], comparator-2 output will SET the flip flop, Q’ = 0, and output = high. Then the
cycle repeats.
Charging time duration of the capacitor C, is equal to the time the output is high is given by
the expression: tC = TON = 0.69(RA + RB )C
Discharging time duration of the capacitor C, is equal to the time the output is low is given by
the expression: td = TOFF = 0.69(RB )C
Hence the total time period of output waveform: T = tC + td = TON + TOFF = 0.69(RA + 2RB )C
The circuit diagram of a 2-input open collector TTL NAND gate is shown in figure 4.23 and
TTL-logic symbol (open collector) is shown in figure 4.22. Note that the collector of the
transistor T3 is floating. For the proper functioning of the device, this open collector terminal
of T3 must be tied to Vcc through resistor R, known as pull-up resistor (passive pull-up). Once
a suitable pull-up resistor is connected, the characteristic of open collector and totem pole
will be almost same.
Vcc
Indicates open collector
R1 R2
Inputs Output
Vcc
VDD VDD
PMOS S
G D
Input A Output A’
Input A Input B Output (A+B)’ D
G
NMOS S
NOR using NMOS
Inverter using CMOS
VDD VDD
PMOS PMOS S Input PMOS S
S
A
G D G D Output (A.B)’ G D
D Input S
Input A G S B G D
D
Input B G S D D Output (A+B)’
NMOS G S G S
NAND using CMOS
NOR using CMOS
Advantages of MOS logic: 1)Low power dissipation. 2)Excellent noise immunity.
3)High packing density. 4)Wide range of supply voltages (+3V to +18V)