You are on page 1of 11

FACULTY OF ELECTRICAL AND ELECTRONIC ENGINEERING

UNIVERSITI TUN HUSSEIN ONN MALAYSIA

BEJ40401 ELECTRONICS ENGINEERING LABORATORY IV

About Students:
Name Matric No. Section:
1. Instructor’s Name:
2.
3.
4.

About Experiment:
Title Submission date

FOR INSTRUCTOR ONLY

Domain Item Subtotal Total


Pre-Lab /05
C
Question / 15
/20
Lab Activities /30
P Observations /15 /50
Conclusion /05
Demonstrations (Understanding) /10
A Ethics (Originality & Lab Submission) /10 /30
Peer Assessment /10

TOTAL MARK Instructor’s Comment Submission Stamp

/
100
BEJ40401 Semester 1 2022/23
Peer Assessment (to be filled in by the group leader)
Group leader full name :
Group member 1 full name :
Group member 2 full name :
Group member 3 full name :

- This peer assessment should be filled in by the group leader only.


- The group leader should evaluate yourself and also your group members.
- Tick (/) on the row (scale) that best describes yourself and your group members.

CRITERIA 1: Alternate roles Scale Leader Member 1 Member 2 Member 3


Clear ability to alternate roles as a group leader and a group member demonstrated in practice. 5
Able to alternate roles as a group leader and a group member demonstrated in practice. 4
Satisfactory ability to alternate roles as a group leader and a group member demonstrated in practice. 3
Less ability to alternate roles as a group leader and a group member demonstrated in practice. 2
Very little ability to alternate roles as a group leader and a group member demonstrated in practice. 1
No alternate roles 0
CRITERIA 2: Teamwork Scale Leader Member 1 Member 2 Member 3
Excellent ability to cooperate with group members in preparing the lab report/demo. 5
Good ability to cooperate with group members in preparing the lab report/demo. 4
Satisfactory ability to cooperate with group members in preparing the lab report/demo. 3
Less ability to cooperate with group members in preparing the lab report/demo. 2
Very little cooperation with group members in preparing the lab report/demo. 1
No cooperation with group members 0
Total mark = 10 /10 /10 /10 /10

BEJ40401 Semester 1 Session 2022/23 ii


Grading Rubric for Written Report (to be filled in by the instructor)

Scale
Criteria
5 4 3 2 1 0 Marks
Lab Activities (C) It Varies, depending on the activity assigned
Observations (C) It Varies, depending on the question assigned
Conclusion (P) Able to write a Able to write a Able to write a Able to write a Not able to write a No conclusion
conclusion with conclusion clearly conclusion clearly conclusion with conclusion. provided /5
excellent clarity, and but require minor limited clarity and
understandably.
understandability, improvements. require further
and focus. improvements.
Demonstration (A) Very clear evidence Able to demonstrate Able to demonstrate Able to demonstrate Demonstration No
of knowledge and knowledge and knowledge and knowledge and without demonstration
understanding understanding in understanding in understanding in understanding the from student/s
practice and require practice but require
demonstrated in practice well. principle; cannot scale * 2 = / 10
minor improvements.
practice. improvements. relate the concept
to the
demonstration.
Ethics (A) Solution ideas are Solution ideas are Little solution ideas Some of the Most of the All the solution
written using their written using their are adopted from solution ideas are solution ideas are ideas are copied
original language, original language, others, written with copied from others, copied from from others
written with clear written with understandability. without fully others, without /5
knowledge, knowledge and understand the fully understand
understandability, understandability. concept. the concept.
and focus. / 10
The report is The report is The report is The report is The report is No report
submitted before or submitted a day submitted 2 days submitted 3 days submitted more submission /5
on the dateline. after the dateline. after the dateline. after the dateline. than 3 days after
the dateline.
Table of Content

Peer Assessment (to be filled in by the group leader)..................................................ii

Grading Rubric for Written Report (to be filled in by the instructor).............................iii

Table of Content...........................................................................................................iv
BEJ40401 Semester 1 Session 2022/23
Pre-Lab Answers..........................................................................................................1

Answers to Lab Activities..............................................................................................2

Lab Activity 1.............................................................................................................2

Lab Activity 2............................................................................................................4

Observations.................................................................................................................6

Questions......................................................................................................................7

Conclusions..................................................................................................................7

Note: Select update table (entire table) to update field accordingly.

iv

BEJ40401 Semester 1 Session 2022/23


Pre-Lab Answers
/5

1 Briefly explain four general categories of techniques in device identification as follows: Mark:
. i. Multiple interrupt lines /3
ii. Software poll
iii. Daisy chain (hardware poll, vectored)
iv. Bus arbitration (vectored)
Answer:

Multiple interrupt lines :


Software poll :
Daisy chain :
(hardware poll, vectored)
Bus arbitration (vectored) :

2 Briefly explain four types of I/O commands that an I/O module may receive when it is Mark:
. addressed by a processor as follows:
i. Control /2
ii. Test
iii. Read
iv. Write

