0% found this document useful (0 votes)
107 views11 pages

MIC511 PIC Lab 2 1

This document contains 20 experiments conducted using a PIC microcontroller. Each experiment has an objective, circuit diagram, and asks what program was used to achieve the stated objective. The experiments include using for loops to light LEDs, toggling a single pin, reading switches and using IF statements, using arrays to control LED patterns, reading buttons, using buttons and iterations, generating tones with a piezoelectric buzzer, using buttons to control buzzer tones, and driving 7-segment displays in count up and count down modes.

Uploaded by

Yhele
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)
107 views11 pages

MIC511 PIC Lab 2 1

This document contains 20 experiments conducted using a PIC microcontroller. Each experiment has an objective, circuit diagram, and asks what program was used to achieve the stated objective. The experiments include using for loops to light LEDs, toggling a single pin, reading switches and using IF statements, using arrays to control LED patterns, reading buttons, using buttons and iterations, generating tones with a piezoelectric buzzer, using buttons to control buzzer tones, and driving 7-segment displays in count up and count down modes.

Uploaded by

Yhele
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/ 11

MIC511 MICROCONTROLLER SYSTEMS

Instructor: Mr. Roman M. Richard, CpE

PIC Microcontroller Experiments


PIC 16F877A
Group Evaluation Form

Group Leader:

Group Members:

Score Table:
EXPERIMENT NO. SCORE

TOTAL SCORE
PERCENTAGE

Instructor’s Remarks:
EXPERIMENT NO. 11
For Loop Running Lights

Objective:
• Create a program that will loop indefinitely.
• The program will turn ON and OFF the LED at port D starting at RD0 up to port RD7 and back
again.

Construct the circuit as shown below:

What program was used to achieve the objective?


EXPERIMENT NO. 12
Single Pin Assignment

Objective:
• Create a program that will loop for 5 times.
• The single LED connected at RC3 must turn ON and OFF with a delay of 1 second.

Construct the circuit as shown below:

What program was used to achieve the objective?


EXPERIMENT NO. 13
Switchs and IF Statements

Objective:
• Set pins RB1 and RB2 of port B as input ports.
• Set pin RD4 of port D as output port.
• If RB1 is high, turn RD4 ON for 10 seconds.
• If RB2 is high, turn RD4 ON and OFF for 8 cycles with a delay of 1.5 seconds.

Construct the circuit as shown below:

What program was used to achieve the objective?


EXPERIMENT NO. 14
Array

Objective:
• Create a program that will loop indefinitely.
• Connect the LED at port B.
• Turn ON and OFF LED’s at port B starting from; RB0 & RB7; RB1 & RB6; RB2 & RB5; RB3 &
RB4; RB2 & RB5; RB1 & RB6; and RB0 & RB7 with a 0.8 second delay.

Construct the circuit as shown below:

What program was used to achieve the objective?


EXPERIMENT NO. 15
Button

Objective:
• Create a program that will loop indefinitely.
• Connect output LEDs at port C.
• Connect a button of port B RB0 and use its click function.

Construct the circuit as shown below:

What program was used to achieve the objective?


EXPERIMENT NO. 16
Button and Iteration

Objective:
• Create a program that will loop indefinitely.
• Connect output LEDs at port B.
• The code must read the button on RD0 and check if it is high for 100 iterations.
• If 100 is accomplished, the code will trigger and advance the LED on from RB7 to RB6 and so on.

Construct the circuit as shown below:

What program was used to achieve the objective?


EXPERIMENT NO. 17
Piezoelectric Buzzer

Objective:
• Create a program that will loop indefinitely.
• Connect a Piezo Sounder on Port D at pin RD3.
• Configure RD3 so that it will play a sound at different frequencies of 1300Hz, 1500Hz, 2000Hz,
2500Hz, and 3000Hz with a duration 250ms each.

Construct the circuit as shown below:

What program was used to achieve the objective?


EXPERIMENT NO. 18
Piezoelectric Buzzer and Button

Objective:
• Create a program that will loop indefinitely.
• Connect a Piezo Sounder on port D’s pin RD3.
• Connect 4 switches on at RB3, RB4, RB5 and RB6. Each switch must produce a different tone.

Construct the circuit as shown below:

What program was used to achieve the objective?


EXPERIMENT NO. 19
7 Segment Display Common Cathode

Objective:
• Create a program that will count-up indefinitely.
• Connect a 7-segment display common cathode at port C.

Construct the circuit as shown below:

What program was used to achieve the objective?


EXPERIMENT NO. 20
7 Segment Display Common Anode

Objective:
• Create a program that will count down indefinitely.
• Connect a 7-segment display common anode at port D.

Construct the circuit as shown below:

What program was used to achieve the objective?

You might also like