0% found this document useful (0 votes)
40 views

Report1 Embeded Wong Setel

1. The document discusses a lab report for an embedded systems application course. It describes using MPLAB X IDE and Proteus software to write and simulate code for a PIC microcontroller. 2. The objective is to write C programs in MPLABX IDE and draw circuits in Proteus to simulate output. Equipment includes MPLAB X IDE, Proteus, and a laptop. 3. Procedures describe writing code in MPLABX, compiling, and loading the hex file into Proteus to simulate circuits with LEDs and voltage readings. Safety procedures involve power cords and laptop charging wires.

Uploaded by

ekalrudy20
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)
40 views

Report1 Embeded Wong Setel

1. The document discusses a lab report for an embedded systems application course. It describes using MPLAB X IDE and Proteus software to write and simulate code for a PIC microcontroller. 2. The objective is to write C programs in MPLABX IDE and draw circuits in Proteus to simulate output. Equipment includes MPLAB X IDE, Proteus, and a laptop. 3. Procedures describe writing code in MPLABX, compiling, and loading the hex file into Proteus to simulate circuits with LEDs and voltage readings. Safety procedures involve power cords and laptop charging wires.

Uploaded by

ekalrudy20
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/ 7

LAB 1 REPORT

DJM 50122
EMBEDDED SYSTEM APPLICATION
DIPLOMA ENGINEERING MECHATRONIC

LECTURER
EN. SYUKRUL HASSANI BIN JAMALUDIN
EN. SOFIAN BIN YUSOFF

NAME MATRIX NO
AHMAD DANISH BIN AHMAD WIRA 03DEM21F1051
INTRODUCTION
MPLAB X IDE and Proteus are well-known tools for embedded system and microcontroller
development. Microchip Technology's MPLAB X IDE is an integrated development environment
(IDE) for developing and debugging embedded applications based on their microcontrollers.
LabCenter Electronics' Proteus simulation software is commonly used for simulating
microcontroller-based projects.

OBJECTIVE
1. Able to write programs in C language in MPLABX IDE.

2. Able to draw circuits in Proteus and simulate the output.

LIST OF EQUIPMENT
1. MPLAB X IDE software

2. Proteus software

3. LAPTOP/PC
FLOW CHART PROCESS

PROCEDURE(MPLAB&PROTEUS)
1) Make a PW folder on your desktop or any other drive. Create a subfolder in the folder.
2) Open MPLABX and go to File>New Project. Choose from the following categories:
Microchip Embedded, Standalone Project. Next, click.
3) Choose device PIC18F45K22 and tool simulator, then click Next.
4) Select compiler XC8 and then click Next.
5) Choose the option Select Project Name and Folder. Click Browse in the Project
Location section. Choose the PW folder you previously created. Enter PW1 in the
Project Name field. Ignore any other possibilities. Finally, click Finish.
6) Check your MPLAB X settings here. Dashboard-PW1 (the name of your project)
Device-PIC18F45K22 (your preferred PIC)Compiler Toolchain-XC8 (or your
preferred compiler)
7) Create a C programming file, Right click Source File>New>main.c
8) File name, “Lab1A”. Option C is default selection.
9) Click File>Project Properties>XC8 Global option.At C Standard, select C90.
10) Write the source code.
11) To compile your source code, click Production>Build Main Project or its icon.
12) If your program has no error, you will get BUILD SUCCESSFUL statement in output
window as below. If your program has error, you will get BUILD FAILED statement.
13) Open proteus, click New Project. Insert name Circuit1A, then click Next until Finish
14) Button P from libraries icon. Use keyword to find the component.Contruct the circuits.
15) Load the hex file into Proteus. In MPLAB X, at the output window, copy the statement
highlighted below and paste in program file in Proteus.
16) To write new program, right click on the previous source code and click remove from
project.

C-PROGRAMMING CODE & EXPLAINATION


Lab1A Coding
Lab1A Output

Explanation: LED(D1) will light up when the circuit is turned on.Both D1 and R1 are connected
to RA2 in PIC. The voltmeter will show the electric current flowing in the circuit. Negative
connected to ground.Power Supply is connected with R2 and connected to Pin 1 RE3

Lab1B Coding
Lab1B Output

Explanation: All the led from R3 to R10 are connected to the pins on the PLC in order from pins
15 to 18 and 23 to 26. All the Led also has its own earth ground and resistor.

WORKING SAFETY PROCEDURES


1) Power Corde
2) Laptop Charging Wire

CONCLUSION
In conclusion, MPLAB X IDE and Proteus are indispensable tools for embedded system
development. MPLAB X IDE provides a robust integrated development environment for writing,
compiling, and debugging code for a variety of Microchip microcontrollers. Proteus, on the other
hand, is a powerful simulation software that allows for the virtual modelling and testing of
electronic circuits and microcontroller-based projects.
REFERENCES

 Practical Work DJM50122 (Lab1)


 https://www.microchip.com/en-us/education/developer-help/learn-tools-software/mcu-
mpu/compilers/xc8#:~:text=Microchip's%20latest%20compiler%20line%2C%20the,C%
20and%20HI%2DTECH%20compilers.

You might also like