Report PW6 F1023

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

ELECTRICAL ENGINEERING DEPARTMENT

ACADEMIC SESSION: SESSION 2 2022/2023

DEC40053 – EMBEDDED SYSTEM APPLICATIONS

PRACTICAL WORK 6: HARDWARE INTERFACING (LCD & ADC)

DATE:

LECTURER’S NAME: HELMI BIN JAMALUDIN

GROUP NO.:

SECTION/CLASS: DEP4A
TOTAL
STUDENT ID & NAME: MARKS
(100%)

(1) 02DEP21F1023 MUHAMMAD TARMIZI BIN MOH ALI

(2)

(3)

DATE SUBMIT : DATE RETURN :

1
PRACTICAL SKILL ASSESSMENT RUBRIC (CLO3)

Practical Work Number : 1/2/3/4/5/6 Practical Work Title : HARDWARE INTERFACING (LCD & ADC)
Student Name Registration Number
1.MUHAMMAD TARMIZI BIN MOH ALI 02DEP21F1023
2.

Student Number 1 2
Score description

Weightage
Item Aspects Poor Moderate Good Excellent Score
2 3 4 5

Able to write program Able to build program Able to write program


Write program Unable to write code with minimum
A code with moderate code without
(20%) program code. supervision 4
supervision supervision
Able to compile and Able to compile and Able to compile and
Compile and Unable to compile and
execute program execute program execute program
B execute program execute program 1
code successfully with code successfully with code successfully
(5%) code
moderate supervision. minimum supervision. without supervision.
Able to use the Able to use the
Able to use the
Component Unable to use the components in Proteus components in
C components in Proteus 1
selection (5%) components in Proteus with moderate Proteus with minimum
without supervision.
supervision. supervision.
Able to construct Able to construct Able to construct
Construct circuit Unable to construct
D circuit in Proteus with circuit in Proteus with circuit in Proteus 2
(10%) circuit in Proteus
moderate supervision. minimum supervision. without supervision.
Able to perform Able to perform
Able to perform
simulation with logic simulation with correct
Perform simulation Unable to perform simulation. The result is
E error. The result is output. The result is 6
(30%) simulation. not shown within
shown within shown within stipulated
stipulated time
stipulated time time
Able to troubleshoot Able to troubleshoot Able to troubleshoot
Troubleshooting Unable to troubleshoot
F syntax/logic error with syntax/logic error with syntax/logic error 2
(10%) syntax/logic error
moderate supervision. minimum supervision. without supervision.

Total Practical Skill 80%

2
REPORT ASSESSMENT RUBRIC (CLO3)

Practical Work Number: 6 Practical Work Title : HARDWARE INTERFACING (LCD & ADC)

Student Number 1 2
Score description

Weightage
Item Aspects Poor Moderate Good Excellent Score
2 3 4 5

A Questions (10%)
1

Some formatting errors Proper formatting with Proper formatting, Proper formatting,
or missing sections. labelled sections with section labelled and section clearly labelled
Result and
algorithm, schematic, organized with and well organized
C Documentation 2
no comments and no algorithm, schematic, with appropriate
(10%)
output a few comments and algorithm, schematic,
only a few output comments and output

Total Report Marks 20%

3
LEARNING OUTCOMES (LO):
1
Construct and simulate real-time embedded system application based on PIC16F/PIC18F
microcontroller effectively
2 OBJECTIVE
1. Write program in C language in MPLABX.
2. Draw and simulate PIC circuit in Proteus.
3. Build output hardware circuit using LED
3 CIRCUIT PW1 (a)

CODING PW1 (a)

4
OUTPUT PW1 (a)

4 CIRCUIT PW6 (b)

5
CODING PW1 (b)

OUTPUT PW6 (b)


Temperature >= 28

6
Temperature < 28

5 DISCUSSION
a. An ADC module inside PIC Microcontroller is used to convert analog signal from
LM35 temperature sensor. The sensitivity of LM35 is 10mV/℃. The ADC module is used
with the following setting:
Resolution = 10 bits
Vref (+) = 5V
Vref (-) = 0V.

Calculate the digital output, if the temperature sensor reading value is 88℃

𝑉 𝑖𝑛
𝐷 𝑜𝑢𝑡 =
𝑠𝑡𝑒𝑝 𝑠𝑖𝑧𝑒

V in = 10mV x 88℃ = 0.88V


5
Step size = 10−1 = 4.89mV
2
𝑉 𝑖𝑛 0.88
D out = = = 179.96 @ 180 (decimal) – 10110100 (binary)
𝑠𝑡𝑒𝑝 𝑠𝑖𝑧𝑒 4.89𝑚

b) Find a value of ADCON0, ADCON1 and ADCON2 to configure the ADC module in
PIC18F4550 microcontroller if thespecifications of ADC as below:

ADC configuration:
• Vref- =Vss
• Vref+ = Vdd
• Analog Channel =AN2
• A/D Result Format in LeftJustified
• Conversion Time = 12TAD
• A/D Conversion Clock =FOSC/16

ADCON0 = 0B00001001
ADCON1 = 0B00001101
ADCON2 = 0B00101101

7
6 CONCLUSION
In conclusion, I learned in this practical work how to interface the 2X16 character LCD to
the PIC18F4550 microcontroller. Next, I learned in this practical work how to write the C
program for PIC microcontroller to read analog input and display the value using LCD
display. After that, I learned in this practical work how to set up cursor position is an
important part of LCD which defines at which index (column and row) to display text.
Lastly, I learned in this practical work how to understand LCD user defined function and
write program to read analog signal from a temperature sensor (LM35) to digital, then
display the digital value and temperature on LCD.

You might also like