Академический Документы
Профессиональный Документы
Культура Документы
Student Companion
Empowering you with skills
<< SMS Home Alarm System with PIR and GSM - MikroC | 2 Reasons Search Here
Why Business Plans Are A Waste Of Time >>
Search
Poweredby Translate
Like 5 2 Tweet 0
StumbleUpon
Category list
CompanyMessaging
CompanyIMBuiltForTeams.Powerful,Safe&Secure.TryNow! Projects (18)
Flowcode Projects (1)
MBLAB X Projects (6)
http://www.studentcompanion.co.za/post/InterfacingGSMModemwithPICMicrocontrollerMikroC 1/13
3/6/2015 StudentCompanion|InterfacingGSMModemwithPICMicrocontrollerMikroC
Figure1:ControllingandMonitoringdeviceswithaCellphone
AGSMmodemisawirelessmodemthatworkswithaGSMwirelessnetwork.GSM
standsforGlobalSystemforMobilecommunications,thisarchitectureisusedfor
mobilecommunicationinmostofthecountriesintheworld.
Awirelessmodemactsbasicallylikethetraditionaldialupmodem,themain
differenceisthatadialupmodemsendsandreceivesdatathroughafixed
telephonelinewhileawirelessmodemsendsandreceivesdatathroughradio
waves.Besidesthedialupconnection,GSMmodemcanalsobeusedforsending
andreceivingSMSwhichisalsooneofthekeyfeaturesofGSMmodem.
SomemodemsareGSM/GPRSmodems,thesemodemsadditionallysupportthe
GPRStechnologyfordatatransmission.GPRSstandsforGeneralPacketRadio
Service.ItisapacketswitchedtechnologythatisanextensionofGSM.Akey
advantageofGPRSoverGSMisthatGPRShasahigherdatatransmissionspeed.
http://www.studentcompanion.co.za/post/InterfacingGSMModemwithPICMicrocontrollerMikroC 2/13
3/6/2015 StudentCompanion|InterfacingGSMModemwithPICMicrocontrollerMikroC
TheoperationofaGSMmodemrequiresaSIM(SubscriberIdentityModule)card
justlikemobilephonestoidentifyasubscribertothecellularnetworkandtostore
thesubscriberinformation.AlsotheyhaveIMEI(InternationalMobileEquipment
Identity)numbersimilartomobilephonesfortheiridentification.
Applications
THERE WILL BE HATERS
Remote System Monitoring:Inaremotesystemmonitoringapplication,a
Microcontrollerforexamplecouldbeusedtoconstantlymonitorthestatusof
aremotesensors,letsaytemperatureormoisturesensors.Ifacertain
conditionisreached,theprogramwillsendanSMStonotifythesituation,if
thesesensorsareinstalledinafarmforexample,thefarmercouldbe
notifiedofanysituationhappeninginthefarmaboutheat,moisture,drought,
etc.
HomeAlarmSystem:Whenamotionsensordetectsamovementofan
intruder,anSMSwillbesenttoapredefinednumberwhichcouldbeyouor
yoursecurityreactioncompanyandasirenoranyothersounddevicecould
betriggeredintheprocessaswell.
RemoteControllingSystem:AmobilephonecanbeusedtoSendanSMS
toswitchON/OFFremotedevices.Youcouldcontrolyourentirehome
devices,switchingON/OFFlights,fans,poolmotor,garagemotorandsoon
withjustasimpleSMSfromadistance.
SecurityAccessControl:Asecurityaccesscanbeimplementedat
apartmentsorhousingcomplexes.Asecurityguardcouldinformbyintercom
Hover to Expand
aresidentifhe/shehasavisitoratthemaingate.witharepliedSMS,the
residentcouldopenremotelythegateforhis/hervisitor.
Vehicletracking:AGSM/GPRSmoduletogetherwithaGPSmodulecanbe
http://www.studentcompanion.co.za/post/InterfacingGSMModemwithPICMicrocontrollerMikroC 3/13
3/6/2015 StudentCompanion|InterfacingGSMModemwithPICMicrocontrollerMikroC
usedtocreatearealtimevehicletrackingdevice.AnSMScouldalsobe
Quote of the day
senttonotifythatthecarhasenteredarestrictedarea,notifyaboutthelevel
ofremainingfuelinthecaretc.Ifthevehicleisstolennotonlythesystem
"Quality is more important
canindicatethelocationofthevehiclebutanSMScouldalsobesentto
than quantity. One home run
switchOFFtheengine.
is much better than two
SMSGateway:TosendandreceiveSMSforadvertisements.
doubles"
PrepaidElectricity:Thecustomercanrechargeprepaidelectricityby
Steve Jobs
sendinganSMSwitharechargecoupontoaprepaidelectricityrecharge
server.
Recent Posts
SendSMSPIC16F877AGPRSModuleInterfacing
Top Posts
Student
http://www.studentcompanion.co.za/post/InterfacingGSMModemwithPICMicrocontrollerMikroC 5/13
3/6/2015 StudentCompanion|InterfacingGSMModemwithPICMicrocontrollerMikroC
0 Companion
45 posts
Tweet
keshena
15 posts
Nam Trung
Dang
13 posts
Figure3:ConnectingtheSmartGM862BoardtoEasyPIC7V7
DevelopmentBoard
GSMCommands joynal
10 posts
TheATcommandsareusedtocontrolmodemswhicharecommunicatedthrough
serialcommunicationwithamicrocontrolleroraPC.ATistheabbreviationfor
ATtention.ThesecommandscomefromHayescommandsthatwereusedbythe
Hayessmartmodemsinlate1970s.TheHayescommandsstartedwithATto Post Tags
indicatetheattentionfromtheMODEMfollowedbyanumberofcharacters
specifyingthecommandtail.
7-Segment ADC C#
http://www.studentcompanion.co.za/post/InterfacingGSMModemwithPICMicrocontrollerMikroC 6/13
3/6/2015 StudentCompanion|InterfacingGSMModemwithPICMicrocontrollerMikroC
Step1:AT Newsletter
Thefirstcommandistosend"AT"thenenterifyouareusingacomputerorfroma
microcontroller,weshouldsendtheASCIIvalueforENTERwhichis0xDinHex. Subscribers 881
Thepurposeofthiscommandistotestthemicrocontrollerandwaitforaresponse Get notified when a new post
whichshouldbe:OK.Thiscommandcanbeusedtonegotiatethebaudrate,so is published.
thattheGSMmodulecansetitselftothesamebaudrateofthemicrocontroller.
Enter your e-mail
Tonegotiatebaudrate,sendATinawhile(1)loopuntilOKisreceived,thenyou
http://www.studentcompanion.co.za/post/InterfacingGSMModemwithPICMicrocontrollerMikroC 7/13
3/6/2015 StudentCompanion|InterfacingGSMModemwithPICMicrocontrollerMikroC
canproceedwithothercommands.TomakethingssimpleristosendATthenwait
forashortdelay,thenproceedasitexpectedthatOKshouldhavebeenreceivedin
thatshortdelay. Notify me
//
//Negotiatebaudrate
UART1_Write_Text("AT");//Send"AT"stringthenwaitforasho Join our facebook fan
rtdelay
UART_Write(0x0D);//TerminatationbyCR(ASCIIvalueofEnter page
inHex)
Delay_ms(100);//100milliseconddelay
Step2:AT0
Disableechosothatcharacterssentbythemicrocontrollerarenotechoedbackby
themodem
//
//Disablecommandecho
UART1_Write_Text("AT0");//Send"AT0"todisableechomode
UART_Write(0x0D);//TerminatationbyCR(ASCIIvalueofEnter
inHex)
Delay_ms(100);//100milliseconddelay
Step3:AT+CMGF=1
TherearetwomodesofsendingandreceivingSMSmessageswithATCommands:
TheTextmodeandthePDU(ProtocolDescriptionUnit)mode.InPDUmode,
theSMSissentinaseriesofhexadecimalstringofcharacters,atthereceivingend
thesehexadecimalstringofcharactershavetobedecodedtoextractthemessage
inareadableformat.InTextmode,theSMSissentlikethenormalSMSweare
usedtowithourcellphones.Thetextmessagecanconsistofalphanumeric
http://www.studentcompanion.co.za/post/InterfacingGSMModemwithPICMicrocontrollerMikroC 8/13
3/6/2015 StudentCompanion|InterfacingGSMModemwithPICMicrocontrollerMikroC
characterswithupto160characterslongwith7bitcodinganduptp140chaacters
in8bitcoding.
TosetthemodetoText,theATcommandis:AT+CMGF=1andtosetthemodeto
PDUthecommandis:AT+CMGF=0
//
//SetmessagetypeasTEXT
UART1_Write_Text("AT+CMGF=1");//Send"AT+CMGF=1"stringtose
tSMSmodetoTEXT
UART_Write(0x0D);//TerminatationbyCR(ASCIIvalueofEnter
inHex)
Delay_ms(100);//100milliseconddelay
Step4:AT+CMGS="0123456789"+theTextmessage
Settherecipientmobilephonenumberandthetextmessagetobesent.Afterthe
AT+CMGS="0123456789"command(Replacethe0123456789withacorrect
recipientcellphonenumber),themodemwillrespondwiththecharacter">",after
receivingthis">"thenthetextmessagecanbeentered,tomakethingssimpler,we
aregoingtousedagainashortdelayinsteadofwaitingforthe">".Attheendof
themessage,"CntrlZ"mustbeenteredtosendthemessage."CntrlZ"ASCII
valueis0x1AinHex.Letussend"HelloWorld"SMSto0123456789number.
//
//Sendmessage
UART1_Write_Text("AT+CMGS=\"0123456789\"");//Sendmessagetoc
ellnumber:0123456789(Enteryourcellphonenumberinsteadof
0123456789)
UART_Write(0x0D);//TerminatationbyCR(ASCIIvalueofEnte
rinHex)
UART1_Write_Text("HelloWorld");//Send"Helloworld"Textmessa
http://www.studentcompanion.co.za/post/InterfacingGSMModemwithPICMicrocontrollerMikroC 9/13
3/6/2015 StudentCompanion|InterfacingGSMModemwithPICMicrocontrollerMikroC
ge
UART_Write(0x1A);//Cntrl+Z(0x1AASCIIvalueofCntrl+Zin
Hex)
UART_Write(0x0D);//TerminatationbyCR(ASCIIvalueofEnter
inHex)
Privacy
Thatall!!!
Intheaboveexample,itisassumedthattheSMSservicecenternumberhas
alreadybeenprogrammedtotheSIMCard(Thisisnormallydonewithyournetwork
providerwhenanewSIMcardispurchased).TheATCommandtosettheSMS
servicecenternumberis:AT+CSCA
ItisalsoassumedthattheSIMcardhasnosecurityPINnumberassociatedwithit,
iftheSIMhasaPINnumber,usetheATcommandAT+CPINtoenterthePIN
number.
http://www.studentcompanion.co.za/post/InterfacingGSMModemwithPICMicrocontrollerMikroC 10/13
3/6/2015 StudentCompanion|InterfacingGSMModemwithPICMicrocontrollerMikroC
SendSMStoPhone
GSMGPRSModem
Interfacing
Related posts
Interfacing GSM Modem with PIC Microcontroller - XC8
A GSM modem is a wireless modem that works with a GSM wireless net
Jointhediscussion
http://www.studentcompanion.co.za/post/InterfacingGSMModemwithPICMicrocontrollerMikroC 11/13
3/6/2015 StudentCompanion|InterfacingGSMModemwithPICMicrocontrollerMikroC
Jointhediscussion
VineethCherupalathIllam 3daysago
Sircanutellhowtosendmessagewithuartdata?
i.eineedtosendgpsdatawhichisrecievedthroughhardware
uarttogsmwhichisconnectedtothesoftwareuart..
iusepic16f877a,soonlyoneuartisthere..henceioptsoftuart..
kindlyhelpme
Reply Share
Hi,ThisishowyousenddatawithSoftwareUART:
charsome_byte=0x0A
...
//WriteabyteviaSoftUART
Soft_UART_Write(some_byte)
Tolearnmore,pleasevisitthislink:
http://www.mikroe.com/download...
Reply Share
VineethCherupalathIllam>Student
Companion 3daysago
Hi,iknowitisthereinmikroChelp...btcantproceed
withtheexample,thatswhyi'mquering......
Reply Share
ALSOONSTUDENTCOMPANION WHAT'STHIS?
InterfacingLCDDisplayWith PICMicrocontrollerInterrupts
PICMicrocontrollerXC8 XC8
18commentsayearago 6comments6monthsago
http://www.studentcompanion.co.za/post/InterfacingGSMModemwithPICMicrocontrollerMikroC 12/13
3/6/2015 StudentCompanion|InterfacingGSMModemwithPICMicrocontrollerMikroC
18commentsayearago 6comments6monthsago
AlejandroVlezHenao StudentCompanionThanks
Hello,thanksforthetutorialsI
includedthexlcd.hlibrarybuti
getthiserror"error:(500)
undefined
InterfacingLCDDisplay AnalogtoDigitalConverterin
Flowcode PICMicrocontrollerXC8
1commentayearago 2commentsayearago
keshenaGreattutorial. StudentCompanionYouare
thanxguys welcome!
http://www.studentcompanion.co.za/post/InterfacingGSMModemwithPICMicrocontrollerMikroC 13/13