SlideShare a Scribd company logo
2/28/2014 Interface GSM with 8051 Microcontroller (AT89C51)
http://www.engineersgarage.com/microcontroller/8051projects/interfacing-gsm-8051-microcontroller-circuit-code 1/4
Arduino Projects | Raspberry Pi | Electronic Circuits | AVR | PIC | 8051 |
Electronic Projects | How To
Interfacing GSM Module with 8051
microcontroller (AT89C51) without
using PC
//ProgramtoInterfaceGSMModulewith8051microcontroller(AT89C51)withoutusin
#include<reg51.h>
#defineportP1
#definedataportP2 //DataportforLCD
sbitrs=port^2;
sbitrw=port^3;
sbiten=port^4;
intcount,i;
unsignedcharcheck,str[15];
bitcheck_space;
voidinit_serial() //Initializeserialport
{
TMOD=0x20; //Mode2
TH1=0xfd; //9600baud
SCON=0x50; //Serialmode=1,8-Bitdata,1Stopbit,1
TR1=1; //Starttimer
}
voiddelay(unsignedintmsec) //Functionfordelay
{
inti,j;
for(i=0;i<msec;i++)
for(j=0;j<1275;j++);
}
voidlcd_cmd(unsignedcharitem) //FunctiontosendcommandonLCD
{
MC076
Summary Description Circuit Diagram Code Components
AMIT DAS
Invite a friend
My account
Create content
Add a Project
Log out
INSIGHT-
DISCOVER
HOW GADGETS
WORK?
Adapter
Banana Jack
Electric Beard
Trimmer
HDMI Cable
Membrane
Keypad
Micro Switch
Scientific
Calculator
SMPS
Telephone
Turbidity
Sensor
USB
Connector
...more
EG
SPONSORED
VIDEO
ST Micro ARM
Cortex M4
Evaluation
Board
Follow
Follow
Home Insight EG Labs Articles Invention Stories Forum
Knowledge Base Contribute Advertise Subscribe Contact Us
2/28/2014 Interface GSM with 8051 Microcontroller (AT89C51)
http://www.engineersgarage.com/microcontroller/8051projects/interfacing-gsm-8051-microcontroller-circuit-code 2/4
dataport=item;
rs=0;
rw=0;
en=1;
delay(1);
en=0;
return;
}
voidlcd_data(unsignedcharitem) //Functiontodisplaycharacteron
{
dataport=item;
rs=1;
rw=0;
en=1;
delay(1);
en=0;
return;
}
voidlcd_data_string(unsignedchar*str) //FunctiontodisplaystringonLC
{
inti=0;
while(str[i]!='0')
{
lcd_data(str[i]);
i++;
delay(10);
}
return;
}
voidlcd()
{
lcd_cmd(0x38); //Forusing8-bit
delay(5);
lcd_cmd(0x0F); //Fordisplayonc
delay(5);
lcd_cmd(0x80); //Setthecursoro
delay(5);
}
voidtransmit_data(unsignedcharstr) //Functiontotransmitdatathroughserial
{
SBUF=str; //StoredatainSBUF
while(TI==0); //Waittilldatatransmits
TI=0;
}
voidreceive_data() interrupt4 //FunctiontorecievedataserialyfromRS
{
Access Denied
Altera Cyclone
V GX FPGA
Board
Access Denied
Intel NUC Core
i5 4250U
Processor
Access Denied
IR4312M
Power Module
Access Denied
2/28/2014 Interface GSM with 8051 Microcontroller (AT89C51)
http://www.engineersgarage.com/microcontroller/8051projects/interfacing-gsm-8051-microcontroller-circuit-code 3/4
RI=0;
str[++count]=SBUF; //ReadSBUF
}
unsignedcharbyte_check() //Functiontocheckcarraigereturnandne
{
switch(str[0])
{
case0x0a:
{ //Return0x00fornewline
return0x00;
break;
}
case0x0d:
{ //Return0x01forcarriagereturn
return0x01;
break;
}
default:return0x02; //Return0x02forcharactersexcep
}
}
voidmain()
{
lcd(); //Initiali
init_serial(); //Initiali
count=(-1);
delay(500);
lcd_data_string("Ready");
delay(10);
lcd_cmd(0x01);
IE=0x94;
transmit_data('A'); //Transmit'A'to
delay(1);
transmit_data('T'); //Transmit'T'to
delay(1);
transmit_data(0x0d); //Transmitcarriag
delay(50);
while(1)
{
if(count>=0)
{
check=byte_check(); //Checkth
if(check!=0x00)
{
if(check==0x01)
{
if(check_space==1) //Checkpr
{
FEATURED
ARDUINO
PROJECTS
Getting Started
with Arduino
LCD Arduino
Interfacing
Xbee Arduino
Interfacing
Interface GPS
with Arduino
Interface SD
Card with
Arduino
Call using
Keyboard, GSM
& Arduino
SPI Module of
Arduino
... more arduino
projects
FEATURED
RASPBERRY PI
PROJECTS
How to Load
Ubuntu on
Raspberry Pi
How to
Configure
Raspberry Pi
How to use
Alarm Signal in
Raspberry Pi
How to Get GUI
on Raspberry Pi
Playing Snake
Game using
Raspberry Pi
2/28/2014 Interface GSM with 8051 Microcontroller (AT89C51)
http://www.engineersgarage.com/microcontroller/8051projects/interfacing-gsm-8051-microcontroller-circuit-code 4/4
YOU ARE HERE Home Top
Copyright © 2012 EngineersGarage. All rights reserved. Privacy Policy | Refund Policy | About Us
1 Tweet
lcd_data(0x20);
check_space=0;
}
}
else
{
lcd_data(str[0]);
check_space=1;
}
}
count--;
for(i=0;i<count;i++) //Shiftthewhole
{
str[i]=str[i+1];
}
}
}
}
64852 reads
Circuit Board Assembly
thuse.net/Enquire_Now
Printed Circuit Boards Assembly Product At Reasonable Price In Pune
Game Pad
How to Use
Raspberry Pi as a
Game Server
... more raspberry
pi projects

