You are on page 1of 7

ELECTRICAL ENGINEERING DEPARTMENT

ACADEMIC SESSION: 2 2021/2022

DEC40053 – EMBEDDED SYSTEM APPLICATIONS

PRACTICAL WORK : 2 BASIC INPUT OUTPUT PROGRAMMING

PRACTICAL WORK DATE :

LECTURER’S NAME:

GROUP NO. :

DATE SUBMIT :

PRAC. TOTAL
REPORT
STUDENT ID & NAME : SKILL MARKS
(30%)
(70%) (100%)

(1)

(2)

(3)

(4)

REPORT MARK DISTRIBUTION 30%

(1) Result /Output (10)

(2) Discussion (10)

(3) Conclusion (5)

(4) References (5)

Prepared by Checked by
PRACTICAL SKILL ASSESSMENT (PLO5/CLO3/P4/CLS 3a,3c)

PRACTICAL WORK : 2

TITLE : BASIC INPUT OUTPUT PROGRAMMING

Score

Student 1

Student 2
1 2 3 4 5

Score
Aspect
Weak Average Satisfactory Good Excellent

Able to write part


of the program Able to write
Able to write
Write correctly but less program and gives
Unable to write Able to write program without
Program than three quarter correct output
program program incorrectly lecturer’s x5
of the program under supervision
PRACTICAL SKILL (70%)

assistance
under supervision of the lecturer
of the lecturer

Able to execute Able to execute Execute ALL


Unable to execute Executing program
Execute 50% program is 80% program is program
program with is 30% successfully
program successfully with successfully successfully without x5
assistance with assistance
assistance without assistance assistance

Able to debug Able to debug


Unable to perform Able to debug ALL
Debug Able to debug program 50% program 80%
any debugging program without
Program incorrectly correctly with correctly without x4
program assistance
assistance assistance

Able to display Able to display Able to display all


output 50% output 80% the output
Able to display
Output Display incorrectly correctly under correctly without excellently without
output incorrectly x2
supervision of the the supervision of the help of the
lecturer lecturer lecturer
Very incomplete or Some of the results Almost of the Almost all the All-important trends
incorrect have been correctly results have been results have been and data
interpretation of interpreted and correctly correctly comparisons have
trends and discussed; partial interpreted and interpreted and been interpreted
Discussion
comparison of data but incomplete discussed, only discussed, only correctly and
x2
indicating a lack of understanding of minor minor discussed; good
REPORT (30%)

understanding of results is still improvements are improvements are understanding of


results evident needed needed results is conveyed
Accurate statement
Accurate
of the results of lab
statement of the
A statement of the A statement of the indicates whether
No conclusion was results of the lab
results is results of the lab results support
included or shows indicates whether
Conclusion incomplete with indicates whether hypothesis
little effort and results support the
little reflection on results support the Possible sources of x1
reflection on the lab hypothesis
the lab hypothesis error and what was
Possible sources
learned from the lab
of error identified
discussed

References 0 reference 1-2 references 3-4 references 4-5 references >5 references x1

Total 100
1 LEARNING OUTCOMES (LO):

Construct and simulate real-time embedded system application based on


PIC16F/PIC18F microcontroller effectively. (P4, PLO5)

2 OBJECTIVE :
I. Write C program for PIC input and output pin.
II. Draw and simulate PIC input and output circuit in Proteus.

3 THEORY :

An electrical switch is any device used to interrupt the flow of electrons in a circuit. Switches are
essentially binary devices: they are either completely on ("closed") or completely off ("open"). There
are many different types of switches.

The simplest type of switch is one where two electrical conductors are brought in contact with each
other by the motion of an actuating mechanism. Other switches are more complex, containing
electronic circuits able to turn on or off depending on some physical stimulus (such as light or
magnetic field) sensed. In any case, the final output of any switch will be (at least) a pair of wire-
connection terminals that will either be connected together by the switch's internal contact
mechanism ("closed"), or not connected together ("open").

Push button switches are two-position devices actuated with a button that is pressed and released.
Most push button switches have an internal spring mechanism returning the button to its "out," or
"un-pressed," position, for momentary operation. Some push button switches will latch alternately on
or off with every push of the button. Other push button switches will stay in their "in," or "pressed,"
position until the button is pulled back out. This last type of push button switches usually has a
mushroom-shaped button for easy push-pull action.

4 EQUIPMENT / TOOLS / SOFTWARE :


1. PC workstation
2. Proteus Software Version 8.1
3. MPLAB software version 8.84 and above

5 PROCEDURE :

PART A- LAB 2a

5.1 CREATE SOURCE CODE- if-else DECISION MAKING


Select File>New to open a new file for edit. Enter the *C code as below:
Once you have completed entering the code, select File>Save AS and save the file in the project
directory as lab2a.c. Build all the program and get the Hex file.

Using Proteus software draw the circuit in Figure 2a below. Load Hex file and observe the output.

Figure 2a: LEDs and switch

PART A- LAB 2b

5.2 CREATE SOURCE CODE- if-else if-else DECISION MAKING


Select File>New to open a new file for edit. Enter the *C code as below:
Using Proteus software, design a circuit that consists of two switches and two LEDs for the above
function. Load Hex file and observe the output.

PART A- LAB 2c

5.3 CREATE SOURCE CODE- while DECISION MAKING


Select File>New to open a new file for edit. Complete the *C program code in the box to ensure the
LEDs can be lit as stated in the comments.

Using Proteus software, design a circuit that consists of three switches and two LEDs for the above
function. Load Hex file and observe the output.

PART B
RESULT

LAB 2a
Program:
Circuit :
Observation:

7 LAB 2b
Program:
Circuit :
Observation:

LAB 2c
Program:
8 Circuit :
Observation:

DISCUSSION

CONCLUSION

You might also like