Lab Report
Lab Report
SIMULINK PART - The table below is for verification only and filled by the lab instructor.
Understanding bit time and data rate (5 pts)
Understanding the difference between polar and unipolar (10 pts)
Understanding the difference between RZ and NRZ (10 pts)
Understanding the effect of Line Coding on bandwidth and power
consumption (15 pts)
STM32 PART - Section 1: Transmitting a Data Byte Using Unipolar NRZ Line Coding
Step 1: Choose the proper symbol construction lines in the C code and comment the unnecessary ones.
Set the txData values as it is given on the whiteboard. Build STM32 code and flash the MCU then
reset it, you don’t need to run MCU in debug mode.
Step 2: Connect NI Elvis II Scope CH0 to Frame Sync Signal (D8 on Nucleo-64 or PA9 on
Discovery).
Step 3: Connect NI Elvis II Scope CH1 to Clock Signal (D13 on Nucleo-64 or PA5 on Discovery).
Step 4: Adjust the Scope divisions (1V/Div, 500µS/Div). Set Scope CH0 vertical position at -3V. Set
your Scope “Trigger Type” to “Edge”, “Level” to “1V” and Trigger “Source” to “Scope CH0”.
Step 5: How many Clock Signal Cycles (periods) between two Frame Sync Signal Pulses? Fill the Table
below. (5 pts)
Clock Cycle Counts
Step 6: Disconnect Scope CH1 from Clock Signal and connect it to Line Coding output (A2 on
Nucleo-64 or PA4 on Discovery).
Step 7: Plot your Scope screen on the graph. (10 pts)
Step 14: Disconnect Scope CH1 from Line coding output. Connect Line coding output to LPF input and
Scope CH1 to LPF output.
Step 15: Set R1 value to 0 Ω. Plot your Scope screen on the left graph. (10 pts)
Step 16: Set R1 value to 5 kΩ. Plot your Scope screen on the right graph. (10 pts)