Answer:

Control :
Test :
Read :
Write :

BEJ40401 Semester 1 Session 2022/23


1
Answers to Lab Activities / 30

Lab Activity 1 / 15
Step Instructions Snapshot / Answer Marks
1. In the compiler window, check only the boxes Screenshot /1
Generate code, Enable optimizer and
Redundant Code. Enter the following source code
and compile it:

program Vectors
sub IntVect1 intr 1
writeln ("This is intr 1")
end sub
sub IntVect2 intr 2
writeln ("This is intr 2")
end sub
sub IntVect5 intr 5
writeln ("This is intr 5")
end sub
while true
wend
end

2. In the compiled code window locate the Screenshot /1


subroutines IntVect1, IntVect2 and IntVect5.

Make a note of the starting addresses of these


subroutines below:
Answer:
Table 1 Table 1
Subroutine Starting address Subroutine Starting address
IntVect1 IntVect1
IntVect2 IntVect2 /3
IntVect5 IntVect5

3. Next, do the following: Screenshot /2


i. Load the code generated in CPU memory.
ii. Click on the INTERRUPTS button to view
the INTERRUPT VECTORS window.
iii. Make a note of the numbers displayed in
text boxes next to INT1, INT2 and INT5. Answer:
Table 2 Table 2
Interrupt Interrupt
INT1 INT1 /3
INT2 INT2
INT5 INT5

4. Now, follow the instructions below: Screenshot /5


i. Click on the INPUT OUTPUT button to view
the console window.
ii. Select Stay on top boxes both in the console
and the interrupt vectors windows.
iii. Reset the Vectors program and run it at the
fastest speed.

BEJ40401 Semester 1 Session 2022/23


2
iv. While the program is running, click the
TRIGGER buttons in the interrupts window
against INT1, INT2 and INT5 one after the
other.
v. Observe the messages displayed on the
console.

BEJ40401 Semester 1 Session 2022/23


3
Lab Activity 2 / 15

Step Instructions Answer Marks


1. Enter the following source code in Screenshot /3
a new source editor and compile it.

program PolledInt
var v integer
v=0
writeln("Program Starting")
while true
read(nowait, v)
for i = 1 to 100
if v > 0 then
break *
end if
write(".")
next
wend
writeln("Program Ending")
end

2. Next, follow the instructions below: Screenshot /6


i. Load the code generated in
CPU memory.
ii. Set the speed of simulation to
the maximum.
iii. Bring the console window up
(use the INPUT OUTPUT
button).
iv. Check the Stay on the top
check box on the Console.
v. Click in the INPUT box on the
Console.
vi. Start the simulation by clicking
the CPU Simulator’s RUN
button. As soon as the
Program Starting message is
displayed on the Console, type
any single character in the
INPUT box of the Console.
vii. Wait until the program
terminates.

3. Next, enter the following source Screenshot /3


code in a new source editor and
compile it.

program VectoredInt
var v integer
sub InputInt intr 1
read(nowait, v)
end sub
v=0

BEJ40401 Semester 1 Session 2022/23


4
writeln("Program Starting")
while true
for i = 1 to 100
if v > 0 then
break *
end if
write(".")
next
wend
writeln("Program Ending")
end

4. Next, follow the instructions below: Screenshot /3


i. Load the code generated in
CPU memory.
ii. Reset and run this code at the
fastest speed.
iii. As soon as the Program
Starting message is displayed
on the Console, type any single
character in the INPUT box of
the Console.
iv. Wait until the program
terminates.

BEJ40401 Semester 1 Session 2022/23


5
Observations / 15

1. From Lab Activity 1, comment on your observations by referring to Table 2 and the Mark:
messages displayed on the console after clicking the TRIGGER button (include the
/9
displayed contents of the program stack).

Answer:

Activity Observation
after clicking the TRIGGER :
button at INT1
after clicking the TRIGGER :
button at INT2
after clicking the TRIGGER :
button at INT5

2. From Lab Activity 2, briefly explain what the two programs are doing (note where the Mark:
read statement is in this case).
/6

Answer:

PolledInt VectoredInt

BEJ40401 Semester 1 Session 2022/23


6
Questions / 15

1. Based on your observation in the previous exercise, briefly explain the difference in the Mark:
behaviours of the two programs, PolledInt and VectoredInt, with respect to the speed of
/ 10
response to input. Explain why this difference.

Answer:

PolledInt VectoredInt

2. Suggest and very briefly describe five reasons where you would use the Polled Mark:
Interrupt method in preference to the Vectored Interrupt method.
/5

Answer:
i.
ii.
iii.
iv.
v.

Conclusions /5

Guide:
- Explain what you have learned in activities 1 and 2
- Refer back to the outcomes at the beginning of the lab sheet
Conclusion:

- End of Lab Report -

BEJ40401 Semester 1 Session 2022/23


7

You might also like