0% found this document useful (0 votes)
51 views9 pages

Practical Work 1

This document describes a practical work assignment on PIC programming for input/output manipulation. The objectives are to write PIC programs for I/O operations and bit manipulation. Students are instructed to write code, draw circuits, interface MPLAB, and show output. Marks are awarded based on coding skills, circuit drawing ability, and interfacing competence.

Uploaded by

TJ Here
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views9 pages

Practical Work 1

This document describes a practical work assignment on PIC programming for input/output manipulation. The objectives are to write PIC programs for I/O operations and bit manipulation. Students are instructed to write code, draw circuits, interface MPLAB, and show output. Marks are awarded based on coding skills, circuit drawing ability, and interfacing competence.

Uploaded by

TJ Here
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

ELECTRICAL ENGINEERING DEPARTMENT

PRACTICAL WORK 1

DEC40053: EMBEDDED SYSTEM APPLICATION

PROGRAMME: DEP / DTK

CLO 03: Construct and simulate real-time embedded system application


based on PIC16/PIC18F microcontroller effectively. (P4, PLO5)

(CLS 1): Knowledge & Understanding

(CLS3a): Practical skill


__________________________________________________________________________________

Prepared by: Checked by: Verified by:

Date: 8.3.2021 Date: 08.03.2021 Date:


8/3/2021

1
ELECTRICAL ENGINEERING DEPARTMENT
ACADEMIC SESSION: _____________

DEC40053 EMBEDDED SYSTEM APPLICATION

PRACTICAL WORK 1 : PIC PROGRAMMING FOR I/O MANIPULATION

PRACTICAL WORK
DATE :
LECTURER’S NAME:

GROUP NO. :
TOTAL
STUDENT ID & NAME : MARKS
(100%)

(A)

(B)

DATE SUBMIT : DATE RETURN :

2
DEC40053
PRACTICAL WORK 1
Embedded System
PIC Programming for I/O Manipulation
Application

1.0 PRACTICAL :1

2.0 TITLE : PIC PROGRAMMING FOR I/O MANIPULATION

3.0 COURSE LEARNING OUTCOME (CLO):

CLO3 : Construct and simulate real-time embedded system application


based on PIC16/PIC18F microcontroller effectively. (P4, PLO5)

4.0 OBJECTIVES :

After practical, the student should be able;


1. to write the pic programming for I/O operation.
2. to write the pic programming for I/O bit manipulation

5.0 EQUIPMENTS :

SK40C Pic Start Up Kit, MPLAB IDE software, Proteus software

6.0 THEORY :

#include <p18f4580.h>

#pragma config OSC = HS


#pragma config FCMEN = OFF
#pragma config IESO = OFF
#pragma config PWRT = OFF
#pragma config WDT = OFF
#pragma config MCLRE = ON
#pragma config PBADEN = OFF
#pragma config LVP = OFF
#pragma config XINST = OFF

void main (void)


{
while (1)
{

}
}

3
7.0 PROCEDURE : (1A)

1. Write a c program based on the flowchart 1A.

START

LED ON

END

2. Draw the circuit using Proteus software and simulate the pic microcontroller. (Refer
to Appendix 1 – Circuit 1).

3. Burn the hex file to the PIC and write your observation.
4. Snap the output of pic microcontroller.

4
PRACTICE: (1B – 1D)

Repeat the procedure and adjust the c program for others situation below:

1B. Turn ON LED at a different PORT

RA1, RB0 – RB1 & RC0 – RC1

1C. Repeat practice 1A with LED blinking with delay of 500ms & 1s. Below, you are
given a sub function for time delay.

1D. When a switch is pressed (active low), LED will turn ON and when switch is
released, the LED will turn OFF. (use IF and ELSE statement). Refer Appendix 2
– Circuit 2 for circuit connection.

5
9.0 RESULT

For each practical, the students must show all the codes with comment in every single
lines, flow chart, circuit, picture of hardware assemble in proper sequence and also write
a simple observation.

10.0 DISCUSSION : Discuss on your obtained result

11.0 CONCLUSION : Your conclusion based on your objectives

6
APPENDIX 1

CIRCUIT 1

CIRCUIT 2

7
PW1: PIC PROGRAMMING FOR I/O MANIPULATION
MATRIX NUMBER NAME

A
A B

