Download Lab 10 : Loadable 4-Bit Shift Register

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Transistor–transistor logic wikipedia , lookup

Integrating ADC wikipedia , lookup

Valve RF amplifier wikipedia , lookup

Wien bridge oscillator wikipedia , lookup

Opto-isolator wikipedia , lookup

Index of electronics articles wikipedia , lookup

Operational amplifier wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Phase-locked loop wikipedia , lookup

Register file wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Flip-flop (electronics) wikipedia , lookup

Time-to-digital converter wikipedia , lookup

Rectiverter wikipedia , lookup

Transcript
Lab 10 :Serial Data Transfer System:
Slide 2
Asynchronous Inputs.
Slide 3
Loadable 4-Bit Shift Register.
Slide 4
Re-circulating Shift Register
Lab 10 : Asynchronous inputs :
All flip flops have 2 additional inputs called “Asynchronous Inputs” (Pre and Clr). They
allow the user to set initial conditions at Q.
5V
1
0
Pre is called the pre- set input. Connecting it to 0 sets Q to 1.
Clr is called the clear input. Connecting it to 0 resets Q to 0.
Pre and Clr are called asynchronous because they can be used to set
and clear the flip flop without the need of a clock. D and Clk are called
synchronous inputs. They need a clock signal to change Q.
Pre and CLr override the conditions at the synch inputs (D and Clk)
if they are left asserted (0). Pre = Clr =1 allows D and Clk to control Q.
Pre = Clr =0 is not allowed … or … AMBIGUOUS
Pre and Clr can be used to set initial conditions at Q. Here is a
“Power On Reset” circuit that ensures the flip flop starts at Q=0
when power is first applied to the flip flop.
Pre
D
Q
>Clk
Q
D and
Clk
AMBIGOUS!
D
0and
Clock
1 control Q
0
control Q.
5V
Clr
R
1
0
C
5
millisec.
0
1
When the power is first applied to the circuit the capacitor is uncharged (0V) and grounds the Clr input.
Clr=0 clears the flip flop!
The cap charges to 5V through the resistor. The RC time constant determines the amount of time it takes
for the capacitor to charge up. Assume that RC is chosen so that it takes 5 milliseconds to charge the
capacitor. Clr will clear the flip flop for 5 milliseconds after the power is applied to the circuit. Once the
cap is charged then Clr=1 and Q can be controlled by D and Clk.
Slide #2
Lab 10 : Loadable 4-Bit Shift Register :
A 4-bit number can be loaded into the shift register (via inputs A, B, C, D and Load). The
number can be shifted from output QA to QB to QC to QD.
The shift register will be loaded with the number 6.
Shift the number: Load is connected to 1. This enables the shift register to shift the number. Din is connected to 1.
Din is the data input to QA. The data at QA will shift right to QB. The data at QB shifts to QC. QC shifts to QD.
You have seen how it takes 4 clock pulses to move the number 6 out of the shift register and fill it with 1’s from the
Din input. Din will be connected to 0. This will shift the 1’s out and fill the shift register with 0’s.
nd clock
th
rd
Step 1
2 : Provide a 3
4
3
clock
2
4
clock
pulse.
pulse.
pulse.
0
1
0 1 1
Load
1
0
A
B
C
Step 2
1 : Apply 0
6 to Load.
inputs A, B, C, D
0
D
Din
>Clk
QA QB QC QD
1
0
Slide #3
1
0
1
0
1
0
Lab 10 : Re-circulating Shift Register.
The loadable shift register can be configured as a re-circulating shift register. You must
connect the last stage of the shift register (QD) to the data input (Din).
The connection from QD output to Din data input creates a loop or a ring.
The shift register will be loaded with the number 9.
To re-circulate the number: Apply 4 clock pulses.
1
0
1
0
0
1
Load
A
B
C
D
Din
>Clk
QA QB QC QD
0
1
Slide #4
1
0
1
0
0
1