Upload
meljun-cortes-mbampa
View
221
Download
0
Embed Size (px)
Citation preview
8/8/2019 MELJUN CORTES HANDOUTS_Shift Register and Counter
http://slidepdf.com/reader/full/meljun-cortes-handoutsshift-register-and-counter 1/7
Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page1of 25
Master clock generator synchronizes all
subsystems of a sequential circuit
Load ControlInput
1 _________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
___________________
___________________Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page3of 25
Load control input using the input X1
the figure shows how a logic 1 at the LOAD will
allow the input X 1 to be processed bysubsystem A during each clock transition
Load ControlInput
3 __________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
___________________
___________________
Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page2of 25
Load control input using the clock and the
associated timing diagram
LOAD
the control signal that will determine whether
the subsystem where the CLOCK is connected
to needs to function
Load ControlInput
2 _________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page4of 25
Register
a flip-flop structure that handles multiple bits of
data at any one time
called a 4-bit parallel register or buffer
register
used in most computers as high-speed
temporary data storage
Detailed implementation using flip-flops
Register andShift Registers
4 __________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
8/8/2019 MELJUN CORTES HANDOUTS_Shift Register and Counter
http://slidepdf.com/reader/full/meljun-cortes-handoutsshift-register-and-counter 2/7
Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page5of 25
schematic symbol
alternative manner of representing theimplementation
another way of drawing the register using the
same set of flip-flops but written horizontally
simplifies the correspondence between the flip-flop’s outputs and the way the output is written
from the least significant bit (LSB) to the mostsignificant bit (MSB)
Register andShift Registers
5 _________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
___________________
___________________Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page7of 25
the LOAD input dictates when the register may
allow data from its inputs to be transferred andstored
Parallel Register with Load Control
Parallel/buffer register with load control input
7 __________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
___________________
___________________
Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page6of 25
shows how optional inputs of flip-flops may be
used
inputs: CLEAR and PRESET
modifies the state of the associated flip-flopinstantaneously
Register andShift Registers
6 _________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page8of 25
capable of shifting or rotating the binary
information stored in the register
has the capability of shifting stored bits to the
left or to the right for every clock pulse
used in microcomputerserial communications
to transfer information
A simple shift-left and shift-right register using D
flip-flops
Shift Register
8 __________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
8/8/2019 MELJUN CORTES HANDOUTS_Shift Register and Counter
http://slidepdf.com/reader/full/meljun-cortes-handoutsshift-register-and-counter 3/7
Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page9of 25
Summary of the input and output of the shift
register:
Initial state Q = 0000
1st rising edge: Q = 0001 SERIAL IN = 1 SERIAL OUT = 0
2nd rising edge: Q = 0011 SERIAL IN = 1 SERIAL OUT = 0
3rd rising edge: Q = 0111 SERIAL IN = 1 SERIAL OUT = 0
4th rising edge: Q = 1111 SERIAL IN = 1 SERIAL OUT = 1Successive rising edges: Q = 1111 SERIAL IN = 1 SERIAL OUT = 1
when the SERIAL IN=0, the output of the register:
Initial state Q = 1111
1st rising edge: Q = 1110 SERIAL IN = 0 SERIAL OUT = 1
2nd rising edge: Q = 1100 SERIAL IN = 0 SERIAL OUT = 1
3rd rising edge: Q = 1000 SERIAL IN = 0 SERIAL OUT = 1
4th rising edge: Q = 0000 SERIAL IN = 0 SERIAL OUT = 0
Successive rising edges: Q = 0000 SERIAL IN = 0 SERIAL OUT = 0
Serial Loading
the method of storing a word of information
Shift Register
9 _________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
___________________
___________________Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page11of 25
Example 1:
Get the output of the following shift register
after with the following conditions:
(a) shift-left, Q=0000, SERIAL IN sequence is
0,0,0,1,0,1,1; after 7 cycles
(b) shift-left, Q=00001111, SERIAL IN alternating 0and 1; after 10 cycles
Solution:
(a) initial Q = 0000
cycle 1 Q = 0000 SERIAL IN = 0
cycle 2 Q = 0000 SERIAL IN = 0
cycle 3 Q = 0000 SERIAL IN = 0
cycle 4 Q = 0001 SERIAL IN = 1
cycle 5 Q = 0010 SERIAL IN = 0
cycle 6 Q = 0101 SERIAL IN = 1
cycle 7 Q = 1011 SERIAL IN = 1
Shift Register
11 _________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
___________________
___________________
Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page10of 25
When the stored data in the register is Q =1111
and SERIAL IN= at all times, the output
will be:
Initial state Q = 1111
1st rising edge: Q = 0111 SERIAL IN = 0
2nd rising edge: Q = 0011 SERIAL IN = 0
3rd rising edge: Q = 0001 SERIAL IN = 0
4th rising edge: Q = 0000 SERIAL IN = 0
Successive rising edges: Q = 0000 SERIAL IN = 0
Shift Register
10 ________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page12of 25
Solution (cont.):
(b) initial Q = 00001111
cycle 1 Q = 00011110 SERIAL IN = 0
cycle 2 Q = 00111101 SERIAL IN = 1
cycle 3 Q = 01111010 SERIAL IN = 0
cycle 4 Q = 11110101 SERIAL IN = 1
cycle 5 Q = 11101010 SERIAL IN = 0
cycle 6 Q = 11010101 SERIAL IN = 1
cycle 7 Q = 10101010 SERIAL IN = 0
cycle 8 Q = 01010101 SERIAL IN = 1
cycle 9 Q = 10101010 SERIAL IN = 0
cycle 10 Q =01010101 SERIAL IN = 1
Shift Register
12 _________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
8/8/2019 MELJUN CORTES HANDOUTS_Shift Register and Counter
http://slidepdf.com/reader/full/meljun-cortes-handoutsshift-register-and-counter 4/7
Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page13of 25
Example 2:
Design an alternative implementation of the
shift-left register using JK flip-flops.
Solution:
The basic operation of the 4-bit shift (left)
register that is made using D flip-flops is as
follows:
1. D0 takes in new value from SERIAL IN
2. D1 takes old value of D0; D2 takes D3; etc.
JK flip-flop’s function table:
Shift Register
13 ________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
___________________
___________________Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page15of 25
gates and feedback are also used to allow for
increased control over the operation of the shiftregister
Shift register with load control input
Shift Registerswith Load Control
15 _________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
___________________
___________________
Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page14of 25
A 4-bit shift-left register using JK flip-flops
Shift Register
14 ________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page16of 25
are essentially registers that go through a
sequence of states whenever input pulses are
applied
can be used to measure time or frequency (and
period)
handle binary numbers and are called binary
counters
Two types of counters:
Synchronous
the flip-flops are timed using a common clockpulse
Asynchronous
each of the outputs of the flip-flops is used to
trigger the other flip-flops
Counters
16 _________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
8/8/2019 MELJUN CORTES HANDOUTS_Shift Register and Counter
http://slidepdf.com/reader/full/meljun-cortes-handoutsshift-register-and-counter 5/7
Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page17of 25
a simple type of counter that is usually
implemented with T flip-flops or JK flip-flops
the inputs of the CLK are derived from theoutputs of the flip-flops used
A 3-bit ripple counter using JK flip-flops
A ripple counter using JK flip-flops:
1. The CLK is triggered during high-to-low logic
transitions.
2. The flip-flop that corresponds to the LSB is the
JK flip-flop that is directly connected to theinput. Each subsequent flip-flop corresponds to
a higher bit.
3. Since the inputs J and K of all the flip-flops are
tied together, each flip-flop will merely toggle
(negate its input) when triggered.
Ripple Counter
17 ________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
___________________
___________________Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page19of 25
Timing diagram of the ripple counter
Ripple counter counting sequence
Ripple Counter
19 _________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
___________________
___________________
Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page18of 25
A 3-bit ripple counter using T flip-flops
This figure shows how some authors want to
present it so that the outputs are read from the
MSB to the LSB.
Ripple Counter
18 ________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page20of 25
Ring counter with pre-load pulse
resembles the shift register using D flip-flops
with the difference that the output from the MSBis fed back0 to the LSB input
Ring Counter
the action of going back to the beginning
SynchronousCounters
20 _________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
8/8/2019 MELJUN CORTES HANDOUTS_Shift Register and Counter
http://slidepdf.com/reader/full/meljun-cortes-handoutsshift-register-and-counter 6/7
Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page21of 25
Sequence of states
SynchronousCounters
21 ________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
___________________
___________________Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page23of 25
Step 2: Simplify using K-map method (cont.)
SynchronousCounters
23 _________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
___________________
___________________
Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page22of 25
Using the D flip-flops to get the state
equation directly from the state table,
follow the steps below:
Step 1: Get the sum of minterms expression
DQ2 (Q2, Q1, Q0 ) = S(3, 4, 5, 6)
DQ1 (Q2, Q1, Q0 ) = S(1, 2, 5, 6)
DQ0 (Q2, Q1, Q0 ) = S(0, 2, 4, 6)
Step 2: Simplify using K-map method
SynchronousCounters
22 ________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page24of 25
The simplified equation:
DQ2 = Q2’Q1Q0 + Q2Q1’ + Q2Q0’
DQ1 = Q1’Q0 + Q1Q0’
DQ0 = Q0’
Step 3: Draw the logic diagram
SynchronousCounters
24 _________________
___________________
___________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
8/8/2019 MELJUN CORTES HANDOUTS_Shift Register and Counter
http://slidepdf.com/reader/full/meljun-cortes-handoutsshift-register-and-counter 7/7
Shift Register andCounter
LogicDesignand Switching
* Property of STI
Page25of 25
Partial state table alongside excitation table
SynchronousCounters
25 ________________
___________________
___________________
___________________
___________________
___________________ ___________________
___________________
___________________
___________________
___________________
___________________