SlideShare a Scribd company logo
1 of 69
III B.TECH I SEMESTER
DIGITAL IC APPLICATIONS
UNIT-5
RAGHU INSTITUTE OF TECHNOLOGY
AUTONOMOUS
DEPARTMENT OF ELECTRONICS AND COMMUNICATIONS ENGINEERING
Prepared by
Mr. M.PAVAN KUMAR
Assistant Professor
REFERENCES
 Digital Design Principles & Practices – John F. Wakerly, PHI/
Pearson Education Asia, 3rd Ed., 2005.
 Fundamentals of Digital Logic with VHDL Design- Stephen
Brown, ZvonkoVranesic, McGrawHill, 3rd Edition.
 Digital IC Applications- A.P Godse, D.A Godse, Technical
Publications.
Mr. M.PAVAN KUMAR DICA ECE Department RIT 2
➢ CONTENTS
 SSI Latches and Flipflops
 Ring Counter
 Johnson Counter
 n-synchronous Counter design
 Shift Registers
 Modeling of Sequential IC design
3Mr. M.PAVAN KUMAR DICA ECE Department RIT
4
Sequential Circuits
 A sequential circuit is one whose outputs depend not only
on its current inputs, but also on the past sequence of inputs.
 In other words, sequential circuits must be able to
”remember” (i.e., store) the past history of the inputs in order
to produce the present output.
 The information about the previous inputs history is called the
state of the system.
 A circuit that uses n binary state variables to store its past
history can take up to 2n
different states.
 Since n is always finite, sequential circuits are also called
finite state machines (FSM).
Mr. M.PAVAN KUMAR DICA ECE Department RIT
5
How can we remember …?
 The key to build storage circuits is feedback !!