More Related Content

PPT
Gsm presentation
PDF
GSM Module
PDF
DOCX
Gsm modem interfacing with pic microcontroller
PDF
GSM GPRS SIM900A Modem
PPTX
Gsm ppt
PDF
Getting Started with SainSmart SIM900 GPRS (Autosaved)
Gsm presentation
GSM Module
Gsm modem interfacing with pic microcontroller
GSM GPRS SIM900A Modem
Gsm ppt
Getting Started with SainSmart SIM900 GPRS (Autosaved)

What's hot (19)

PDF
GSM GPRS sim900 a modem with aurdino compatible
PPT
MTX Tunnel v8
PDF
GSM SIM 900
PDF
Most usefull at commands
DOC
Pasolink
 
PDF
Gsm presntation
PPT
Ome201102 huawei bts3012 hardware structure issue2.0
PPTX
Gsm message display
DOC
Interface gsm module with pic
PPT
Ome201101 gsm bts312 hardware structure issue4.0
PPT
Huawei bts3012 hardware structure issue1.0
PDF
Datenblatt neo
PDF
Xilinxaxi uart16550
PDF
Ericsson RBS 6000 & 3000 & 2000
PDF
4 CH Analog Input Module - MOD-CFC-4
PDF
Iai ether cat_pcon_acon_specsheet
PPTX
Base Transceiver Station (BTS)
PDF
Ch2 gsm network architecture
PDF
Radio installation
GSM GPRS sim900 a modem with aurdino compatible
MTX Tunnel v8
GSM SIM 900
Most usefull at commands
Pasolink
 
Gsm presntation
Ome201102 huawei bts3012 hardware structure issue2.0
Gsm message display
Interface gsm module with pic
Ome201101 gsm bts312 hardware structure issue4.0
Huawei bts3012 hardware structure issue1.0
Datenblatt neo
Xilinxaxi uart16550
Ericsson RBS 6000 & 3000 & 2000
4 CH Analog Input Module - MOD-CFC-4
Iai ether cat_pcon_acon_specsheet
Base Transceiver Station (BTS)
Ch2 gsm network architecture
Radio installation
Ad

Viewers also liked (20)

PDF
8 Tips for an Awesome Powerpoint Presentation
DOCX
53211830
PPTX
password based door locking system using 8051
PDF
E-Rickshaw battery charger manufacturer in Kolkata - ESI Electro Services
PPTX
Mini project (GSM based wireless notice board)
PPTX
C pack gwadar port
DOCX
Alcohol Sensing Alert with Engine Locking Project
PPTX
Cpac presentation
PPTX
Automatic Counter
PPT
PPTX
Drink and Drive Alcohol Detection
PPTX
Presentation on Electronic Eye controlled Security System
PPTX
wireless E notice board
PPTX
The magical land of the punjab
PPTX
Microcontroller based automatic engine locking system for drunken drivers
DOCX
Design and implementation of home automation system u...
PPT
Interfacing LCD with 8051 Microcontroller
PDF
Ideas on how to create powerful presentations
PPTX
Microcontroller 8051 and its interfacing
PDF
Project report on gsm based digital notice board
8 Tips for an Awesome Powerpoint Presentation
53211830
password based door locking system using 8051
E-Rickshaw battery charger manufacturer in Kolkata - ESI Electro Services
Mini project (GSM based wireless notice board)
C pack gwadar port
Alcohol Sensing Alert with Engine Locking Project
Cpac presentation
Automatic Counter
Drink and Drive Alcohol Detection
Presentation on Electronic Eye controlled Security System
wireless E notice board
The magical land of the punjab
Microcontroller based automatic engine locking system for drunken drivers
Design and implementation of home automation system u...
Interfacing LCD with 8051 Microcontroller
Ideas on how to create powerful presentations
Microcontroller 8051 and its interfacing
Project report on gsm based digital notice board
Ad

