You are on page 1of 13

w

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

ATTENDANCE NAME CONTRIBUTION REMARKS

DIETHER DE OCAMPO 201812368

D.O.P. OCT 27,2021 D.O.S. NOV 2, 2021

LOUIELITO FERROLINO , ECE

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:

 Crystal Oscillator (1MHz)

 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.

3. Click new project.

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.

7. Construct the circuit provided in the laboratory manual.

8. Left click source files, select add files, and look for the file name ‘laboratory.asm’.

Click Open.

9. Your source code will appear instantly.

10. Run the program.


FINDINGS AND RESULT

Proteus Circuit Diagram of Blinking lights

MpLab Source Code Build Succeeded


MpLab Source Code
LED Lights on/Blink
ANALYSIS

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

Proteus 8 in order for the circuit to function.

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

MPLAB.Microcontrollers are a practical, affordable and flexible solution to many challenges of

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>

RES_VECT CODE 0x0000


goto START

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

bsf PORTA, RA0


call DELAY
bsf PORTA, RA1
call DELAY
bsf PORTA, RA2
call DELAY
bsf PORTA, RA3
call DELAY
bsf 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

GOOGLE DRIVE LINK


https://drive.google.com/file/d/1773hXaeA9cQe8QkQsatf-Kz-TL9IsNtC/view?usp=sharing

You might also like