Course Learning
Outcomes(CLO)/ Skills / Very Poor Satisfactory Very Good
Learning Domain
Circuit Marks
Aspects
Cluster (CLS) 1 2 3
Coding: student Able to write and
Able to write and
able to write Faces difficulty to compile the codes
compile the codes /3 /3
and compile the write the codes without any error and
with assistance.
codes assistance
Good to draw the
Draw circuit: Has difficulty to
circuit input and Excellent to draw the
student able to draw the circuit
Circuit output pin circuit input and /3 /3
draw the PIC input and output
moderately with output pin
A circuit pin
minimum assistance.
Interfacing:
Able to interface the Able to interface the
student able to Has difficulty to
MPLAB & simulation MPLAB & simulation
Interface interface the
circuit and show the circuit and show the /3 /3
MPLAB & MPLAB &
output with output without any
simulation simulation circuit
assistance. error and assistance
circuit

/9 /9

CLO 03:
Coding: student Able to write and
Construct and Able to write and
able to write Faces difficulty to compile the codes
simulate real- compile the codes /3 /3
and compile the write the codes without any error and
time embedded with assistance.
codes assistance
system Good to draw the
application Draw circuit: Has difficulty to
circuit input and Excellent to draw the
based on student able to draw the circuit
output pin circuit input and /3 /3
PIC16/PIC18F Circuit draw the PIC input and output
moderately with output pin
B circuit pin
microcontroller minimum assistance.
effectively. (P4, Interfacing:
PLO5. Able to interface the Able to interface the
student able to Has difficulty to
MPLAB & simulation MPLAB & simulation
Interface interface the
circuit and show the circuit and show the /3 /3
CLS 1: MPLAB & MPLAB &
output with output without any
Knowledge & simulation simulation circuit
assistance. error and assistance
Understanding circuit

CLS3a: Practical /9 /9
skill
Coding: student Able to write and
Able to write and
able to write Faces difficulty to compile the codes
compile the codes /3 /3
and compile the write the codes without any error and
with assistance.
codes assistance
Good to draw the
Draw circuit: Has difficulty to
circuit input and Excellent to draw the
student able to draw the circuit
output pin circuit input and /3 /3
draw the PIC input and output
moderately with output pin
Circuit circuit pin
minimum assistance.
C
Interfacing:
Able to interface the Able to interface the
student able to Has difficulty to
MPLAB & simulation MPLAB & simulation
Interface interface the
circuit and show the circuit and show the /3 /3
MPLAB & MPLAB &
output with output without any
simulation simulation circuit
assistance. error and assistance
circuit

/9 /9

8
PW1: PIC PROGRAMMING FOR I/O MANIPULATION
MATRIX NUMBER NAME

A
A B

Course Learning
Outcomes(CLO)/ Skills / Very Poor Satisfactory Very Good
Learning Domain
Circuit Marks
Aspects
Cluster (CLS) 1 2 3
Coding: student Able to write and
Able to write and
able to write Faces difficulty to compile the codes
compile the codes /3 /3
and compile the write the codes without any error and
with assistance.
CLO 03: codes assistance
Construct and Good to draw the
Draw circuit: Has difficulty to
simulate real- circuit input and Excellent to draw the
student able to draw the circuit
time embedded Circuit output pin circuit input and /3 /3
draw the PIC input and output
moderately with output pin
system D circuit pin
minimum assistance.
application Interfacing:
based on Able to interface the Able to interface the
student able to Has difficulty to
PIC16/PIC18F MPLAB & simulation MPLAB & simulation
Interface interface the
circuit and show the circuit and show the /3 /3
microcontroller MPLAB & MPLAB &
output with output without any
effectively. (P4, simulation simulation circuit
assistance. error and assistance
PLO5. circuit

/9 /9

1. PRACTICAL SKILLS PSYCHOMOTOR ASSESMENT - (80%)

Circuit Circuit Circuit Circuit


NO. STUDENT’S NAME Total: 70%
A B C D

A /9 /9 /9 /9 /36 /70

B /9 /9 /9 /9 /36 /70

2. PRACTICAL WORK COGNITIVE ASSESSMENT - (REPORT 20%)

RESULT DISCUSSION
CONCLUSION
Coding Flowchart Circuit TRIS PORT MSDelay If Else 30%

5 5 5 2.5 2.5 2.5 2.5 5

You might also like