Similar to Interface gsm with 8051 microcontroller (at89 c51) (20)

PPTX
8051 MCU Microcontroller for Embedded Technology.pptx
DOCX
Btech intern
DOCX
PDF
Embedded Systems Projects List,Ece/Electronics Projects List
PPTX
8051 - microcontroller applications.pptx
PPTX
Introduction to embedded system & density based traffic light system
PPTX
Gsm based notice board
PPTX
Unit -2 and 3 mekirirygiygyuguiguihiiqio
PDF
Advanced view of atmega microcontroller projects list 1649 at mega32 avr
PPTX
Presentation on home automation system
PPT
1346 A Single Chip Microcomputer
PPTX
home appliance control using gsm
PDF
gsmbasedwirelessnoticeboard-160830052032.pdf
DOCX
PDF
Radio frequency identification system
PPTX
Micro c lab8(serial communication)
PPTX
23.pptx
PPTX
Appliances control through sms
PDF
Ht usb5130-v2
PPTX
Multiuser sms based microcontroller wireless electronic board
8051 MCU Microcontroller for Embedded Technology.pptx
Btech intern
Embedded Systems Projects List,Ece/Electronics Projects List
8051 - microcontroller applications.pptx
Introduction to embedded system & density based traffic light system
Gsm based notice board
Unit -2 and 3 mekirirygiygyuguiguihiiqio
Advanced view of atmega microcontroller projects list 1649 at mega32 avr
Presentation on home automation system
1346 A Single Chip Microcomputer
home appliance control using gsm
gsmbasedwirelessnoticeboard-160830052032.pdf
Radio frequency identification system
Micro c lab8(serial communication)
23.pptx
Appliances control through sms
Ht usb5130-v2
Multiuser sms based microcontroller wireless electronic board

Recently uploaded (20)

DOCX
573137875-Attendance-Management-System-original
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
CH1 Production IntroductoryConcepts.pptx
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
additive manufacturing of ss316l using mig welding
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Construction Project Organization Group 2.pptx
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Geodesy 1.pptx...............................................
PPTX
Welding lecture in detail for understanding
PPT
Project quality management in manufacturing
PDF
Digital Logic Computer Design lecture notes
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
573137875-Attendance-Management-System-original
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
CH1 Production IntroductoryConcepts.pptx
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
additive manufacturing of ss316l using mig welding
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
OOP with Java - Java Introduction (Basics)
Construction Project Organization Group 2.pptx
Embodied AI: Ushering in the Next Era of Intelligent Systems
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Geodesy 1.pptx...............................................
Welding lecture in detail for understanding
Project quality management in manufacturing
Digital Logic Computer Design lecture notes
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
CYBER-CRIMES AND SECURITY A guide to understanding
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
R24 SURVEYING LAB MANUAL for civil enggi
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx

