Professional Documents
Culture Documents
Activity Blinkinglight Microp PDF
Activity Blinkinglight Microp PDF
ADAMSON UNIVERSITY
College of Engineering
Electronics and Communications Department
PRACTICAL ACTIVITY 1
Blinking LED lights
(TITLE)
WEDNESDAY (10:30-12
AM)
SCHEDULE
MICROPROCESSOR
Group No. SUBJECT Grade
Instructor
BLINKING LED LIGHTS
INTRODUCTION
This experiment uses the tools Proteus and MPLAB, but first, what are Proteus and
MPLAB? Proteus is a work management automation platform designed from the ground-up by
diversified energy industry professionals to help the industry digitally transform and transition to a
low carbon future. While MPLAB supports project management, editing, debugging and
programming of Microchip 8-bit, 16-bit and 32-bit PIC microcontrollers. This experiment teaches
how to create a blinking LED light using Proteus to build its components, and MPLAB to apply the
codes needed.
MATERIALS
Computer/Laptop
MPLAB IDE
Proteus 8 Professional
Components needed:
Resistor (10kohms)
2 Capacitor (1uF)
Ground
LED(Yellow)
Power source
PROCEDURE
1. In MPLAB application, copy the code of the program by simply pasting it in the
untitled page or you can re-type it so that the program build will run successfully. Save
it as ‘laboratory.asm’.
2. Open Proteus.
4. Click ‘pick parts’. Search for the resistor, capacitor, crystal, and LED. Select OK.
5. After selecting all the devices. It will appear at the left side tool bar.
6. In finding the power and ground, select terminals mode that can be seen also at the left
tool bar.
8. Left click source files, select add files, and look for the file name ‘laboratory.asm’.
Click Open.
In this practical activity Proteus 8 was introduced, students become acquainted with the
MPLAB IDE and Proteus 8 by writing source code and creating a circuit that demonstrates how their
program interacts. Using the same construction logic, the MPLAB software is extracted and
produced in Proteus. After establishing a new file in the source file, the student began encoding the
program. When we finished saving it, the student clicked the create button to test whether the build
was successful. As an example, the circuit was created in Proteus 8. The pic16f84a is included, as
well as a capacitor, resistor, crystal oscillator, and LED. The MPLAB IDE program was installed in
CONCLUSION
In This Experiment the use of microcontroller instead of other controllers such as PLC makes
the assembly program a low cost system. The program enables it to have a high accuracy timing,
high independency and consistently and to optimization strategies. So we say that This experiment
teaches how to create a blinking LED light using Proteus to build its components, and
circuit design and modern control system, while details such as software used to a program the
microcontroller can vary, the thought process used to program them is universal.
SOURCE CODE:
#include <P16F84A.INC>
cblock 0x0C
COUNT1
COUNT2
endc
MAIN_PROG CODE
START
bsf STATUS,RP0
movlw b'00000'
movwf TRISA
movlw b'00000000'
movwf TRISB
bcf STATUS,RP0
MAIN
bcf PORTA,RA0
bcf PORTA,RA1
bcf PORTA,RA2
bcf PORTA,RA3
bcf PORTB,RB0
call DELAY
goto MAIN
DELAY
movlw d'30'
movwf COUNT2
LOOP1
decfsz COUNT1,1
goto LOOP1
decfsz COUNT2,1
goto LOOP1
return
END