Vous êtes sur la page 1sur 6

Experiment 3: Interfacing LED’s with PIC microcontroller

Introduction
We are very familiar with “Hello world!” basic program code in the initial stage of any
programming language to learn some basic things. Similarly to get started with 8051
Microcontroller, LED interfacing is a basic thing in Microcontroller interfacing programming.
Each Microcontroller is different in its architecture, but the interfacing concept almost all same
for all Microcontroller.
Interfacing is a method , that provides communication between Microcontroller and the interface
device. An interface is either Input device, or output device, or a storage device, or processing
device.
Interfacing comprises of hardware (Interface device) and Software (source code to communicate,
also called as the Driver). Simply, to use an LED as the output device, LED should be connected
to Microcontroller port and the MC has to be programmed inside make LED ON or OFF or blink
or dim. This program is called as the driver/firmware. The driver software can be developed
using any programming language like Assembly, C etc.
Objective:
This lab is introduces you to Microchip MPLAB X Integrated Design Environment. The tasks in
this lab are:
 To create a program to Interface LEDs with PIC microcontroller.
Procedure:
Step1: Open Proteus and get the devices.
Step2: In this Blink the 1Led with Programming in MPLAB.

Step3:

Step4: Hardware Selection


Select “PICkit3” under Hardware tools when asked to select a tool.
Step5: Compiler Selection
Open the compiler tool chains, if not already open, and select an mpasm

Step6: Project Name and Folder Selection


Click the Browse button and navigate to the folder
On the line marked Project Name type in bilal.

Step7: See Properties


After this we can click on mouse right button choose the properties and see all the data which we
can choose there.

Step8: Then go to the New File in which we choose Categories and select C++.

Step9: And then choose the file type C++ Main File.

Step10: In this go to the File in C++ and see the Folder location and Name and then Finish this.
Step11: In these steps the main compiler is open and we can coding on this.

Step12: Then we can make a simple code of adding the number.


Conclusion:
In this lab it is conclude that:

In this lab we have learned about MPLAB X IDE software and there following steps. We know
about the programming language of MPLAB X supports compilers. In this we have create
simple MPLAB X IDE to keep track of all files, settings and. configurations required for the
development of an embedded application.