0% found this document useful (0 votes)
26 views6 pages

MICROPROCESSOR

The document describes an exercise using the PIC16F877A microcontroller in Proteus to control LED lights through different blinking sequences. The objectives are to set up the microcontroller environment in Proteus and program the PIC16F877A to manipulate the LEDs. Two programs are written - one to blink the LEDs in a set pattern, and another to light them in an alternate sequence. The conclusion states that the simulation gave valuable experience in embedded systems and microcontroller programming to control device outputs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views6 pages

MICROPROCESSOR

The document describes an exercise using the PIC16F877A microcontroller in Proteus to control LED lights through different blinking sequences. The objectives are to set up the microcontroller environment in Proteus and program the PIC16F877A to manipulate the LEDs. Two programs are written - one to blink the LEDs in a set pattern, and another to light them in an alternate sequence. The conclusion states that the simulation gave valuable experience in embedded systems and microcontroller programming to control device outputs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

MICROPROCESSOR

EXERCISES

Date: January 24, 2024


Program/Year: BSCpE 3B

MAYNARD PAGAUITAN

INSTRUCTOR: Engr. Bernard Daquioag Bisuecos


FINAL PROJECT
EXERCISES

I. INTRODUCTION:
In the realm of microcontroller-based electronic systems, the PIC16F877A stands out as a
versatile and widely-used microcontroller, known for its reliability and functionality. One
common application of the PIC16F877A is in controlling and manipulating LED lights, a
fundamental aspect of embedded systems design. Simulation platforms like Proteus provide a
virtual environment for engineers and hobbyists to design, test, and validate their
microcontroller-based projects before actual hardware implementation.
This simulation project focuses on the manipulation of LED lights using the PIC16F877A
microcontroller within the Proteus environment. LEDs are popular components due to their low
power consumption, durability, and ease of interfacing with microcontrollers. Through this
simulation, users can gain hands-on experience in programming the PIC16F877A to control
LEDs and understand the underlying principles of digital electronics.

II. OBJECTIVES:
 Gain proficiency in setting up the PIC16F877A microcontroller in the Proteus simulation
environment.
 Configure essential hardware components, including oscillators, reset circuits, and power
supply, to create a stable microcontroller environment.

III. MATERIALS
 MIKRO C
 PROTEUS
- LED
- CRYSTAL OSCILLATOR
- CAPACITOR (22pF)
- PIC16F877A

IV. METHODS
Maynard Pagauitan Exercise 1
Description: The “LED Blinking Sequence with PIC16F877A” project on Circuit Digest

showcases the capabilities of the PIC16F877A microcontroller. It involves connecting LEDs


to the microcontroller, writing C code to control a specific blinking sequence, and
implementing the project through hardware setup, programming, and testing. The key
components include the PIC16F877A microcontroller, LEDs, resistors, and wiring. The
success of the project is determined by observing the LEDs’ blinking pattern, providing a
hands-on experience for learning microcontroller-based LED control and embedded
systems fundamentals.

Here is the code:

Void main() {
TRISB = 0x00;
PORTB = 0x00;
int counter = 0;
while (counter < 3) {
PORTB.RB7 = 1;
Delay_ms(1000);
PORTB.RB7 = 0;
PORTB.RB6 = 1;
Delay_ms(1000);
PORTB.RB6 = 0;
PORTB.RB5 = 1;
Delay_ms(1000);
PORTB.RB5 = 0;
PORTB.RB4 = 1;
Delay_ms(1000);
PORTB.RB4 = 0;
PORTB.RB3 = 1;
Delay_ms(1000);
PORTB.RB3 = 0;
PORTB.RB2 = 1;
Delay_ms(1000);
PORTB.RB2 = 0;
PORTB.RB1 = 1;
Delay_ms(1000);
PORTB.RB1 = 0;
PORTB.RB0 = 1;
Delay_ms(1000);
PORTB.RB0 = 0;
counter++;
}
}

Block diagram

PIC16F877A LED DRIVER LEDS

Microcontroller
(MCU)
Maynard Pagauitan. Exercise 2
Description: This schematic uses an alternate light sequence that I created and

codedto light the LED. When you press the play button, the LED will turn on
automatically.The sequence shown in the picture is as follows: D1(LED1) turns on and off,
followed by D8(LED8), D2 (LED2), D7 (LED7), D3 LED3), D6 (LED6), D4
Code:void main()
{ TRISB =
0b00000000; // Set all PORTB pins
as output while(1) {
PORTB = 0b00000001;
Delay_ms(500);
// Adjust the delay as needed
PORTB = 0b10000000;
Delay_ms(500);
PORTB = 0b00000010;
Delay_ms(500);
PORTB = 0b01000000;
Delay
_ms(500);
PORTB = 0b00000100;
Delay_ms(500);
PORTB = 0b00100000;
Delay_ms(500);
PORTB = 0b00001000;
Delay_ms(500);
PORTB = 0b00010000;
Delay_ms(500);
}
}

IV. CONCLUSION
In conclusion, the LED lights manipulation simulation in Proteus was a valuable exercise in
understanding embedded systems and microcontroller programming. It allowed for the
integration of the PIC16F877A microcontroller with LED lights, demonstrating its ability to
control and manipulate LED states. The simulation also provided hands-on experience in coding
for the microcontroller, allowing for testing different configurations and scenarios. Proteus
proved to be an effective tool for visualizing and analyzing system behavior in a virtual
environment, offering a cost-effective and time-efficient means of prototyping and testing.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy