gsmpresentation-100808135055-phpapp02
TRANSCRIPT
-
8/18/2019 gsmpresentation-100808135055-phpapp02
1/22
Interfacing GSM Modem
With Microcontroller
By: Gaurav Arora
-
8/18/2019 gsmpresentation-100808135055-phpapp02
2/22
Building a Embeded system with ability to SendSms using an GSM modem.
b!ective
-
8/18/2019 gsmpresentation-100808135055-phpapp02
3/22
W"# $%W
Initiali&e system to set 'arameters fortransmission and interru't
System waits to be triggred using a sensor or
an manual E(ternal interru't li)e Switch. *etecting interru't Atmega +, -hec)s
availability of modem and tries to send SMS
using GSM Modem using A -ommands.
-
8/18/2019 gsmpresentation-100808135055-phpapp02
4/22
*efining Modules
System -onsist of three modules:
>Interru't *etection.
> Activating /SA" module ransmittingand "eceving *ata.
> Sending A commands to GSM Modem.
-
8/18/2019 gsmpresentation-100808135055-phpapp02
5/22
GSM M*EM
A GSM modem is a wireless modem that wor)swith a GSM wireless networ).
A commands are used to control modems.
'erations 0erformed by GSM Modem.
"eading1 writing and deleting SMS messages.
Sending SMS messages.
"eading1 writing and searching 'hone boo) entries.
GSM Modem *atasheet : ++223datasheet.'df inyour )it
-
8/18/2019 gsmpresentation-100808135055-phpapp02
6/22
-onfiuring GSM Modem
4 Insert SIM card: 0ress the yellow 'in to remove thetray from the SIM cardholder. insert SIM card
Connect RS232 Cable: 5-able 'rovided for "S262
communication7 *efault baud rate is 8,995using2997
with ;
-
8/18/2019 gsmpresentation-100808135055-phpapp02
7/22
Some erms
BA/* "AE
-
8/18/2019 gsmpresentation-100808135055-phpapp02
8/22
A commands
A is the abbreviation of Atention.
A commands are instructions used to control amodem.
A commands used to send SMS
A
-
8/18/2019 gsmpresentation-100808135055-phpapp02
9/22
Interfacing Modem withMicrocontroller
-
8/18/2019 gsmpresentation-100808135055-phpapp02
10/22
ut'ut of hy'er
-
8/18/2019 gsmpresentation-100808135055-phpapp02
11/22
/SA"
/SA" < /niversal synchronous and asynchronous receiverand transmitter.
Main "egisters /-S"A1/-S"B1/-S"-1/B""1/*"
/-S"( /SA" -ontrol and Status "egister A1B1-.
/B"" /SA" Baud rate "egister
/*" /SA" *ata "egister.
wo /*" /SA" register to transmit and receive to 'rovidefull du'le( mode.
Must "ead Status Bits before receiving or transmitting *ata5most im'ortant7
>- and ">- flags.
-
8/18/2019 gsmpresentation-100808135055-phpapp02
12/22
Initiali&ing/SA" module
-
8/18/2019 gsmpresentation-100808135055-phpapp02
13/22
Activating /SA" module5+7
we have to enable the /A" "eceiver andransmitter using bit ">E= and >E= in
/-S"B register
-
8/18/2019 gsmpresentation-100808135055-phpapp02
14/22
Activating /SA" module527
Bit 6 >E=: ransmitter Enable
Writing this bit to one enables the /SA" ransmitter. heransmitter will override nor
-
8/18/2019 gsmpresentation-100808135055-phpapp02
15/22
Activating /SA" module567
Setting Baud "ate:
Set values of /B""
-
8/18/2019 gsmpresentation-100808135055-phpapp02
16/22
/SA" initiali&ation code
/B""H@9(99
/B""% @ 5unsigned char7Baud"ate J Set thebaud rate J
/-S"B @ 9b999++999 enable transmitter andreciever
/-S"- @ 9b+9999++9 ; bit data1 no 'arity bit1
+ sto' bit.
-
8/18/2019 gsmpresentation-100808135055-phpapp02
17/22
/SA" ransmission
In /-S"A register Bit ? /*"E: /SA" *ata"egister Em'ty
he /*"E flag indicates if the transmit buffer 5/*"7 is
ready to receive new data. If /*"E is one1 the buffer is em'ty1 and therefore ready to
be written.
If /*"E is one 'ut data in the buffer.
-
8/18/2019 gsmpresentation-100808135055-phpapp02
18/22
0roblem with Baud rates
GSM modem su''orts a wide range of baudrates ++29
-
8/18/2019 gsmpresentation-100808135055-phpapp02
19/22
/SA" "E-E0I=
In /-S"A register bit L: Bit L ">-: /SA" "eceive-om'lete
his flag bit is set when there are unread data in thereceive buffer and cleared when thereceive buffer isem'ty 5i.e.1 does not contain any unread data7.
-
8/18/2019 gsmpresentation-100808135055-phpapp02
20/22
Interru't *etection
-ode sni'lets used to set Interru't.
GI-" @ 9(9 enable e(ternal interru't 9
M-/-" @ 9(92 activate e(ternal interru't9 5on 'in+,7it recogni&es rising edge
sei57set enable interru'ts.
If e(ternel interru'ts is 'rovided to system then controlgoes to interru't handler and set a flag variable to one.
And send the reKuired Sms.
-
8/18/2019 gsmpresentation-100808135055-phpapp02
21/22
Have a loo) on codeNN Any OuestionsPP
-
8/18/2019 gsmpresentation-100808135055-phpapp02
22/22
han) QouN