0% found this document useful (0 votes)
54 views4 pages

MPI LAB 4 Re

This lab report summarizes a student's work exploring interrupts using a microcontroller trainer and PIC16F877 microcontroller. The student programmed the microcontroller to light different LEDs on a trainer board depending on which button was pressed, demonstrating an understanding of how interrupts work. The student was able to successfully complete all tasks in the lab and come to an understanding of basics like how interrupts are generated in integrated circuits and their importance.

Uploaded by

adnan javed
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)
54 views4 pages

MPI LAB 4 Re

This lab report summarizes a student's work exploring interrupts using a microcontroller trainer and PIC16F877 microcontroller. The student programmed the microcontroller to light different LEDs on a trainer board depending on which button was pressed, demonstrating an understanding of how interrupts work. The student was able to successfully complete all tasks in the lab and come to an understanding of basics like how interrupts are generated in integrated circuits and their importance.

Uploaded by

adnan javed
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/ 4

MICRO-PROCESSOR & INTERFACE

LAB
[Document subtitle]

Lab report no. 01


Class BCE-5(A)
Name ADNAN JAVED
Roll no. 01-132172-031
Submission Date: 23/09/2019
Submitted to Ma’am Tooba
LAB NO. 01

Objective:
 To understand how the interrupts came.
 To understand how we generate the interrupts in IC’s.
 To understand how much important are the interrupts

Introduction:
Apparatus:
 Microcontroller Trainer
 PIC16F877
Tools:
 Proteus
 Micro C
 Programmer
TASK 1:
Coding :
sbit rowa at RB0_bit; while(c3==0){
sbit rowb at RB1_bit; PORTD=0x03; }}
sbit rowc at RB2_bit; rowa=1;
sbit rowd at RB3_bit; rowb=0;
sbit c1 at RB4_bit; rowc=1;
sbit c2 at RB5_bit; rowd=1; // test row B
sbit c3 at RB6_bit; if (c1==0) {
void main(){ delay_ms(300);
TRISB=0b11110000; while(c1==0) {
PORTB=0x00000000; PORTD=0x04;}}
TRISD=0; if (c2==0) {
OPTION_REG =0x7F; delay_ms(300);
while(1) { while(c2==0){
rowa=0; PORTD=0x05;} }
rowb=1; if (c3==0){
rowc=1; delay_ms(300);
rowd=1; // test row A while(c3==0){
if (c1==0) { PORTD=0x06; } }
delay_ms(300); rowa=1;
while(c1==0){ rowb=1;
PORTD=0x01; } } rowc=0;
if (c2==0) { rowd=1; // test row C
delay_ms(300); if (c1==0) {
while(c2==0){ delay_ms(300);
PORTD=0x02; }} while(c1==0){
if (c3==0) { PORTD=0x07; } }
delay_ms(300); if (c2==0) {
delay_ms(300); delay_ms(300);
while(c2==0){ while(c1==0) {
PORTD=0x08; } } PORTD=0x0A; } }
if (c3==0) { if (c2==0) {
delay_ms(300); delay_ms(300);
while(c3==0){ while(c2==0) {
PORTD=0x09;} } PORTD=0x00; } }
rowa=1; if (c3==0){
rowb=1; delay_ms(300);
rowc=1; while(c3==0) {
rowd=0; // test row D PORTD=0x0B; } } } }
if (c1==0) {

PROTEUS SIMULATION:

Conclusion :
In this lab , I easily understand about the basics of the microprocessor and microcontroller. I understand
how they work and how we can program the ics of MICR. We also work on the Chip PIC16F877. All he
programming is done on the Micro-C software. All perform all the tasks successfully without any
ambuguity.

You might also like