Professional Documents
Culture Documents
ASSIGNMENT 2
Prepared for:
Prepared by:
Matrix : ME101156
Matrix : ME081600
The objective of this report is:
1. To design of pseudo random binary sequence (PRBS) of 15 stages shift register using
Pseudo Random Binary Sequence (PRBS) generator with a given MLS Using Math Lab
MLS, N=2n -1 = 32767 where n= 15. The orientation of bit on shift register are tabulate in
Appendix 1 for only until 40 clock.
SR1 SR2 SR3 SR4 SR5 SR6 SR7 SR8 SR9 SR10 SR11 SR12 SR13 SR14 SR15
Xo
r
Outpu
t
Figure 1 : PRBS
PART A: PRBS using SIMULINK
PRBS signal also simulate in Simulink. In Simulink it constructed based on PRBS equation,
N=2n-1. In our case , n is equal to 15.Therefore,we need to used 15 flip flop in order to make
a shift register. To built shift register we used D flip flop but in Simulink, the limitation of
using D flip flop is it cannot set the initial condition of the flip flop. Therefore JK flip flop are
used to function as a D flip flop to make it as a shift register. Means the JK flip flop are
designed to be a subsystem of D flip flop. In order to make JK flip flop to function as D flip
flop, the input of K are complement of input J. The subsystems of the D flip flop as shown in
Figure 3. The construction of PRBS using subsystem of JK flip flop are shown in Figure
2 .We use output of Q15 as our PRBS output and the input of our shift register is a feedback
from the output Q1 XOR with the ouput of Q15.The results after simulation are shown in
Figure 4
Circuit for PRBS are design using TINA software. The hardware description consists of voltage
regulator, timer, operational amplifier and 8 bit shift register . Voltage regulator (LM7805C) used to
regulate voltage from 9V to 5V to source the circuits and timer NE555 function as a CLK to shift
register. In our case, we use 8-bit serial in shift register (SN74164) . It will shift the output to the next
flip flop to the right. Our input is a feedback from the output of Q1 XOR with output of Q15. The
operational amplifier (LM741) are used to amplifier the signal from the output of the shift register.
PRBS of the signal are measure using oscilloscope, in our case we choose output of Q15 as our PRBS
signal. After simulation the result of PRBS as shown in Figure 6, while circuit construction are shown
in Figure 5.
U1
IN OUT
GND
U5 OSC2
R1
C3 10u
VCC
V1 RESET OUT
CONT
THRES + Ch1 - + Ch2 -
GND
TRIG DISC
P1 1M
C1 10n
C1 100n
U2 U3
9 3 9 3
CLR QA CLR QA
8 4 8 4
CLK QB CLK QB
1 5 1 5
A QC A QC
2 6 2 6
B QD B QD
10 10
QE QE
11 11
QF QF
R4 36k
12 12
R2
QG QG
13 13
QH QH
+
+
-
LED1
U6
P2
R5 15K
U4
V2
From the results that obtain by using the TINA software, we can say that the waveform is the
same with the waveform by using SIMULINK and same with the theoretical. After that, the
hardware for the circuit is constructing so that the real circuit can be test by using
oscilloscope. Figure 7 show the circuit that constructed. After that, we test the output (PRBS)
by using ociloscopes. Figure 8 show the several output that we get from the circuit( purple
line for clock and green line for PRBS output)
Figure 7: Circuit for PRBS.
Figure 8: Several Waveform for clock and PRBS taken for different value.
Conclusion :
The output of PRBS between Simulink ,TINA software and hardware are the same.We also
construct the PRBS results also in truth table as shown in Appendix 1. In our case, because of
big value of PRBS we just construct the truth table until 40 clock only in order to verify our
simulation result.
CLK SR1 SR2 SR3 SR4 SR5 SR6 SR7 APPENDIX
SR8 SR9 1
SR10 SR11 SR12 SR13 SR14 SR15 1xor5
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
2 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
3 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0
4 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1
5 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0
6 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1
7 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 0
8 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1
9 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 0
10 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1
11 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 0
12 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1
13 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0
14 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1
15 1 0 1 0 1 0 1 0 1 0 1 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