EE425 Computer Engineering Laboratory Exp. 4: Pulse Train Synchronization

$30.00

Category: Tags: , , , , You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (2 votes)

Consider the oscilloscope image shown in Figure 1 below. This image shows four synchronized pulses
coming from four different pins of the PIC microcontroller, and which are being monitored using the four
channels from the oscilloscope (channels 1 through 4). Assume that the time division is set 0.1ms and
consider Table 1. Note that if we identify each row of Table 1 with a single time division of the
oscilloscope, then by inspection we have that the first four time divisions (from left to right on Figure 1)
correspond to the four consecutive rows (from top to bottom) of the table, respectively. That is, during the
left-most time division in Figure 1, only channel 1 is “high”, while all other channels are “low,” which
corresponds to the first row of Table 1; a similar correspondence can be seen for next three time divisions
and the three remaining rows of the table. Note that after the first four time divisions of the oscilloscope
image, the rows of the table are simply repeated ad infinitum.
Task 1: Write an assembly code that generates the four synchronized pulses shown in Figure 1. Please
assign pins RC0 through RC3 (of the PORTC SFR) to channels 1 through 4 of the (imaginary)
oscilloscope, respectively.
Task 2: Repeat Task 1 for Figure 2 and its corresponding data in Table 2 found below.
Task 3: Repeat Task 1 for Figure 3 and its corresponding data in Table 3 found below.
Task 4: Write an assembly code that would generate the four synchronized pulse trains corresponding to
Table 4 found below. Again, please assign pins RC0 through RC3 (of the PORTC SFR) to channels 1
through 4, respectively. In this case, what would the oscilloscope image look like for this particular
sequence of pulse trains? Please provide an image, even if it is a picture of a drawing that you made on
some graph paper. (If you can find a way to generate a nice electronic, professional-looking image, then
more power to you!)
NOTE: Please create a separate .asm file for each of the four tasks above. You are encouraged to use the
.asm file that was provided to you along with the simulator tutorial as a template. The name of that file is
“template_p4.asm.”

Figure 1. Synchronized pulse trains —first sequence.
CH. 4 CH. 3 CH. 2 CH. 1
0 0 0 1
0 0 1 0
0 1 0 0
1 0 0 0
Table 1. States of oscilloscope channels 1 through 4 for the first sequence of pulse trains.

Figure 2. Synchronized pulse trains —second sequence.
CH. 4 CH. 3 CH. 2 CH. 1
0 0 1 1
0 1 1 0
1 1 0 0
1 0 0 1
Table 2. States of oscilloscope channels 1 through 4 for the second sequence of pulse trains.

Figure 3. Synchronized pulse trains —third sequence.
CH. 4 CH. 3 CH. 2 CH. 1
0 0 0 1
0 0 1 1
0 0 1 0
0 1 1 0
0 1 0 0
1 1 0 0
1 0 0 0
1 0 0 1
Table 3. States of oscilloscope channels 1 through 4 for the third sequence of pulse trains.
CH. 4 CH. 3 CH. 2 CH. 1
0 0 0 0
1 0 0 0
0 1 0 0
1 1 0 0
0 0 1 0
1 0 1 0
0 1 1 0
1 1 1 0
0 0 0 1
1 0 0 1
0 1 0 1
1 1 0 1
0 0 1 1
1 0 1 1
0 1 1 1
1 1 1 1
Table 4. States of oscilloscope channels 1 through 4.