Interface gsm with 8051 microcontroller (at89 c51)

  • 1. 2/28/2014 Interface GSM with 8051 Microcontroller (AT89C51) http://www.engineersgarage.com/microcontroller/8051projects/interfacing-gsm-8051-microcontroller-circuit-code 1/4 Arduino Projects | Raspberry Pi | Electronic Circuits | AVR | PIC | 8051 | Electronic Projects | How To Interfacing GSM Module with 8051 microcontroller (AT89C51) without using PC //ProgramtoInterfaceGSMModulewith8051microcontroller(AT89C51)withoutusin #include<reg51.h> #defineportP1 #definedataportP2 //DataportforLCD sbitrs=port^2; sbitrw=port^3; sbiten=port^4; intcount,i; unsignedcharcheck,str[15]; bitcheck_space; voidinit_serial() //Initializeserialport { TMOD=0x20; //Mode2 TH1=0xfd; //9600baud SCON=0x50; //Serialmode=1,8-Bitdata,1Stopbit,1 TR1=1; //Starttimer } voiddelay(unsignedintmsec) //Functionfordelay { inti,j; for(i=0;i<msec;i++) for(j=0;j<1275;j++); } voidlcd_cmd(unsignedcharitem) //FunctiontosendcommandonLCD { MC076 Summary Description Circuit Diagram Code Components AMIT DAS Invite a friend My account Create content Add a Project Log out INSIGHT- DISCOVER HOW GADGETS WORK? Adapter Banana Jack Electric Beard Trimmer HDMI Cable Membrane Keypad Micro Switch Scientific Calculator SMPS Telephone Turbidity Sensor USB Connector ...more EG SPONSORED VIDEO ST Micro ARM Cortex M4 Evaluation Board Follow Follow Home Insight EG Labs Articles Invention Stories Forum Knowledge Base Contribute Advertise Subscribe Contact Us
  • 2. 2/28/2014 Interface GSM with 8051 Microcontroller (AT89C51) http://www.engineersgarage.com/microcontroller/8051projects/interfacing-gsm-8051-microcontroller-circuit-code 2/4 dataport=item; rs=0; rw=0; en=1; delay(1); en=0; return; } voidlcd_data(unsignedcharitem) //Functiontodisplaycharacteron { dataport=item; rs=1; rw=0; en=1; delay(1); en=0; return; } voidlcd_data_string(unsignedchar*str) //FunctiontodisplaystringonLC { inti=0; while(str[i]!='0') { lcd_data(str[i]); i++; delay(10); } return; } voidlcd() { lcd_cmd(0x38); //Forusing8-bit delay(5); lcd_cmd(0x0F); //Fordisplayonc delay(5); lcd_cmd(0x80); //Setthecursoro delay(5); } voidtransmit_data(unsignedcharstr) //Functiontotransmitdatathroughserial { SBUF=str; //StoredatainSBUF while(TI==0); //Waittilldatatransmits TI=0; } voidreceive_data() interrupt4 //FunctiontorecievedataserialyfromRS { Access Denied Altera Cyclone V GX FPGA Board Access Denied Intel NUC Core i5 4250U Processor Access Denied IR4312M Power Module Access Denied
  • 3. 2/28/2014 Interface GSM with 8051 Microcontroller (AT89C51) http://www.engineersgarage.com/microcontroller/8051projects/interfacing-gsm-8051-microcontroller-circuit-code 3/4 RI=0; str[++count]=SBUF; //ReadSBUF } unsignedcharbyte_check() //Functiontocheckcarraigereturnandne { switch(str[0]) { case0x0a: { //Return0x00fornewline return0x00; break; } case0x0d: { //Return0x01forcarriagereturn return0x01; break; } default:return0x02; //Return0x02forcharactersexcep } } voidmain() { lcd(); //Initiali init_serial(); //Initiali count=(-1); delay(500); lcd_data_string("Ready"); delay(10); lcd_cmd(0x01); IE=0x94; transmit_data('A'); //Transmit'A'to delay(1); transmit_data('T'); //Transmit'T'to delay(1); transmit_data(0x0d); //Transmitcarriag delay(50); while(1) { if(count>=0) { check=byte_check(); //Checkth if(check!=0x00) { if(check==0x01) { if(check_space==1) //Checkpr { FEATURED ARDUINO PROJECTS Getting Started with Arduino LCD Arduino Interfacing Xbee Arduino Interfacing Interface GPS with Arduino Interface SD Card with Arduino Call using Keyboard, GSM & Arduino SPI Module of Arduino ... more arduino projects FEATURED RASPBERRY PI PROJECTS How to Load Ubuntu on Raspberry Pi How to Configure Raspberry Pi How to use Alarm Signal in Raspberry Pi How to Get GUI on Raspberry Pi Playing Snake Game using Raspberry Pi
  • 4. 2/28/2014 Interface GSM with 8051 Microcontroller (AT89C51) http://www.engineersgarage.com/microcontroller/8051projects/interfacing-gsm-8051-microcontroller-circuit-code 4/4 YOU ARE HERE Home Top Copyright © 2012 EngineersGarage. All rights reserved. Privacy Policy | Refund Policy | About Us 1 Tweet lcd_data(0x20); check_space=0; } } else { lcd_data(str[0]); check_space=1; } } count--; for(i=0;i<count;i++) //Shiftthewhole { str[i]=str[i+1]; } } } } 64852 reads Circuit Board Assembly thuse.net/Enquire_Now Printed Circuit Boards Assembly Product At Reasonable Price In Pune Game Pad How to Use Raspberry Pi as a Game Server ... more raspberry pi projects