Cg
A storage element
from Physics
ε
ε)v(tv(t)
limC
Δt
Δv
limC
dt
dv
Ci(t)
0εg
0Δtgg
−−
===
→
→
A storage element model
from Calculus
1 0 1
0 1 0
time
t t+δ t+2δ
Unfortunately caps are not ideal
they lose charge !!!
Mr. M.PAVAN KUMAR DICA ECE Department RIT
6
In short, sequential circuits are …
 circuits consisting of ordinary gates and feedback
loops
X1
X2
•
•
•
Xn
switching
network
Z1
Z2
•
•
•
Zn
Mr. M.PAVAN KUMAR DICA ECE Department RIT
7
"remember"
"load"
"data"
"stored value"
"0"
"1"
"stored value"
The simplest sequential circuit
 Two inverters and a feedback loop form a “static” storage cell
 The cell will hold value as long as it has power applied
 How to get a new value into the storage cell?
 selectively break feedback path
 load new value into cell D latch
(= state)
bistable cell
Mr. M.PAVAN KUMAR DICA ECE Department RIT
8
Analog analysis of the bistable cell
Vout2Vout1 = Vin2Vin1
Vin1 = Vout2
Mr. M.PAVAN KUMAR DICA ECE Department RIT
9
Latches and Flip-Flops
 The two most popular varieties of storage cells used to build
sequential circuits are: latches and flip-flops.
Latch: level sensitive storage element
Flip-Flop: edge triggered storage element
 Common examples of latches:
S-R latch, S-R latch, D latch (= gated D latch)
 Common examples of flip-flops:
D-FF, D-FF with enable, Scan-FF, JK-FF, T-FF
Mr. M.PAVAN KUMAR DICA ECE Department RIT
SSI LATCH
10
(hold)
(reset)
(set)
(forbidden)
SR latch using nor :
R S Qn Qn+1
0 0 0 Qn (0)
0 0 1 Qn (1)
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0/1 *
Excitation Table:
Qn Qn+1 R S
0 0 × 0
0 1 0 1
1 0 1 0
1 1 × ×
Mr. M.PAVAN KUMAR DICA ECE Department RIT
SR Latch using NAND Gate:
11
SN(t) RN(t) Q(t) Q(t+∆)
1 1 0 0
1 1 1 1
1 0 0 0
1 0 1 0
0 1 0 1
0 1 1 1
0 0 0 X
0 0 1 X
hold
reset
set
not allowed
Mr. M.PAVAN KUMAR DICA ECE Department RIT
12
D Latch (= Transparent Latch)
=
G D Q Qbar
0 × Last Q Last Q
bar
1 0 0 1
1 1 1 0
Mr. M.PAVAN KUMAR DICA ECE Department RIT
13
SSI FLIPFLOP’S
 Clocks are regular periodic signals used to specify state changes
Mr. M.PAVAN KUMAR DICA ECE Department RIT
14
D Flip-Flop (positive edge triggered)
Notice: the little triangle !
Functional
Table
Truth Table More compact
Truth Table
D Q+
0 0
1 1
Next state equation:
CLK
D
Q
inputs sampled on rising edge; outputs change after rising edge
D Qn Qn+1
0 0 0
0 1 0
1 0 1
1 1 1
Qn+1 = D
Mr. M.PAVAN KUMAR DICA ECE Department RIT
15
Timing Behavior of a DFF
(positive edge triggered)
Mr. M.PAVAN KUMAR DICA ECE Department RIT
16
Setup and hold times for an
edge-triggered DFF
Mr. M.PAVAN KUMAR DICA ECE Department RIT
17
Minimum clock period T ?
Example with T = 9 ns
tpINV = 2 ns
tpFF = 5 ns
tsuFF = 3 ns
Example with T = 15 ns
T = 9 ns T = 15 ns
Mr. M.PAVAN KUMAR DICA ECE Department RIT
18
Minimum clock period T ? (cont’d)
tpINV = 2 ns
tpFF = 5 ns
tsuFF = 3 ns
Tmin = 10 ns
Observation:
thFF doesn’t affect this calculation
Mr. M.PAVAN KUMAR DICA ECE Department RIT
19
D Flip-Flop (negative edge triggered)
inputs sampled on falling edge; outputs change after falling edge
Mr. M.PAVAN KUMAR DICA ECE Department RIT
20
DFF with asynchronous preset and clear
Mr. M.PAVAN KUMAR DICA ECE Department RIT
21
DFF with asynchronous preset and clear
Mr. M.PAVAN KUMAR DICA ECE Department RIT
22
DFF with enable
D
Do not even think about it !!!
D
CK
0
1
Q
Q’
D
EN
CLK
Reliable alternative
Mr. M.PAVAN KUMAR DICA ECE Department RIT
23
DFF with enable (cont’d)
Mr. M.PAVAN KUMAR DICA ECE Department RIT
24
Scan DFF
Mr. M.PAVAN KUMAR DICA ECE Department RIT
25
Design for testability: scan chains
Mr. M.PAVAN KUMAR DICA ECE Department RIT
26
JK Flip Flop (rising edge triggered)
=
Functional Table
J K Qn Qn+1
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
Next state equation:
Mr. M.PAVAN KUMAR DICA ECE Department RIT
27
Toggle Flip Flop (rising edge triggered)
CLK
T
Q
T
CK
Q
Q’
T
CLK
Truth Table More compact
Truth Table
T Q+
0 Q
1 Q’
Mr. M.PAVAN KUMAR DICA ECE Department RIT
28
Activity
 Design a JK-FF and a T-FF using D-FFs
 Design a D-FF and a T-FF using JK-FFs
 Design a D-FF and a JK-FF using T-FFs
Mr. M.PAVAN KUMAR DICA ECE Department RIT
29
Summary of latches and flip flops
Mr. M.PAVAN KUMAR DICA ECE Department RIT
30
behavior is the same unless input changes
while the clock is high
D Q
CLK
positive
edge-triggered
flip-flop
D Q
G
CLK
transparent
(level-sensitive)
latch
D
CLK
QFF
Qlatch
Comparison of latches and flip-flops
QFF
Qlatch
Mr. M.PAVAN KUMAR DICA ECE Department RIT
31
Type When inputs are sampled When output is valid
unclocked always propagation delay from input
latch change
level-sensitive clock high ( ∏ ) propagation delay from input
latch (Tsu/Th around falling change or clock edge
edge of clock) (whichever is later)
master-slave clock high ( ∏ ) propagation delay from falling
flip-flop (Tsu/Th around falling edge of clock
edge of clock)
positive clock L-to-H transition (↑) propagation delay from rising
edge-triggered (Tsu/Th around rising edge of clock
flip-flop edge of clock)
Comparison of latches and flip-flops
(cont’d)
Mr. M.PAVAN KUMAR DICA ECE Department RIT
VHDL program for D latch
32Mr. M.PAVAN KUMAR DICA ECE Department RIT
VHDL program for D flipflop using if-then
33Mr. M.PAVAN KUMAR DICA ECE Department RIT
D flip-flop using Asynchronous input
34
Mr. M.PAVAN KUMAR DICA ECE Department RIT
35
 SSI LATCHES and Flip-Flops
Mr. M.PAVAN KUMAR DICA ECE Department RIT
Introduction to Counters
36
 In General Flipflop it will store one bit of information at a time. But more than one bit
storing we are not supposed to prefer Flipflops. Then go for REGISTER.
 Register is used for storing more no. of bits and also shifting data which is in the form
of 1s / 0s.
 A counter is a Register, capable of counting the number of clock pulses arriving at its
clock input. And a specified sequence of states appears as the counter output.
COUNTER’S
Synchronous / Parallel Counter Asynchronous / Ripple Counter
Mr. M.PAVAN KUMAR DICA ECE Department RIT
4-Bit Asynchronous counter/
4-Bit ripple up counter by using negative edge trigger
37Mr. M.PAVAN KUMAR DICA ECE Department RIT
Synchronous Counter
38
 When counter is clocked such that each flipflop in the counter is triggered at
the same time, the counter is called as synchronous counter.
 Designing of Synchronous counter follows sequence of steps:
Step1: Identify the range of states we have and no. of flipflops we want to design
Step2: Identify, which type of flipflop is suitable to your specification
Step3: Write the excitation table for that flipflop
Step4: Derive the excitation circuit by using Boolean expression derived from the
K-map
Mr. M.PAVAN KUMAR DICA ECE Department RIT
3-Bit Synchronous Counter
39
Qn Qn+1 J K
0 0 0 ×
0 1 1 ×
1 0 × 1
1 1 × 0
Qc Qb Qa Qc
+
Qb
+
Qa
+
Ja Ka Jb Kb Jc Kc
0 0 0 0 0 1 1 × 0 × 0 ×
0 0 1 0 1 0 × 1 1 × 0 ×
0 1 0 0 1 1 1 × × 0 0 ×
0 1 1 1 0 0 × 1 × 1 1 ×
1 0 0 1 0 1 1 × 0 × 0 ×
1 0 1 1 1 0 × 1 1 × 0 ×
1 1 0 1 1 1 1 × × 0 0 ×
1 1 1 0 0 0 × 1 × 1 × 1
Mr. M.PAVAN KUMAR DICA ECE Department RIT
4-Bit Synchronous Counter
40Mr. M.PAVAN KUMAR DICA ECE Department RIT
Ring Counter
41
 A looping process or cyclic process of counting clock pulses in the manner of
Synchronous is known as Ring Counter.
 looping process apply by using Feedback system.
 n-Bit ring counter counts n-clock pluses with n-no.of flipflop’s.
Mr. M.PAVAN KUMAR DICA ECE Department RIT
Rotation moment of counting Clock pulses
42
Mr. M.PAVAN KUMAR DICA ECE Department RIT
4-Bit 4-State Ring counter using IC 74*194
43
Johnson Counter/ Twisted Ring Counter
44
 The Johnson Ring Counter or “Twisted Ring Counters”, is another shift
register with feedback exactly the same as the standard Ring Counter above,
except that this time the inverted output Q of the last flip-flop is now connected
back to the input D of the first flip-flop.
 this type of ring counter is that it only needs half the number of flip-flops
compared to the standard ring counter then its modulo number is halved. 
 “n-stage” Johnson counter will circulate a single data bit giving sequence
of 2n different states and can therefore be considered as a “mod-2n counter”.
Mr. M.PAVAN KUMAR DICA ECE Department RIT
45
2-bit Johnson Ring Counter :
Mr. M.PAVAN KUMAR DICA ECE Department RIT
4-Bit Johnson Counter using IC 74*194
46Mr. M.PAVAN KUMAR DICA ECE Department RIT
Decade Binary counter IC 7490
47
Count Outputs
QD QC QB QA
0 L L L L
1 L L L H
2 L L H L
3 L L H H
4 L H L L
5 L H L H
6 L H H L
7 L H H H
8 H L L L
9 H L L H
Mr. M.PAVAN KUMAR DICA ECE Department RIT
Internal Architecture of 7490 (Decade Binary Counter)
48
FFB FFC FFD
Mod-5 Counter
FFA
S(2)S(1)R(2)R(1)Input
Clk B
Input
Clk A
QA QB QC QD
Set inputsReset inputs
IC 7490
S(2)S(1)R(2)R(1)
A
B
QA QB QC QD
Clock
Mr. M.PAVAN KUMAR DICA ECE Department RIT
Divide by 20 counter using 7490
49
IC 7490 (1)
S(2)S(1) R(2)R(1)
A
B
QA QB QC QD
Clock
IC 7490 (2)
S(2)S(1) R(2)R(1)
A
B
QA QB QC QD
Clock
Tens DigitUnits Digit
QD QC QB QA
0 0 1 0
QD QC QB QA
0 0 0 0
 We know that IC 7490 is a Decade or mod-10 counter. Then we need two ic’s. The counter will go through
states 0-19 and should be reset on state 20. i.e. at place of 6th
binary digit 32 we connect to reset. Then it
will counts upto 20. after it will shows 0.
Mr. M.PAVAN KUMAR DICA ECE Department RIT
Divide by 96 counter using 7490
50
IC 7490 (1)
S(2)S(1) R(2)R(1)
A
B
QA QB QC QD
Clock
IC 7490 (2)
S(2)S(1) R(2)R(1)
A
B
QA QB QC QD
Clock
Tens DigitUnits Digit
QH QG QF QE
1 0 0 1 (9)
QD QC QB QA
0 1 1 0 (6)
 We know that IC 7490 is a Decade or mod-10 counter. Then we need two cascading of ic’s leads to divide
by 100 counter. The counter will go through states 0-99 and should be reset on after 96. i.e. after the bit
1001 0110 after it will shows 0.
Mr. M.PAVAN KUMAR DICA ECE Department RIT
4 Bit Ripple counter 7492/93
51
FFB FFC FFD
Mod-6 Counter
FFA
R(2)R(1)Input
Clk B
Input
Clk A
QA QB QC QD
Reset inputs
Mr. M.PAVAN KUMAR DICA ECE Department RIT
Divide by 9 counter using 7492
52
IC 7490
R(2)R(1)
A
B
QA QB QC QD
Clock
Mr. M.PAVAN KUMAR DICA ECE Department RIT
4-Bit Synchronous Binary Counter 74*163
53
CLK
CLR
LD
ENP
ENT
A
B
C
D
Q0
Q1
Q2
Q3
RCO
Mr. M.PAVAN KUMAR DICA ECE Department RIT
Excess-3 Decimal counter using 74*163
54
CLK
CLR
LD
ENP
ENT
A
B
C
D
Q0
Q1
Q2
Q3
RCO
5v 1
1
0
0
Mr. M.PAVAN KUMAR DICA ECE Department RIT
Shift Registers
55
 Binary Information in a register can be moved from stage to stage within the register or
Out of the register upon application of clock pulses.
 This type of Bit movement or shifting is essential for certain arithmetic and logical
operations used in Microprocessors.
Serial shift right, then out : Serial shift left, then out :
Parallel shift in : Parallel shift out :
Rotate Right : Rotate Left :
Mr. M.PAVAN KUMAR DICA ECE Department RIT
Modes of operation of Shift register
56
 we have 4 types of modes of operations in shift registers.
(i) Serial in serial out Shift Register
(ii) Serial in parallel Out Shift Register
(iii) Parallel in serial out Shift Register
(iv) Parallel in parallel out shift register
Mr. M.PAVAN KUMAR DICA ECE Department RIT
57
(i) Serial in serial out Shift Register (SISO):
 The input to this register is given in serial fashion i.e. one bit after the other
through a single data line and the output is also collected serially.
CLK Q2 Q1 Q0
initial 0 0 0
0 0 0
1 0 0
1 1 0
0 1 1
0 0 1
N
N-1
Mr. M.PAVAN KUMAR DICA ECE Department RIT
58
 When we transfer data in SISO manner then we taken output at last flipfliop. i.e.
Q0 and input as first flipflop i.e Q2.
 Time consumed for clock to store N bits is = [ N+N-1] * T
= [ 2N-1]*T , N= no.of Bits, T= clock duration
 Suppose we have 2msec duration for one cycle. Then for 4-bit it will have
= [2(4)-1]*2
= 14msec.
Note: for GATE
Mr. M.PAVAN KUMAR DICA ECE Department RIT
59
(ii) Serial in parallel Out Shift Register :
CLK Q2 Q1 Q0
initial 0 0 0
0 0 0
1 0 0
1 1 0
Mr. M.PAVAN KUMAR DICA ECE Department RIT
60
 When we transfer data in SIPO manner then we taken output at each and every
flipfliop. i.e. Q0,Q1,Q2
 Time consumed for clock to store N bits is = [ N ] * T
N= no.of Bits, T= clock duration
 Suppose we have 2msec duration for one cycle. Then for 4-bit it will have
= (4)*2 = 8msec.
Note: for GATE
 Total time consumed by the clock to store the bits in SISO manner = [2N-1]*T
 Total time consumed by the clock to store the bits in SIPO manner= N*T
Mr. M.PAVAN KUMAR DICA ECE Department RIT
61
(iii) Parallel in serial out Shift Register :
Mr. M.PAVAN KUMAR DICA ECE Department RIT
62
 WHEN I/P IS 0 THEN IT IS IN LOAD MODE
 WHEN I/P IS 1 THEN IT IS IN SHIFT MODE
Mr. M.PAVAN KUMAR DICA ECE Department RIT
63
(iv) Parallel in parallel out shift register :
• In this register, the input is given in parallel and the output also collected in
parallel. The clear (CLR) signal and clock signals are connected to all the 4 flip
flops.
Mr. M.PAVAN KUMAR DICA ECE Department RIT
Universal Shift Register
64
 A register is capable of shifting in one direction only. i.e either right shift or left
shift. Hence it is named as unidirectional shift register.
 A register is capable of shifting in both the direction. i.e. right shift and left shift.
Hence it is named as bi-directional shift register or Universal Shift Register.
This register can perform three types of operations, stated below.
•Parallel loading
•Shifting left
•Shifting right.
Mr. M.PAVAN KUMAR DICA ECE Department RIT
65
S1 S0 Operation
0 0 No change
0 1 Shift-Right
1 0 Shift-Left
1 1 Parallel Load
4-Bit Bi-Directional Universal Shift Register IC
74LS194
66
74LS194
VCC
Q0
Q1
Q2
Q3
CLK
S1
S0
CLR
DSR
D0
D1
D2
D3
DSL
GND
Mode INPUTS OUTPUTS
Clk CLR S1 S0 Dsr Dsl Dn Q0 Q1 Q2 Q3
Rst × 0 × × × × × 0 0 0 0
Shift Left 1 1 1 0 × 0 × Q1 Q2 Q3 0
1 1 1 0 × 1 × Q1 Q2 Q3 1
Shift
Right
1 1 0 1 0 × × 0 Q0 Q1 Q2
1 1 0 1 1 × × 1 Q0 Q1 Q2
Parllel
Load
1 1 1 1 × × Dn D0 D1 D2 D3
Hold ×` 1 0 0 × × × Q0 Q1 Q2 Q3
Parallel data
Mr. M.PAVAN KUMAR DICA ECE Department RIT
VHDL Codes for Registers
67
 VHDL Code for 4-Bit Register : Here this register is an asynchronous reset/clear states.
This code is same as D-Flipflop with asynchronous reset except the input D and output Q are
Declared as multibit signals.
Library IEEE;
USE IEEE.STD_LOGIC_1164.all;
Entity reg4 is
Port ( D : in std_logic_vector (3 down to 0);
rst, clk : in std_logic ;
Q : out std_logic_vector (3 down to 0));
End reg4;
Architecture behav of reg4 is
Begin
Process (rst,clk)
Begin
If rst = ‘0’ then
Q <= “0000” ;
Elsif clock’event and clk=‘1’ then
Q <= D ;
End If ;
End Process;
End behav ;
Mr. M.PAVAN KUMAR DICA ECE Department RIT
68
 VHDL code for 4-Bit Shift Register : (Shift Right)
Library IEEE ;
USE IEEE.std_logic_1164.all ;
Entity shiftright is
Port ( clock: in std_logic ;
I : in std_logic ;
Q : Buffer std_logic_vector (3 down to 0)) ;
End shiftright ;
Architecture behav of shiftright is
Begin
Process
Begin
Wait Until clock’event and clock=‘1’ ;
Q(0) <= Q(1) ;
Q(1) <= Q(2) ;
Q(2) <= Q(3) ;
Q(3) <= I ;
End Process ;
End behav
Mr. M.PAVAN KUMAR DICA ECE Department RIT
69
 VHDL code for 4-Bit Parallel Access Shift Register : (PIPO)
Library IEEE ;
USE IEEE.std_logic_1164.all ;
Entity PIPO is
Port ( P : in std_logic_vector (3 down to 0) ;
clock: in std_logic ;
Load, I : in std_logic ;
Q : Buffer std_logic_vector (3 down to 0)) ;
End PIPO ;
Architecture behav of PIPO is
Begin
Process
Begin
Wait Until clock’event and clock=‘1’ ;
If Load = ‘1’ Then
Q <= P ;
else
Q(0) <= Q(1) ;
Q(1) <= Q(2) ;
Q(2) <= Q(3) ;
Q(3) <= I ;
End Process ;
End behav
Mr. M.PAVAN KUMAR DICA ECE Department RIT

More Related Content

What's hot

What's hot (20)

Counters
CountersCounters
Counters
 
Negative feedback Amplifiers
Negative feedback AmplifiersNegative feedback Amplifiers
Negative feedback Amplifiers
 
Cascaded differential amplifier
Cascaded differential amplifierCascaded differential amplifier
Cascaded differential amplifier
 
latches
 latches latches
latches
 
8251 USART
8251 USART8251 USART
8251 USART
 
Ring counter
Ring counterRing counter
Ring counter
 
Flipflop
FlipflopFlipflop
Flipflop
 
integrator and differentiator op-amp
integrator and differentiator op-ampintegrator and differentiator op-amp
integrator and differentiator op-amp
 
Op amp basics
Op amp basicsOp amp basics
Op amp basics
 
Counters
CountersCounters
Counters
 
Flip-Flop || Digital Electronics
Flip-Flop || Digital ElectronicsFlip-Flop || Digital Electronics
Flip-Flop || Digital Electronics
 
Silicon controlled rectifier
Silicon controlled rectifierSilicon controlled rectifier
Silicon controlled rectifier
 
Counter
CounterCounter
Counter
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
Counters, Synchronous & Asynchronous Counters
Counters, Synchronous & Asynchronous CountersCounters, Synchronous & Asynchronous Counters
Counters, Synchronous & Asynchronous Counters
 
Combinational Circuits & Sequential Circuits
Combinational Circuits & Sequential CircuitsCombinational Circuits & Sequential Circuits
Combinational Circuits & Sequential Circuits
 
Divide by N clock
Divide by N clockDivide by N clock
Divide by N clock
 
Emitter Coupled Logic (ECL)
Emitter Coupled Logic (ECL)Emitter Coupled Logic (ECL)
Emitter Coupled Logic (ECL)
 
CMOS Logic
CMOS LogicCMOS Logic
CMOS Logic
 
Rc delay modelling in vlsi
Rc delay modelling in vlsiRc delay modelling in vlsi
Rc delay modelling in vlsi
 

Similar to Sequntial logic design

SEQUENTIAL CIRCUITS -Module 5 (1).pptx
SEQUENTIAL CIRCUITS -Module 5 (1).pptxSEQUENTIAL CIRCUITS -Module 5 (1).pptx
SEQUENTIAL CIRCUITS -Module 5 (1).pptx
ThanmayiKumar
 
Computer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docxComputer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docx
ladonnacamplin
 
Promo book2 ch1_feb23_11
Promo book2 ch1_feb23_11Promo book2 ch1_feb23_11
Promo book2 ch1_feb23_11
Sarah Krystelle
 

Similar to Sequntial logic design (20)

ANALOG AND DIGITAL ELECTRONICS unit 5
ANALOG AND DIGITAL ELECTRONICS unit 5ANALOG AND DIGITAL ELECTRONICS unit 5
ANALOG AND DIGITAL ELECTRONICS unit 5
 
VLSI Design Sequential circuit design
VLSI Design Sequential circuit designVLSI Design Sequential circuit design
VLSI Design Sequential circuit design
 
SEQUENTIAL CIRCUITS -Module 5 (1).pptx
SEQUENTIAL CIRCUITS -Module 5 (1).pptxSEQUENTIAL CIRCUITS -Module 5 (1).pptx
SEQUENTIAL CIRCUITS -Module 5 (1).pptx
 
Registers and counters
Registers and countersRegisters and counters
Registers and counters
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Lec17-Registers.ppt
Lec17-Registers.pptLec17-Registers.ppt
Lec17-Registers.ppt
 
Computer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docxComputer Organization1CS1400Feng JiangBoolean al.docx
Computer Organization1CS1400Feng JiangBoolean al.docx
 
JK flip flops
JK flip flopsJK flip flops
JK flip flops
 
Digital Electronics Registers and Counters.pptx
Digital Electronics Registers and Counters.pptxDigital Electronics Registers and Counters.pptx
Digital Electronics Registers and Counters.pptx
 
Counter - by Zakariya Hossain
Counter - by Zakariya HossainCounter - by Zakariya Hossain
Counter - by Zakariya Hossain
 
Promo book2 ch1_feb23_11
Promo book2 ch1_feb23_11Promo book2 ch1_feb23_11
Promo book2 ch1_feb23_11
 
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterLab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
 
Digital counter
Digital counter Digital counter
Digital counter
 
counters and registers
counters and registerscounters and registers
counters and registers
 
counters_and_registers_5 lecture fifth.ppt
counters_and_registers_5 lecture fifth.pptcounters_and_registers_5 lecture fifth.ppt
counters_and_registers_5 lecture fifth.ppt
 
Design and implementation of synchronous 4 bit up counter using 180 nm cmos p...
Design and implementation of synchronous 4 bit up counter using 180 nm cmos p...Design and implementation of synchronous 4 bit up counter using 180 nm cmos p...
Design and implementation of synchronous 4 bit up counter using 180 nm cmos p...
 
15CS32 ADE Module 4
15CS32 ADE Module 415CS32 ADE Module 4
15CS32 ADE Module 4
 
Coa presentation2
Coa presentation2Coa presentation2
Coa presentation2
 
ScaleJoin: a Deterministic, Disjoint-Parallel and Skew-Resilient Stream Join
ScaleJoin: a Deterministic, Disjoint-Parallel and Skew-Resilient Stream JoinScaleJoin: a Deterministic, Disjoint-Parallel and Skew-Resilient Stream Join
ScaleJoin: a Deterministic, Disjoint-Parallel and Skew-Resilient Stream Join
 
Digital Electronics – Unit III.pdf
Digital Electronics – Unit III.pdfDigital Electronics – Unit III.pdf
Digital Electronics – Unit III.pdf
 

Recently uploaded

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Dr.Costas Sachpazis
 

Recently uploaded (20)

Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 

Sequntial logic design

  • 1. III B.TECH I SEMESTER DIGITAL IC APPLICATIONS UNIT-5 RAGHU INSTITUTE OF TECHNOLOGY AUTONOMOUS DEPARTMENT OF ELECTRONICS AND COMMUNICATIONS ENGINEERING Prepared by Mr. M.PAVAN KUMAR Assistant Professor
  • 2. REFERENCES  Digital Design Principles & Practices – John F. Wakerly, PHI/ Pearson Education Asia, 3rd Ed., 2005.  Fundamentals of Digital Logic with VHDL Design- Stephen Brown, ZvonkoVranesic, McGrawHill, 3rd Edition.  Digital IC Applications- A.P Godse, D.A Godse, Technical Publications. Mr. M.PAVAN KUMAR DICA ECE Department RIT 2
  • 3. ➢ CONTENTS  SSI Latches and Flipflops  Ring Counter  Johnson Counter  n-synchronous Counter design  Shift Registers  Modeling of Sequential IC design 3Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 4. 4 Sequential Circuits  A sequential circuit is one whose outputs depend not only on its current inputs, but also on the past sequence of inputs.  In other words, sequential circuits must be able to ”remember” (i.e., store) the past history of the inputs in order to produce the present output.  The information about the previous inputs history is called the state of the system.  A circuit that uses n binary state variables to store its past history can take up to 2n different states.  Since n is always finite, sequential circuits are also called finite state machines (FSM). Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 5. 5 How can we remember …?  The key to build storage circuits is feedback !! Cg A storage element from Physics ε ε)v(tv(t) limC Δt Δv limC dt dv Ci(t) 0εg 0Δtgg −− === → → A storage element model from Calculus 1 0 1 0 1 0 time t t+δ t+2δ Unfortunately caps are not ideal they lose charge !!! Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 6. 6 In short, sequential circuits are …  circuits consisting of ordinary gates and feedback loops X1 X2 • • • Xn switching network Z1 Z2 • • • Zn Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 7. 7 "remember" "load" "data" "stored value" "0" "1" "stored value" The simplest sequential circuit  Two inverters and a feedback loop form a “static” storage cell  The cell will hold value as long as it has power applied  How to get a new value into the storage cell?  selectively break feedback path  load new value into cell D latch (= state) bistable cell Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 8. 8 Analog analysis of the bistable cell Vout2Vout1 = Vin2Vin1 Vin1 = Vout2 Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 9. 9 Latches and Flip-Flops  The two most popular varieties of storage cells used to build sequential circuits are: latches and flip-flops. Latch: level sensitive storage element Flip-Flop: edge triggered storage element  Common examples of latches: S-R latch, S-R latch, D latch (= gated D latch)  Common examples of flip-flops: D-FF, D-FF with enable, Scan-FF, JK-FF, T-FF Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 10. SSI LATCH 10 (hold) (reset) (set) (forbidden) SR latch using nor : R S Qn Qn+1 0 0 0 Qn (0) 0 0 1 Qn (1) 0 1 0 1 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0/1 * Excitation Table: Qn Qn+1 R S 0 0 × 0 0 1 0 1 1 0 1 0 1 1 × × Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 11. SR Latch using NAND Gate: 11 SN(t) RN(t) Q(t) Q(t+∆) 1 1 0 0 1 1 1 1 1 0 0 0 1 0 1 0 0 1 0 1 0 1 1 1 0 0 0 X 0 0 1 X hold reset set not allowed Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 12. 12 D Latch (= Transparent Latch) = G D Q Qbar 0 × Last Q Last Q bar 1 0 0 1 1 1 1 0 Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 13. 13 SSI FLIPFLOP’S  Clocks are regular periodic signals used to specify state changes Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 14. 14 D Flip-Flop (positive edge triggered) Notice: the little triangle ! Functional Table Truth Table More compact Truth Table D Q+ 0 0 1 1 Next state equation: CLK D Q inputs sampled on rising edge; outputs change after rising edge D Qn Qn+1 0 0 0 0 1 0 1 0 1 1 1 1 Qn+1 = D Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 15. 15 Timing Behavior of a DFF (positive edge triggered) Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 16. 16 Setup and hold times for an edge-triggered DFF Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 17. 17 Minimum clock period T ? Example with T = 9 ns tpINV = 2 ns tpFF = 5 ns tsuFF = 3 ns Example with T = 15 ns T = 9 ns T = 15 ns Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 18. 18 Minimum clock period T ? (cont’d) tpINV = 2 ns tpFF = 5 ns tsuFF = 3 ns Tmin = 10 ns Observation: thFF doesn’t affect this calculation Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 19. 19 D Flip-Flop (negative edge triggered) inputs sampled on falling edge; outputs change after falling edge Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 20. 20 DFF with asynchronous preset and clear Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 21. 21 DFF with asynchronous preset and clear Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 22. 22 DFF with enable D Do not even think about it !!! D CK 0 1 Q Q’ D EN CLK Reliable alternative Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 23. 23 DFF with enable (cont’d) Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 24. 24 Scan DFF Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 25. 25 Design for testability: scan chains Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 26. 26 JK Flip Flop (rising edge triggered) = Functional Table J K Qn Qn+1 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0 Next state equation: Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 27. 27 Toggle Flip Flop (rising edge triggered) CLK T Q T CK Q Q’ T CLK Truth Table More compact Truth Table T Q+ 0 Q 1 Q’ Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 28. 28 Activity  Design a JK-FF and a T-FF using D-FFs  Design a D-FF and a T-FF using JK-FFs  Design a D-FF and a JK-FF using T-FFs Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 29. 29 Summary of latches and flip flops Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 30. 30 behavior is the same unless input changes while the clock is high D Q CLK positive edge-triggered flip-flop D Q G CLK transparent (level-sensitive) latch D CLK QFF Qlatch Comparison of latches and flip-flops QFF Qlatch Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 31. 31 Type When inputs are sampled When output is valid unclocked always propagation delay from input latch change level-sensitive clock high ( ∏ ) propagation delay from input latch (Tsu/Th around falling change or clock edge edge of clock) (whichever is later) master-slave clock high ( ∏ ) propagation delay from falling flip-flop (Tsu/Th around falling edge of clock edge of clock) positive clock L-to-H transition (↑) propagation delay from rising edge-triggered (Tsu/Th around rising edge of clock flip-flop edge of clock) Comparison of latches and flip-flops (cont’d) Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 32. VHDL program for D latch 32Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 33. VHDL program for D flipflop using if-then 33Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 34. D flip-flop using Asynchronous input 34 Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 35. 35  SSI LATCHES and Flip-Flops Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 36. Introduction to Counters 36  In General Flipflop it will store one bit of information at a time. But more than one bit storing we are not supposed to prefer Flipflops. Then go for REGISTER.  Register is used for storing more no. of bits and also shifting data which is in the form of 1s / 0s.  A counter is a Register, capable of counting the number of clock pulses arriving at its clock input. And a specified sequence of states appears as the counter output. COUNTER’S Synchronous / Parallel Counter Asynchronous / Ripple Counter Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 37. 4-Bit Asynchronous counter/ 4-Bit ripple up counter by using negative edge trigger 37Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 38. Synchronous Counter 38  When counter is clocked such that each flipflop in the counter is triggered at the same time, the counter is called as synchronous counter.  Designing of Synchronous counter follows sequence of steps: Step1: Identify the range of states we have and no. of flipflops we want to design Step2: Identify, which type of flipflop is suitable to your specification Step3: Write the excitation table for that flipflop Step4: Derive the excitation circuit by using Boolean expression derived from the K-map Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 39. 3-Bit Synchronous Counter 39 Qn Qn+1 J K 0 0 0 × 0 1 1 × 1 0 × 1 1 1 × 0 Qc Qb Qa Qc + Qb + Qa + Ja Ka Jb Kb Jc Kc 0 0 0 0 0 1 1 × 0 × 0 × 0 0 1 0 1 0 × 1 1 × 0 × 0 1 0 0 1 1 1 × × 0 0 × 0 1 1 1 0 0 × 1 × 1 1 × 1 0 0 1 0 1 1 × 0 × 0 × 1 0 1 1 1 0 × 1 1 × 0 × 1 1 0 1 1 1 1 × × 0 0 × 1 1 1 0 0 0 × 1 × 1 × 1 Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 40. 4-Bit Synchronous Counter 40Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 41. Ring Counter 41  A looping process or cyclic process of counting clock pulses in the manner of Synchronous is known as Ring Counter.  looping process apply by using Feedback system.  n-Bit ring counter counts n-clock pluses with n-no.of flipflop’s. Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 42. Rotation moment of counting Clock pulses 42 Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 43. 4-Bit 4-State Ring counter using IC 74*194 43
  • 44. Johnson Counter/ Twisted Ring Counter 44  The Johnson Ring Counter or “Twisted Ring Counters”, is another shift register with feedback exactly the same as the standard Ring Counter above, except that this time the inverted output Q of the last flip-flop is now connected back to the input D of the first flip-flop.  this type of ring counter is that it only needs half the number of flip-flops compared to the standard ring counter then its modulo number is halved.   “n-stage” Johnson counter will circulate a single data bit giving sequence of 2n different states and can therefore be considered as a “mod-2n counter”. Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 45. 45 2-bit Johnson Ring Counter : Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 46. 4-Bit Johnson Counter using IC 74*194 46Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 47. Decade Binary counter IC 7490 47 Count Outputs QD QC QB QA 0 L L L L 1 L L L H 2 L L H L 3 L L H H 4 L H L L 5 L H L H 6 L H H L 7 L H H H 8 H L L L 9 H L L H Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 48. Internal Architecture of 7490 (Decade Binary Counter) 48 FFB FFC FFD Mod-5 Counter FFA S(2)S(1)R(2)R(1)Input Clk B Input Clk A QA QB QC QD Set inputsReset inputs IC 7490 S(2)S(1)R(2)R(1) A B QA QB QC QD Clock Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 49. Divide by 20 counter using 7490 49 IC 7490 (1) S(2)S(1) R(2)R(1) A B QA QB QC QD Clock IC 7490 (2) S(2)S(1) R(2)R(1) A B QA QB QC QD Clock Tens DigitUnits Digit QD QC QB QA 0 0 1 0 QD QC QB QA 0 0 0 0  We know that IC 7490 is a Decade or mod-10 counter. Then we need two ic’s. The counter will go through states 0-19 and should be reset on state 20. i.e. at place of 6th binary digit 32 we connect to reset. Then it will counts upto 20. after it will shows 0. Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 50. Divide by 96 counter using 7490 50 IC 7490 (1) S(2)S(1) R(2)R(1) A B QA QB QC QD Clock IC 7490 (2) S(2)S(1) R(2)R(1) A B QA QB QC QD Clock Tens DigitUnits Digit QH QG QF QE 1 0 0 1 (9) QD QC QB QA 0 1 1 0 (6)  We know that IC 7490 is a Decade or mod-10 counter. Then we need two cascading of ic’s leads to divide by 100 counter. The counter will go through states 0-99 and should be reset on after 96. i.e. after the bit 1001 0110 after it will shows 0. Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 51. 4 Bit Ripple counter 7492/93 51 FFB FFC FFD Mod-6 Counter FFA R(2)R(1)Input Clk B Input Clk A QA QB QC QD Reset inputs Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 52. Divide by 9 counter using 7492 52 IC 7490 R(2)R(1) A B QA QB QC QD Clock Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 53. 4-Bit Synchronous Binary Counter 74*163 53 CLK CLR LD ENP ENT A B C D Q0 Q1 Q2 Q3 RCO Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 54. Excess-3 Decimal counter using 74*163 54 CLK CLR LD ENP ENT A B C D Q0 Q1 Q2 Q3 RCO 5v 1 1 0 0 Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 55. Shift Registers 55  Binary Information in a register can be moved from stage to stage within the register or Out of the register upon application of clock pulses.  This type of Bit movement or shifting is essential for certain arithmetic and logical operations used in Microprocessors. Serial shift right, then out : Serial shift left, then out : Parallel shift in : Parallel shift out : Rotate Right : Rotate Left : Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 56. Modes of operation of Shift register 56  we have 4 types of modes of operations in shift registers. (i) Serial in serial out Shift Register (ii) Serial in parallel Out Shift Register (iii) Parallel in serial out Shift Register (iv) Parallel in parallel out shift register Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 57. 57 (i) Serial in serial out Shift Register (SISO):  The input to this register is given in serial fashion i.e. one bit after the other through a single data line and the output is also collected serially. CLK Q2 Q1 Q0 initial 0 0 0 0 0 0 1 0 0 1 1 0 0 1 1 0 0 1 N N-1 Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 58. 58  When we transfer data in SISO manner then we taken output at last flipfliop. i.e. Q0 and input as first flipflop i.e Q2.  Time consumed for clock to store N bits is = [ N+N-1] * T = [ 2N-1]*T , N= no.of Bits, T= clock duration  Suppose we have 2msec duration for one cycle. Then for 4-bit it will have = [2(4)-1]*2 = 14msec. Note: for GATE Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 59. 59 (ii) Serial in parallel Out Shift Register : CLK Q2 Q1 Q0 initial 0 0 0 0 0 0 1 0 0 1 1 0 Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 60. 60  When we transfer data in SIPO manner then we taken output at each and every flipfliop. i.e. Q0,Q1,Q2  Time consumed for clock to store N bits is = [ N ] * T N= no.of Bits, T= clock duration  Suppose we have 2msec duration for one cycle. Then for 4-bit it will have = (4)*2 = 8msec. Note: for GATE  Total time consumed by the clock to store the bits in SISO manner = [2N-1]*T  Total time consumed by the clock to store the bits in SIPO manner= N*T Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 61. 61 (iii) Parallel in serial out Shift Register : Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 62. 62  WHEN I/P IS 0 THEN IT IS IN LOAD MODE  WHEN I/P IS 1 THEN IT IS IN SHIFT MODE Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 63. 63 (iv) Parallel in parallel out shift register : • In this register, the input is given in parallel and the output also collected in parallel. The clear (CLR) signal and clock signals are connected to all the 4 flip flops. Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 64. Universal Shift Register 64  A register is capable of shifting in one direction only. i.e either right shift or left shift. Hence it is named as unidirectional shift register.  A register is capable of shifting in both the direction. i.e. right shift and left shift. Hence it is named as bi-directional shift register or Universal Shift Register. This register can perform three types of operations, stated below. •Parallel loading •Shifting left •Shifting right. Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 65. 65 S1 S0 Operation 0 0 No change 0 1 Shift-Right 1 0 Shift-Left 1 1 Parallel Load
  • 66. 4-Bit Bi-Directional Universal Shift Register IC 74LS194 66 74LS194 VCC Q0 Q1 Q2 Q3 CLK S1 S0 CLR DSR D0 D1 D2 D3 DSL GND Mode INPUTS OUTPUTS Clk CLR S1 S0 Dsr Dsl Dn Q0 Q1 Q2 Q3 Rst × 0 × × × × × 0 0 0 0 Shift Left 1 1 1 0 × 0 × Q1 Q2 Q3 0 1 1 1 0 × 1 × Q1 Q2 Q3 1 Shift Right 1 1 0 1 0 × × 0 Q0 Q1 Q2 1 1 0 1 1 × × 1 Q0 Q1 Q2 Parllel Load 1 1 1 1 × × Dn D0 D1 D2 D3 Hold ×` 1 0 0 × × × Q0 Q1 Q2 Q3 Parallel data Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 67. VHDL Codes for Registers 67  VHDL Code for 4-Bit Register : Here this register is an asynchronous reset/clear states. This code is same as D-Flipflop with asynchronous reset except the input D and output Q are Declared as multibit signals. Library IEEE; USE IEEE.STD_LOGIC_1164.all; Entity reg4 is Port ( D : in std_logic_vector (3 down to 0); rst, clk : in std_logic ; Q : out std_logic_vector (3 down to 0)); End reg4; Architecture behav of reg4 is Begin Process (rst,clk) Begin If rst = ‘0’ then Q <= “0000” ; Elsif clock’event and clk=‘1’ then Q <= D ; End If ; End Process; End behav ; Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 68. 68  VHDL code for 4-Bit Shift Register : (Shift Right) Library IEEE ; USE IEEE.std_logic_1164.all ; Entity shiftright is Port ( clock: in std_logic ; I : in std_logic ; Q : Buffer std_logic_vector (3 down to 0)) ; End shiftright ; Architecture behav of shiftright is Begin Process Begin Wait Until clock’event and clock=‘1’ ; Q(0) <= Q(1) ; Q(1) <= Q(2) ; Q(2) <= Q(3) ; Q(3) <= I ; End Process ; End behav Mr. M.PAVAN KUMAR DICA ECE Department RIT
  • 69. 69  VHDL code for 4-Bit Parallel Access Shift Register : (PIPO) Library IEEE ; USE IEEE.std_logic_1164.all ; Entity PIPO is Port ( P : in std_logic_vector (3 down to 0) ; clock: in std_logic ; Load, I : in std_logic ; Q : Buffer std_logic_vector (3 down to 0)) ; End PIPO ; Architecture behav of PIPO is Begin Process Begin Wait Until clock’event and clock=‘1’ ; If Load = ‘1’ Then Q <= P ; else Q(0) <= Q(1) ; Q(1) <= Q(2) ; Q(2) <= Q(3) ; Q(3) <= I ; End Process ; End behav Mr. M.PAVAN KUMAR DICA ECE Department RIT