Project Report 1
Project Report 1
Subject: Microprocessor
Program: BS (Electrical Engineering)
Roll no: 16003019002-008
Submitted by: Abdullah shaffiq
Muzammil Ilyas
Submitted to: Sir Adnan khalid
LCD is connected with the PORTC of pic microcontroller and whenever gas is detected it will be
displayed on LCD that gas is detected. You can also connect a buzzer with output pin of pic
microcontroller. If gas is detected, buzzer or alarm will turn on. You can also add the gsm module
to this project to get sms on your mobile number when gas is present in air. You may also like to
check:
Buzzer interfacing with Arduino
gsm module interfacing with pic microcontroller
send sms using gsm module and pic microcontroller
Code for MQ-2 gas sensor interfacing with
Void main ( )
{
TRISD=0;
TRISB=0;
TRISC=1;
While (1)
{
If (PORTC.B0==1)
{
PORTD.B0=1;
PORTB.B0=0;
}
Else
{
PORT.B0=0;
PORT.B0=1;
}
}
}