Você está na página 1de 55

SMART SMS SERVICE

A Mini- Project Report


Submitted in Partial Fulfillment of
The Requirements for the Award of the Degree of
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted by
M.H.S.Sho!i "#E$%A"&'( R.)yothi!m*yi "#E$%A"&'+
B.Bh*,*-i "#E$%A"&"# S.R*.*/e0h*! "#E$%A"&&%
U-de! the E/teemed Guid*-1e o2
A//o1i*te 3!o2. M/. $ .Su4o1h*-*5 M. Te1h
E4e1t!o-i1/ *-d Commu-i1*tio- E-6i-ee!i-6
Abdu4 $*4*m I-/titute o2 Te1h-o4o6i1*4 S1ie-1e/
7A22i4i*ted to )NTUH5 Hyde!*b*d8
$oth*6udem 9 +"# %'+5 ESTD : '""#

Abdu4 $*4*m I-/titute o2 Te1h-o4o6i1*4 S1ie-1e/
De3*!tme-t o2 E4e1t!o-i1/ *-d Commu-i1*tio- E-6i-ee!i-6
CERTIFICATE
This is to certify that this mini-project entitled ;SMART SMS SERVICE< is the
bonafide record of work done by
M.H.S.Sho!i "#E$%A"&'( R.)yothi!m*yi "#E$%A"&'+
B.Bh*,*-i "#E$%A"&"# S.R*.*/e0h*! "#E$%A"&&%
Under My Guidance and Supervision and Submitted in Partial Fulfillment of the e!uirements for
the "ward of the #e$ree of B*1he4o! o2 Te1h-o4o6y in E4e1t!o-i1/ *-d Commu-i1*tio-
E-6i-ee!i-6 %y )**h*!4*4 Neh!u Te1h-o4o6i1*4 U-i,e!/ity Hyde!*b*d.
=!o2. G. R*.*i*h5 A//o1i*te =!o2.$.Su4o1h*-*5
He*d o2 the de3*!tme-t5 I-te!-*4 Guide.
E4e1t!o-i1/ *-d Commu-i1*tio- E-6i-ee!i-6.



AC$NO>LEDGEMENT
>e *!e 6!e*t4y i-debted to Si!</5 =!o2. M/.$.Su4o1h*-* I-te!-*4 6uide 5 A//t. =!o2.
M!. =. Mi1h*e4 Co44i-/ Coo!di-*to!5 A//t. =!o2. M!. N. Vi/h-u,*!dh*- *-d L*b Te1h-i1i*-
M/. $. S*thi i- E4e1t!o-i1/ *-d Commu-i1*tio- E-6i-ee!i-6 de3*!tme-t? ithout hom
thi/ 3!o.e1t mi6ht h*,e -ot t*0e 0-o4ed6e5 ith th*-0/ 2o! *44 the ,*4u*b4e he43 !e-ded by
the 2*1u4ty o2 the De3*!tme-t o2 E4e1t!o-i1/ *-d Commu-i1*tio- E-6i-ee!i-6.
>e *!e th*-02u4 to ou! =!i-1i3*4 D!. M. )*-*!dh*-5 Se1!et*!y @ 1o!!e/3o-de-t S!i
L-. Ch*,* L*Ami N*!*y*-* *-d M*-*6eme-t o2 Abdu4 $*4*m I-/titute o2 Te1h-o4o6i1*4
S1ie-1e/ 2o! 3!o,idi-6 the be/t 2*1i4itie/ to m*0e ou! mi-i 3!o.e1t * /u11e//.
>e *!e 6!*te2u44y *10-o4ed6ed the u/e2u4 1omme-t/ *-d ,*4u*b4e /u66e/tio-/
6i,e- by ou! de3*!tme-t te*1hi-6 *-d -o-9te*1hi-6 2*1u4ty5 e/3e1i*44y S!i A. S!i-i,*/* R*o
Lib!*!i*- *-d e th*-0 ou! 2!ie-d/ ho he43ed u/ di!e1t4y o! i-di!e1t4y i- the time4y
1om34etio- o2 ou! 3!o.e1t.
>e *10-o4ed6e ith th*-0/ 2o! *44 the ,*4u*b4e he43 *-d /u33o!t !e-ded by S!i
=!o2. G. R*.*i*h5 He*d o2 the De3*!tme-t o2 E4e1t!o-i1/ *-d 1ommu-i1*tio- E-6i-ee!i-6.
M.H.S.Sho!i
R.)yothi!m*yi
B.Bh*,*-i
S.R*.*/e0h*!
CONTENTS




%8 ABSTRACT
'8 INTRODUCTION
&'() *+ST,- ,F GSM
&'&) #+FF../0. %.T1../ GSM "/# 0#M"
&'2) SMS 3S*,T M.SS"G. S.4+0.8
B8 INTRODUCTION TO MICRO CONTROLLER
2'() %,05 #+"G"M .6P7"/"T+,/
2' &) M+0, 0,/T,77. 89:(
2'2) 70# 37+;U+# 0-ST"7 #+SP7"-)
&8 LCD INTERFACING
+8 LIST OF =ROGRAMS
C8 CONCLUSION
#8 BIBLOGRA=HY

ABSTRACT



+n doin$ our mini project <SMART SMS SERVICES= used GSM techni!ue' The main
parts of the mini project are 89:( micro controller> GSM module> Ma?-&2&> keyboard and 70#
display' The main objective of this mini project is to perform operations like <Send messa$es> ead
messa$es and delete messa$es= in our messa$e bo?'
The 89:( microcontroller is heart of the circuit' This mini project works on the 89:(
micro controller' The main function of the 89:( micro controller is it controls the over all functions
of the circuit' +t is a @9 pin #+P packa$e' +t has @ ports namely port9> port(> port&> port2'
The other main module of the mini project is GSM'GSM stands for Global System for
Mobile 0ommunication'GSM module is a communication device' +t re!uires :4 #0 power
supply'Ma?-&2& used for communicate our GSM module and 89:( controller' +n this project we are
usin$ .mbedded usin$ 5eil software' %y usin$ the Flash Ma$ic software the embedded pro$rams
are dumped into microcontroller 89:('
%y usin$ this miniproject we can perform operations like <Send messa$es> ead messa$es
and delete messa$es= in our messa$e bo?' These are the features of our project' ,ur future
advancement is to attendin$ calls and in security alerts' These are the future advancements


LIST OF FIGURESD



Fi6u!e %D B4o10 di*6!*m @ GSM *-te--*EEEEEEEEEEE
Fi6u!e 'D Sim34e 1i!1uit 2o! /*2e !e/etEEEEEEEEEEEE..
Fi6u!e BD H*!,*!d A!1hite1tu!eEEEEEEEEEEEEEEEE
Fi6u!e &D '"F& LiGuid C!y/t*4 Di/34*yEEEEEEEEEEEEE
Fi6u!e +D S1*- 1ode 2o! i-di,idu*4 0ey/EEEEEEEEEEEE.
Fi6u!e CD S1*- 1ode 2o! eAte-ded 0eybo*!d @ -ume!i1 0ey3*dEEE
Fi6u!e #D GSM /m*!t modemEEEEEEEEEEEEEEEE..
INTRODUCTION



*istory of GSM
#urin$ the early (A89s> analo$ cellular telephone systems were e?periencin$ rapid
$rowth in .urope> particularly in Scandinavia and the United 5in$dom> but also in France and
Germany' .ach country developed its own system> which was incompatible with everyone elseBs in
e!uipment and operation' This was an undesirable situation> because not only was the mobile
e!uipment limited to operation within national boundaries> which in a unified .urope were
increasin$ly unimportant> but there was also a very limited market for each type of e!uipment> so
economies of scale and the subse!uent savin$s could not be realiCed'
The .uropeans realiCed this early on> and in (A8& the 0onference of .uropean Posts and
Tele$raphs 30.PT) formed a study $roup called the Groupe SpDcial Mobile 3GSM) to study and
develop a pan-.uropean public land mobile system'
The proposed system had to meet certain criteriaE
Good subjective speech !uality
7ow terminal and service cost
Support for international roamin$
"bility to support handheld terminals
Support for ran$e of new services and facilities
Spectral efficiency
+S#/ compatibility
+n (A8A> GSM responsibility was transferred to the .uropean Telecommunication Standards
+nstitute 3.TS+)> and phase + of the GSM specifications were published in (AA9' 0ommercial
service was started in mid-(AA(> and by (AA2 there were 2F GSM networks in && countries'
"lthou$h standardiCed in .urope> GSM is not only a .uropean standard' ,ver &99 GSM networks



3includin$ #0S(899 and P0S(A99) are operational in ((9 countries around the world' +n the
be$innin$ of (AA@> there were ('2 million subscribers worldwide> which had $rown to more than ::
million by ,ctober (AAG'1ith /orth "merica makin$ a delayed entry into the GSM field with a
derivative of GSM called P0S(A99> GSM systems e?ist on every continent> and the acronym GSM
now aptly stands for Global System for Mobile communications'
The developers of GSM chose an unproven 3at the time) di$ital system> as opposed to the
then-standard analo$ cellular systems like "MPS in the United States and T"0S in the United
5in$dom' They had faith that advancements in compression al$orithms and di$ital si$nal
processors would allow the fulfillment of the ori$inal criteria and the continual improvement of the
system in terms of !uality and cost' The over 8999 pa$es of GSM recommendations try to allow
fle?ibility and competitive innovation amon$ suppliers> but provide enou$h standardiCation to
$uarantee proper interworkin$ between the components of the system' This is done by providin$
functional and interface descriptions for each of the functional entities defined in the system
DIFFERENCES BET>EEN GSM AND CDMA
+n cellular service there are two main competin$ network technolo$iesE Global System for
Mobile 0ommunications 3GSM) and 0ode #ivision Multiple "ccess 30#M")' 0ellular carriers
includin$ Sprint P0S> Sin$ular 1ireless> 4ersion and T-Mobile use one or the other' Understandin$
the difference between GSM and 0#M" will allow you to choose a carrier that uses the preferable
network technolo$y for your needs'



The GSM "ssociation is an international or$aniCation founded in (A8G> dedicated to
providin$> developin$> and overseein$ the worldwide wireless standard of GSM' 0#M"> a
proprietary standard desi$ned by ;ualcomm in the United States> has been the dominant network
standard for /orth "merica and parts of "sia' *owever> GSM networks continue to make inroads
in the United States> as 0#M" networks make pro$ress in other parts of the world' There are
camps on both sides that firmly believe either GSM or 0#M" architecture is superior to the other'
That said> to the non-invested consumer who simply wants bottom line information to make a
choice> the followin$ considerations may be helpful'
D*t* T!*-/2e! S3eedE 1ith the advent of cellular phones doin$ double and triple duty as streamin$
video devices> broadcast receivers and email devices> speed is important to those who use the
phone for more than makin$ calls' 0#M" has been traditionally faster than GSM> thou$h both
technolo$ies continue to rapidly leapfro$ alon$ this path' %oth boast H2GH standards> or 2rd
$eneration technolo$ies
Sub/1!ibe! Ide-tity Modu4e 7SIM8 1*!d/E +n the United States only GSM phones use S+M cards'
The removable S+M card allows phones to be instantly activated> interchan$ed> swapped out and
up$raded> all without carrier intervention' The S+M itself is tied to the network> rather than the
actual phone' Phones that are card-enabled can be used with any GSM carrier' The 0#M"
e!uivalent> a -U+M card> is only available in parts of "sia but remains on the horiCon for the U'S'
market' 0#M" carriers in the U'S' re!uire proprietary handsets that are linked to one carrier only
and are not card-enabled To up$rade a 0#M" phone> the carrier must deactivate the old phone then
activate the new one' The old phone becomes useless
Ro*mi-6E For the most part> both networks have fairly concentrated covera$e in major cities and
alon$ major hi$hways' GSM carriers> however> have roamin$ contracts with other GSM carriers>
allowin$ wider covera$e of more rural areas> $enerally speakin$> often without roamin$ char$es to



the customer' 0#M" networks may not cover rural areas as well as GSM carriers> and thou$h they
may contract with GSM cells for roamin$ in more rural areas> the char$e to the customer will
$enerally be si$nificantly hi$her'
I-te!-*tio-*4 Ro*mi-6E +f you need to make calls to other countries> a GSM carrier can offer
international roamin$> as GSM networks dominate the world market' +f you travel to other
countries you can even use your GSM cell phone abroad> providin$ it is a !uad-band phone
38:9IA99I(899I(A99 M*C)' %y purchasin$ a S+M card with minutes and a local number in the
country you are visitin$> you can make calls a$ainst the card to save yourself international roamin$
char$es from your carrier back home' 0#M" phones that are not card-enabled do not have this
capability' "ccordin$ 0#G'or$> 0#M" networks support over &G9 million subscribers worldwide>
while GSM'or$ tallies up their score at over ( billion' "s 0#M" phones become -U+M enabled
and roamin$ contracts between networks improve> inte$ration of the standards mi$ht eventually
make differences all but transparent to the consumer'
The chief GSM carriers in the United States are 0in$ular 1ireless> recently mer$ed with "TJT
1ireless> and T-Mobile US"' Major 0#M" carriers are Sprint P0S> 4ersion and 4ir$in Mobile'
There are also several smaller cellular companies on both networks'
SMS 7Sho!t Me//*6e Se!,i1e8D
SMS is an acronym standin$ for Short Messa$e Service' +t is commonly referred to as te?t
messa$in$ or <te?tin$= as well' SMS is a method by which messa$es can be sent to a cell phone via
another cell phone> a computer connected to the +nternet> a re$ular land line> or a handheld device
such as a %lackberry' The ori$inal specifications for SMS were developed in (A8:> thou$h real
implementation and popularity took nearly a decade to achieve'



SMS messa$es may be sent either from one point to another point> or may be sent to all devices
within a specific $eo$raphical re$ion' The former> known as SMS-PP> is used primarily between
individuals communicatin$ with one another> while the latter> known as SMS-0%> may be used to
broadcast public announcements such as road or weather conditions> re$ion-specific advertisin$
messa$es> or messa$es from a cell provider re$ardin$ the new covera$e area'
SMS use for personal communication is rapidly increasin$ in popularity' +n &999> less than &9
billion SMS messa$es were sentK by &99@ that number had $rown to in e?cess of :99 billion
messa$es' The lar$est market for SMS is Southeast "sia> with .urope just behind' The United
States has seemed to be a slow adopter for the early years of the &(st century> but the pace of
te?tin$ appears to be increasin$ in the United States as service providers make its use> particularly
between networks> easier'
1ith this sur$e in popularity and use> particularly amon$ youn$er users> new shorthands have
developed to communicate more rapidly throu$h the medium' This shorthand mirrors in many way
the writin$ style of online chat> droppin$ vowels and superfluous letters> and replacin$ words and
entire sounds with representative numbers or sin$le letters' "n e?ample mi$ht read somethin$ like>
<how r UL= to mean> <*ow are youL= or> <did u c wut he asd me & doL @ shmeM= to mean> <#id you see
what he asked me to doL For shameM= Given the limitations of a smaller keypad> with multiple clicks
re!uired for many letters> such shorthand saves lar$e amounts of time over the course of multiple SMS
messa$es'
+n addition to person-to-person communication via SMS> a number of television shows have be$un
acceptin$ te?t messa$es for various purposes' Shows which have a votin$ system> such as
"merican +dol> have be$un inte$ratin$ SMS votin$> allowin$ viewers to easily make their choices
usin$ only their cell phone' +n .urope> the idea has been pushed even further> with shows that allow
viewers to control characters on screen usin$ their cell phoneNs SMS capabilities'



Some online services> most notably Goo$le> have inte$rated SMS capability to allow for the easy
retrieval of information throu$h oneNs cell phone' %y te?tin$ a special number> for e?ample> a cell
phone user may receive information ran$in$ from local weather> to sport scores> to where the
nearest bus station is in their town' +n addition to such re$ional information> services like Goo$le
SMS can also be used to !uickly find the definition of a word> to convert one unit of measure to
another> or to answer trivia !uestions' Usin$ SMS> one can in essence access the vast informational
resources of the +nternet usin$ only a cell phone'
INTRODUCTION TO MICRO CONTROLLER
Micro controller is the heart of total system' The micro controller controls all the devices
connected in the dia$ram' Micro controller sends pulses to all the devices> which are connected to
it' 1e can pro$ram it in any lan$ua$e i'e'> in assembly or 0 or 0OO> dependin$ upon the user' +n
this flash memory is more compatible with others' +n our desi$n> this controller is compatible and
also reliable one'



B4o10 di*6!*mD

GSM ANTENNAD


GSM
A-te--
*
Atme4H=hi44i3
Mi1!o Co-t!o44e!
I"+%
G=S
!e1ei,e!
L'(BD
d!i,e!
LCD
di/34*y
EE=ROM
GSM Neto!0
=!o,ide!
BSNLHAi!Te4HHut1
h


!"#$ D%A&RAM '(P!A)AT")*
The above fi$ure shows the GSM SM"T SMS M,#U7. block dia$ram' +t mainly
consists
(' Micro controller
&' GSM Modem
2' 70# Module
@' P0 5eyboard
:' P,1. Supply Unit
Mi1!o Co-t!o44e! I(C+%D
"T8A0:( Micro 0ontroller contains ('@ kilobytes of ,M ' &'(&8 bytes of "M 3SF
re$isters included) can satisfy the basic needs> but is not really astoundin$' 2'@ ports totalin$ 2& +I,
lines are usually sufficient' ,bviously> 89:( confi$uration is intended to satisfy the need of
pro$rammers developin$ the controllin$ devices and instruments' This is one part of its key to
success> meant for the avera$e user also' The other clue can be found in the or$aniCation of "M>
0entral Processor Unit 30PU)> and ports - all of which ma?imally utiliCe the available resources



and allow further up$rades' Pins ,n The 0aseE (-8E Port (K .ach of these pins can be used as either
input or output accordin$ to your needs' "lso> pins ( and & 3P('9 and P('() have special functions
associated with Timer' AE eset Si$nalK hi$h lo$ical state on this input halts the M0U and clears all
the re$isters' %rin$in$ this pin back to lo$ical state Cero starts the pro$ram new as if the power had
just been turned on' +n another words> positive volta$e impulse on this pin resets the M0U'
#ependin$ on the deviceBs purpose and environs> this pin is usually connected to the push-button>
reset-upon-start circuit or a brown out reset circuit 3covered in the previous chapter)' The ima$e
shows one simple circuit for safe reset upon startin$ the controller' +t is utiliCed in situations when
smal volta$e' (9-(GE Port 2K as with Port (> each of these pins can be used as universal input or
output' *owever> powerfailstoreachitsopti each pin of Port 2 has an alternative functionE Pin (9E
6# - serial input for asynchronous communication or serial inputIoutput for synchronous
communication' Pin ((E T6# - serial output for asynchronous communication or clock output for
synchronous communication Pin (&E +/T9 - input for interrupt 9 Pin (2E +/T( - input for interrupt
( Pin (@E T9 - clock input of counter 9 Pin (:E T( - clock input of counter ( Pin (FE 1 - si$nal for



writin$ to e?ternal 3add-on) "M memory Pin (GE # - si$nal for readin$ from e?ternal "M
memory' (8-(AE 6& and 6(K +nput and output of internal oscillator' ;uartC crystal controllin$ the
fre!uency commonly connects to these pins' 0apacitances within the oscillator mechanism 3see the
ima$e) are not critical and are normally about 29pF' +nstead of a !uartC crystal> miniature ceramic
resonators can be used for dictatin$ the pace' +n that case> manufacturers recommend usin$
somewhat hi$her capacitances 3about @G puff)' /ew Mucus works at fre!uencies from 9*C to
:9M*CO'
&9E G/#K Ground &(- &8E Port &K if e?ternal memory is not present> pins of Port & act as universal
inputIoutput' +f e?ternal memory is present> this is the location of the hi$her address byte> i'e' addresses
"8 - "(:' +t is important to note that in cases when not all the 8 bits are used for addressin$ the memory
3i'e' memory is smaller than F@k%)> the rest of the unused bits are not available as inputIoutput' &AE
PS./K M0U activates this bit 3brin$s to low state) upon each readin$ of byte 3instruction) from
pro$ram memory' +f e?ternal ,M is used for storin$ the pro$ram> PS./ is directly connected to its
control pins' of the e?ternal memory> M0U sends the lower byte of the address re$ister 3addresses "9 -
"G) to port P9 and activates the output "7.' .?ternal re$ister 3G@*0T2G2 or G@*0T2G: circuits are
common)> memoriCes the state of port P9 upon receivin$ a si$nal from "7. pin> and uses it as part of
the address for memory chip' #urin$ the second part of the mechanical M0U cycle> si$nal on "7. is
off> and port P9 is used as Data Bus' +n this way> by addin$ only one cheap inte$rated circuit> data from
port can be multiple?ed and the port simultaneously used for transferrin$ both addresses and data' 2(E
."K %rin$in$ this pin to the lo$ical state Cero 3mass) desi$nates the ports P& and P2 for transferrin$
addresses re$ardless of the presence of the internal memory' This means that even if there is a pro$ram
loaded in the M0U it will not be e?ecuted> but the one from the e?ternal ,M will be used instead'
0onversely> brin$in$ the pin to the hi$h lo$ical state causes the controller to use both memories> first
the internal> and then the e?ternal 3if present)' 2&-2AE Port 9K Similar to Port &> pins of Port 9 can be
used as universal inputIoutput> if e?ternal memory is not used' +f e?ternal memory is used> P9 behaves
as address output 3"9 - "G) when "7. pin is at hi$h lo$ical level> or as data output 3#ata %us) when



"7. pin is at low lo$ical level' @9E 400K Power O:4 +nput - ,utput 3+I,) Ports .very M0U from 89:(
families has @ +I, ports of 8 bits each' This provides the user with 2& +I, lines for connectin$ M0U to
the environs' Unlike the case with other controllers> there is no specific SF re$ister for desi$natin$
pins as input or output' +nstead> the port itself is in char$eE 9Poutput> (Pinput' +f particular pin on the
case is needed as output> the appropriate bit of +I, port should be cleared' This will $enerate 94 on the
specified controller pin' Similarly> if particular pin on the case is needed as input> the appropriate bit of
+I, port should be set' This will desi$nate the pin as input> $eneratin$ O:4 as a side effect 3as with
every TT7 input)' =o!t "D Port 9 has two-fold roleE if e?ternal memory is used> it contains the lower
address byte 3addresses "9-"G)K otherwise all bits of the port are either input or output' "nother feature
of this port comes to play when it has been desi$nated as output' Unlike other ports> Port 9 lacks the
Hpull upH resistor 3resistor with O:4 on one end)' This seemin$ly insi$nificant chan$e has the followin$
conse!uencesE 1hen desi$nated as input> pin of Port 9 acts as hi$h impedance offerin$ the infinite input
resistance with no HinnerH volta$e' 1hen desi$nated as output> pin acts as Hopen drainH' 0learin$ a port
bit $rounds the appropriate pin on the case 394)' Settin$ a port bit makes the pin act as hi$h impedance'
Therefore> to $et positive lo$ic 3:4) at output> e?ternal Hpull upH resistor needs to be added for
connectin$ the pin to the positive pole' Therefore> to $et one 3:4) on the output> e?ternal Hpull upH
resistor needs to be added for connectin$ the pin to the positive pole' =o!t %D This is HtrueH +I, port>
dual function characteristic is observed for Port(' *avin$ the Hpull upH resistor> Port ( is fully
compatible with TT7 circuits' =o!t 'D 1hen usin$ e?ternal memory> this port contains the hi$her
address byte 3addresses "8-"(:)> similar to Port 9' ,therwise> it can be used as universal +I, port' =o!t
BD %eside its role as universal +I, port> each pin of Port 2 has an alternate function' +n order to use one
of these functions> the pin in !uestion has to be desi$nated as input> i'e' the appropriate bit of re$ister P2
needs to be set' From a hardware standpoint> Port 2 is similar to Port 9' "s can be seen from the
individual descriptions of the ports> they all share hi$hly similar structure' *owever> you need to
consider which task should be assi$ned to which port' For e?ampleE if utiliCin$ port as output with hi$h
level 3:4)> avoid usin$ Port 9> as its pins cannot produce hi$h lo$ical level without an additional



resistor connected to O:4' +f usin$ other port to a same end> bear in mind that built-in resistors have
relatively hi$h values> producin$ the currents limited to few hundreds of amperes as pin output'
Memo!y U-de! The M*6-i2ie!D
#urin$ the runtime> micro controller uses two different types of memoryE one for holdin$ the
pro$ram bein$ e?ecuted 3,M memory)> and the other for temporary stora$e of data and au?iliary
variables 3"M memory)' #ependin$ on the particular model from 89:( family> this is usually few
kilobytes of ,M and (&8I&:F bytes of "M' This amount is built-in and is sufficient for common
tasks performed HindependentlyH by the M0U' *owever> 89:( can address up to F@5% of e?ternal
memory' These can be separate memory blocks> 3separate "M chip and ,M chip) totalin$ (&85% of
memory on M0U> which is a real pro$rammin$ body' ROM memo!yD First models from 89:( family
lacked the internal pro$ram memory> but it could be added e?ternally in a form of a separate chip' This
Mucus can be reco$niCed by their mark> which be$ins with 892 3e'$' 892( or 892&)' /ew models have
built-in ,M> althou$h there are substantial variations' 1ith some models internal memory cannot be
pro$rammed directly by the user' +nstead> the user needs to precede the pro$ram to the manufacturer> so
that the M0U can be pro$rammed 3masked) appropriately in the process of fabrication' ,bviously> this
option is cost-effective only for lar$e series' Fortunately> there are M0U models ideal for
e?perimentation and small specialiCed series' Many manufacturers deliver controllers that can be
pro$rammed directly by the user' These come in a ceramic case with an openin$ 3.P,M version) or
in a plastic case without an openin$ 3..P,M version)' This book deals with one of the latter models
that can be pro$rammed via simple pro$rammer> even if the chip has already been mounted to the
desi$nated device' RAM memo!yD "s previously stated> "M is used for storin$ temporary data and
au?iliary results $enerated durin$ the runtime' "part from that> "M comprises a number of re$istersE
hardware counters and timers> +I, ports> buffer for serial connection> etc' 1ith older versions> "M
spanned &:F locations> while new models feature additional (&8 re$isters' First &:F memory
locations form the basis of "M 3addresses 9 - Fifth) of every 89:( M0U' 7ocations that are



available to the user span addresses from 9 to GFh> i'e' first (&8 re$isters> and this part of "M is
split into several blocks as can be seen in the below ima$e' First block comprises @ HbanksH of 8
re$isters each> marked as 9 - G' To address these> the parent bank has to be selected' Second memory
block 3ran$e &9h - &Fh) is bit-addressable> meanin$ that every belon$in$ bit has its own address 39 to
GFh)' Since the block comprises (F of these re$isters> there is a total of (&8 addressable bits' 3%it 9 of
byte &9h has bit address 9> while bit G of byte &Fh has bit address GFh)' Third is the $roup of available
re$isters at addresses &Fh - GFh 3total of 89 locations) without special features or a preset purpose'
EAt!* Memo!y B4o10D To satisfy the pro$rammersB ever-increasin$ demands for "M> latest 89:(
models were added an e?tra memory block of (&8 locations' %ut it is not all that simple''' The problem
lies in the fact that the electronics> which addresses "M> employs ( byte 38 bits)> reachin$ only the
first &:F locations' Therefore> a little trick had to be applied in order to keep the e?istin$ 8-bit
architecture for the sake of compatibility with older models' The idea is to make the additional memory
block share the addresses with the e?istent locations intended for SF re$isters 389h - Fifth)' For
distin$uishin$ these two physically separate memory areas> #ifferent methods of addressin$ are usedE if
SF re$isters are in !uestion> direct addressin$ is usedK for e?tra "M locations> indirect addressin$ is
used' Memo!y EA3*-di-6D +n case the built-in amount of memory 3either "M or ,M) is not
sufficient for your needs> there is always an option of addin$ two e?ternal F@5% memory chips' 1hen
added> they are addressed and accessed via +I, ports P& and P2' From userBs point of view itBs all
very simple> because if properly connected most of the job is carried out automatically by M0U'
89:( M0U has two separate read si$nals> #Q 3P2'G) and PS./Q' The first one is active when
readin$ byte from the e?ternal data memory 3"M)> and the second one is active when readin$
byte from the e?ternal pro$ram memory 3,M)' %oth si$nals are active on low lo$ical level' The
followin$ ima$e shows a typical scheme for such e?pansion usin$ separate chips for "M and



,M> known as Harvar architecture'


Memory can be also mapped as a sin$le block> functionin$ as both data memory and pro$ram memory
simultaneously' This approach is known as Von Neumann architecture' To be able to read the same
block usin$ #Q or PS./Q> these two si$nals were combined via lo$ical "/#' +n this way> output of
"/# circuit is low if any of the two inputs is low' Usin$ the *arvard architecture effectively #oubles
M0U memory> but thatBs not the only advanta$e offered by the method' 5eepin$ the pro$ram code
separated from the data makes the controller more reliable since there is no writin$ to the pro$ram



memory' SFR Re6i/te!/ 7S3e1i*4 Fu-1tio- Re6i/te!/8D SF re$isters can be seen as a sort of control
panel for mana$in$ and monitorin$ the micro controller' .very re$ister and each of the belon$in$ bits
has its name> specified address in "M and strictly defined role' "lthou$h there are (&8 available
memory slots for allocatin$ SF re$isters> the basic core shared by 89:( Mucus has && re$isters' The
rest has been left open intentionally to allow future up$rades while retainin$ the compatibility with
earlier models' This fact makes possible to use pro$rams developed for obsolete models lon$ a$o'
LiGuid C!y/t*4 Di/34*y JLCDKD
1e e?amine an intelli$ent 70# display of two lines> &9 characters per line> that is interfaced
with the 89:('The protocol for the display is as shown'
The display contains two internal byte-wide re$isters> one for commands 3SP9) and the second for
characters to be displayed 3SP()' +t also contains a user-pro$rammed "M area 3the character "M)
that can be pro$rammed to $enerate any desired character that can be formed usin$ a dot matri?' To
distin$uish between these two data areas> the he? command byte 89 will be used to si$nify that the
display "M address 99h will be chosen Port( is used to furnish the command or data type> and ports
2'& to2'@ furnish re$ister select and readIwrite levels'
The display takes varyin$ amounts of time to accomplish the functions as listed' 70# bit G is
monitored for lo$ic hi$h 3busy) to ensure the display is overwritten' " sli$htly more complicated 70#
display 3@ linesR@9 characters) is currently bein$ used in medical dia$nostic systems to run a very
similar pro$ram'
!iquid #r+stal Displa+


Gn
d
O:
v
4d
d
" 5
% ' B %+ %C



& + C # I ( %" %% %' %B %&



&9?@ 7i!uid 0rystal #isplay
S I
w
.n
#9
9#
F
9
#& #2 #: #G #F #@ #(


LCD Comm*-d/ De/1!i3tio-
S I1 #G #F #: #@ #2 #& #( #9 Function

9 9 9 9 9 9 9 9 9 ( 0lear 70# and memory> home
cursor
9 9 9 9 9 9 9 9 ( 9 0lear and home cursor only
9 9 9 9 9 9 9 ( (I9 S Screen action as display character
written
SP(I9EShift screenIcursor
+I,P(I9Ecursor I7> screen 7I
9 9 9 9 9 9 ( # 0 % #P(I9EScreen onIoff
0P(I9E0ursor onIoff
%P(I9E0ursor blinkIno blink
9 9 9 9 9 ( SI0 I7 9 9 SI0E (I9EscreenI0ursor
I7E Shift one space I7
9 9 9 9 ( #7 / F 9 9 #7P(I9E8I@ %its per 0haracter
/P(I9K &I( ows of 0haracters
FP(I9K:R(9I:RG#otsI0haracter
9 9 9 ( 0haracter address 1rite to character "M address
after this
9 9 ( #isplay data address 1rite to display "M address after
this
9 ( %F 0urrent address %FP(I9EbusyI/otbusy
( 9 0haracter type 1rite byte to last "M chosen
( ( 0haracter type ead byte from last "M chosen


#9
9#
F
9
#(


Se!i*4 1ommu-i1*tio-D
+n order to connect micro controller or a P0 to GSM modem a serial port is used' Serial> is a very
common protocol for device communication that is standard on almost every P0' Most computers
include S-&2& based serial ports' Serial is also a common communication protocol that is used by
many devices for instrumentation' +n serial communication> the data is sent one bit at a time where as in
parallel communicationK the data is sent a byte or more at time' Serial communication uses a sin$le data
line where as the parallel communication uses 8 bit data line> this makes serial communication not only
ine?pensive but also makes it possible for two computers located in two different cities to communicate
over the telephone'
Serial data communication uses two methods> asynchronous and synchronous' The synchronous
method transfers a block of data at a time while the asynchronous transfers a sin$le byte at a time' The
89:( has a in built U"T 3Universal "synchronous eceiver-Transmitter)' Typically> serial is used to
transmit "S0++ data' 0ommunication is completed usin$ 2 transmission linesE 3() Transmitter> 3&)
eceiver and 32) Ground' Since serial is asynchronous> the port is able to transmit data on one line
while receivin$ data on another' ,ther lines are available for handshakin$> but are not re!uired' The
important characteristics are #ata Transfer ate> Start and Stop bits> #ata bits and Parity bits' For two
ports to communicate> these parameters must match'
D*t* T!*-/2e! R*teD
The rate of data transfer in serial data communication is stated in bps 3bits per second)' "nother
widely used terminolo$y for bps is baud rate' *owever the baud rate and bps are not necessarily e!ual'
%aud rate is defined as the number of si$nal chan$es per second' +n modems> there are occasions when



a sin$le chan$e of si$nal transfers several bits of data "s far as conductor wire is considered bps and
baud rate is the same'
D*t* Fo!m*ti-6D
"synchronous serial data communication is used for character oriented transmissions> each character is
placed in between start and stop bits' This is called framin$ '+n data framin$ for asynchronous
communications> the data> such as "S0++ characters> are packed in between a start bit (3hi$h)' Since the
data is clocked across the lines and each device has its own clock> it is possible for the two devices to
come out sli$htly out of synchronous' Therefore> the stop bits not only indicate the end of transmission
but also $ive the computers some room for error in clock speeds 'The more the stop bits the $reater the
lenience in synchroniCin$ the different clocks> but slower the data transmission rate'
=*!ity Bit/D
+n order to maintain data inte$rity> parity bit of the character byte is included in the data frame 'The
parity bit is odd or even '+n the case of an odd parity bit the number of data bits> includin$ the
parity bits has an odd number of (Ns'Similarly> in an even parity bit system the total number of bits>
includin$ the parity bits has an even number of (Ns'U"T chips allow pro$rammin$ of the parity
bit for odd-> even- and no- parity options'
RS'B' STANDARDD
To allow compatibility amon$ data communication e!uipment made by various Manufacturers> an
interfacin$ standard called S&2& was set by the .lectronics and +ndustries "ssociation in (AF9'Today>
S&2& is the most widely used serial +I, interfacin$ standard' S&2& standard is not TT7 compatibleK
therefore it re!uires a line driver such as M"6&2&chip to convert S&2& volta$e levels to TT7 levels



and vice versa' ,ne advanta$e of the M"6 &2& chip is that it uses O:4 power source> which is the
same as the source volta$e for the 89:('
S1*- Code/ D
The dia$ram below shows the Scan 0ode assi$ned to the individual keys' The Scan code is shown on
the bottom of the key' .'$' The Scan 0ode for .S0 is GF' "ll the scan codes are shown in *e?'



"s you can see> the scan code assi$nments are !uite random' +n many cases the easiest way to convert
the scan code to "S0++
would be to use a look up table' %elow is the scan code for the e?tended keyboard J /umeric keypad'
+nterfacin$ the P0 "T 5eyboard
FeaturesK
+nterfacin$ Standard P0 "T 5eyboards
e!uires ,nly Two +I, Pins' ,ne of them must be an .?ternal +nterrupt Pin
/o .?tra *ardware e!uired
0omplete .?ample in 0> +mplementin$ a



5eyboard to Serial 0onverter'
Scan 0odesK
The "T keyboard has a scan code associated with each key' 1hen a key is pressed> this code is
transmitted' +f a key is held down for a while> it starts repeatin$' The repeat rate is typically (9 per
second' 1hen a key is released> a <break= code 3SF9) is transmitted followed by the key scan code' For
most of the keys> the scan code is one byte' Some keys like the *ome> +nsert and #elete keys have an
e?tended scan code> from two to five bytes' The first byte is always S.9' This is also true for the
<break= se!uence> e'$' .9 F9 ??T "T keyboards are capable of handlin$ three sets of scan codes>
where set & is default' This e?ample will only use set &'
The So2t*!e
The code supplied with this application note is a simple keyboard to S-&2& interface' The scan codes
received from the keyboard are translated into appropriate "S0++ characters and transmitted by the
U"T' The source code is written in 0> and is easily modified and adaptable to all "4 micro
controllers with S"M'
The *46o!ithm
5eyboard reception is handled by the interrupt function +/T9Uinterrupt' The reception will operate
independent of the rest of the pro$ram' The al$orithm is !uite simpleE Store the value of the data line at
the leadin$ ed$e of the clock pulse' This is easily handled if the clock line is connected to the +/T9 or
+/T( pin' The interrupt function will be e?ecuted at every ed$e of the clock cycle> and data will be
stored at the fallin$ ed$e' "fter all bits are received> the data can be decoded' This is done by callin$ the



decode function' For character keys> this function will store an "S0++ character in a buffer' +t will take
into account if the shift key is held down when a key is pressed' ,ther keys like function keys>
navi$ation keys 3arrow keys> pa$e upIdown keys etc') and modifier keys like 0trl and "lt are i$nored'
The mappin$ from scan codes to "S0++ characters are handled with table look-ups> one table for shifted
characters and one for un-shifted'
GLOBAL SYSTEM FOR MOBILE COMMUNICATION7GSM8 D
Global system for mobile communication 3GSM) is a $lobally accepted standard for di$ital cellular
communication' GSM is the name of a standardiCation $roup established in (A8& to create a common
.uropean mobile telephone standard that would formulate specifications for a pan-.uropean mobile
cellular radio system operatin$ at A99 M*C' +t is estimated that many countries outside of .urope will
join the GSM partnership'
De/1!i3tio-D
GSM> the Global System for Mobile communications> is a di$ital cellular communications system>
which has rapidly $ained acceptance and market share worldwide> althou$h it was initially developed in
a .uropean conte?t' +n addition to di$ital transmission> GSM incorporates many advanced services and
features> includin$ +S#/ compatibility and worldwide roamin$ in other GSM networks' The advanced
services and architecture of GSM have made it a model for future third-$eneration cellular systems>
such as UMTS' This paper will $ive an overview of the services offered by GSM> the system
architecture> the radio transmission structure> and the si$nalin$ functional architecture'
GSM Modem/
" GSM modem can be an e?ternal modem device> such as the 1ave 0,M F"ST"05 Modem' +nsert
a GSM S+M card into this modem> and connect the modem to an available serial port on your computer'
" GSM modem can be a P0 0ard installed in a notebook computer> such as the /okia 0ard Phone'



" GSM modem could also be a standard GSM mobile phone with the appropriate cable and software
driver to connect to a serial port on your computer' Phones such as the /okia G((9 with a #7-2 cable>
or various .ricsson phones> are often used for this purpose'
" dedicated GSM modem 3e?ternal or P0 0ard) is usually preferable to a GSM mobile phone' This is
because of some compatibility issues that can e?ist with mobile phones' For e?ample> if you wish to be
able to receive inbound MMS messa$es with your $ateway> and you are usin$ a mobile phone as your
modem> you must utiliCe a mobile phone that does not support 1"P push or MMS' This is because the
mobile phone automatically processes these messa$es> without forwardin$ them via the modem
interface' Similarly some mobile phones will not allow you to correctly receive SMS te?t messa$es
lon$er than (F9 bytes 3known as <concatenated SMS= or <lon$ SMS=)' This is because these lon$
messa$es are actually sent as separate SMS messa$es> and the phone attempts to reassemble the
messa$e before forwardin$ via the modem interface' 31eNve observed this latter problem utiliCin$ the
.ricsson 289> while it does not appear to be a problem with many other .ricsson models')
1hen you install your GSM modem> or connect your GSM mobile phone to the computer> be sure to
install the appropriate 1indows modem driver from the device manufacturer' To simplify
confi$uration> the /ow SMSIMMS Gateway will communicate with the device via this driver' "n
additional benefit of utiliCin$ this driver is that you can use 1indows dia$nostics to ensure that the



modem is communicatin$ properly with the computer
Fi$ureE GSM smart modem
The /ow SMSIMMS $ateway can simultaneously support multiple modems> provided that your
computer hardware has the available communications port resources'
SMART MODEM 7GSMHG=RS8 SMART MODEM 7GSMHG=RS8
INTRODUCTION D
"nalo$icNs GSM Smart Modem is a multi-functional> ready to use> ru$$ed and versatile modem
that can be embedded or plu$$ed into any application' The Smart Modem can be customiCed to various
applications by usin$ the standard "T commands' The modem is fully type-approved and can directly
be inte$rated into your projects with any or all the features of 4oice> #ata> Fa?> SMS> and +nternet etc'



Smart Modem kit contain the followin$ itemsE
"nalo$icNs GSMIGPS Smart Modem
SMPS based power supply adapter'
2 d%i antenna with cable 3optionalE other types)
#ata cable 3S&2&)
U/e! M*-u*4
Temperature an$eE
,peratin$ temperatureE from -&9
9
0 to O::
9
0
Stora$e temperatureE from -&:
9
0 to OG9
9
I-/t*44i-6 the modemD
To install the modem> plu$ the device on to the supplied SMPS "dapter' For "utomotive applications
fi? the modem permanently usin$ the mountin$ slots 3optional as per your re!uirement dimensions)'
I-/e!ti-6H Remo,i-6 the SIM C*!dD
To insert or emove the S+M 0ard> it is necessary to press the S+M holder ejector button with Sharp
ed$ed object like a pen or a needle' 1ith this> the S+M holder comes out a little> then pulls it out and
insert or remove the S+M 0ard



Make sure that the ejector is pushed out completely before accessin$ the S+M 0ard holder do not
remove the S+M card holder by force or tamper it 3it may permanently dama$e)' Place the S+M 0ard
Properly as per the direction of the installation' +t is very important that the S+M is placed in the ri$ht
direction for its proper workin$ condition
AT 1omm*-d/ 2e*tu!e/D
Li-e /etti-6/D
" serial link handler is set with the followin$ default values
"utobaud> 8 bits data> ( stop bit> no parity> flow control'
0ommand line
0ommands always start with "T 3which means attention) and finish with a V0W character'
+nformation responses and result codes
esponses start and end with V0WV7FW>'
+f command synta? is incorrect> an ., strin$ is returned'



+f command synta? is correct but with some incorrect parameters> the O0M. .,E V.rrW or
O0MS .,E VSms.rrW strin$s are returned with different error codes'
+f the command line has been performed successfully> an ,5 strin$ is returned'
+n some cases> such as <"TO0P+/L= or 3unsolicited) incomin$ events> the product does not
return the ,5 strin$ as a response'
Se!,i1e/ 3!o,ided by GSM
GSM was desi$ned havin$ interoperability with +S#/ in mind> and the services provided by
GSM are a subset of the standard +S#/ services' Speech is the most basic> and most important>
teleservice provided by GSM'
+n addition> various data services are supported> with user bit rates up to AF99 bps' Specially
e!uipped GSM terminals can connect with PST/> +S#/> Packet Switched and 0ircuit Switched Public
#ata /etworks> throu$h several possible methods> usin$ synchronous or asynchronous transmission'
"lso supported are Group 2 facsimile service> videote?> and telete?' ,ther GSM services include a cell
broadcast service> where messa$es such as traffic reports> are broadcast to users in particular cells'
" service uni!ue to GSM> the Short Messa$e Service> allows users to send and receive point-to-
point alphanumeric messa$es up to a few tens of bytes' +t is similar to pa$in$ services> but much more
comprehensive> allowin$ bi-directional messa$es> store-and-forward delivery> and acknowled$ement of
successful delivery'
Supplementary services enhance the set of basic teleservices' +n the Phase + specifications>
supplementary services include variations of call forwardin$ and call barrin$> such as 0all Forward on



%usy or %arrin$ of ,ut$oin$ +nternational 0alls' Many more supplementary services> includin$
multiparty calls> advice of char$e> call waitin$> and callin$ line identification presentation will be
offered in the Phase & specifications'
Mobi4e St*tio-D
The mobile station 3MS) consists of the mobile e!uipment 3the terminal) and a smart card called
the Subscriber +dentity Module 3S+M)' The S+M provides personal mobility> so that the user can have
access to subscribed services irrespective of a specific terminal' %y insertin$ the S+M card into another
GSM terminal> the user is able to receive calls at that terminal> make calls from that terminal> and
receive other subscribed services'
The mobile e!uipment is uni!uely identified by the +nternational Mobile .!uipment +dentity
3+M.+)' The S+M card contains the +nternational Mobile Subscriber +dentity 3+MS+) used to identify the
subscriber to the system> a secret key for authentication> and other information' The +M.+ and the +MS+
are independent> thereby allowin$ personal mobility' The S+M card may be protected a$ainst
unauthoriCed use by a password or personal identity number'
B*/e St*tio- Sub/y/temD
The %ase Station Subsystem is composed of two parts> the %ase Transceiver Station 3%TS) and
the %ase Station 0ontroller 3%S0)' These communicate across the standardiCed "bis interface> allowin$
3as in the rest of the system) operation between components made by different suppliers'



The %ase Transceiver Station houses the radio tranceivers that define a cell and handles the
radio-link protocols with the Mobile Station' +n a lar$e urban area> there will potentially be a lar$e
number of %TSs deployed> thus the re!uirements for a %TS are ru$$edness> reliability> portability> and
minimum cost'
The %ase Station 0ontroller mana$es the radio resources for one or more %TSs' +t handles
radio-channel setup> fre!uency hoppin$> and handovers> as described below' The %S0 is the connection
between the mobile station and the Mobile service Switchin$ 0enter 3MS0)'
Neto!0 Sub/y/tem
The central component of the /etwork Subsystem is the Mobile services Switchin$ 0enter
3MS0)' +t acts like a normal switchin$ node of the PST/ or +S#/> and additionally provides all the
functionality needed to handle a mobile subscriber> such as re$istration> authentication> location
updatin$> handovers> and call routin$ to a roamin$ subscriber' These services are provided in
conjunction with several functional entities> which to$ether form the /etwork Subsystem' The MS0
provides the connection to the fi?ed networks 3such as the PST/ or +S#/)' Si$nallin$ between
functional entities in the /etwork Subsystem uses Si$nallin$ System /umber G 3SSG)> used for trunk
si$nallin$ in +S#/ and widely used in current public networks'
The *ome 7ocation e$ister 3*7) and 4isitor 7ocation e$ister 347)> to$ether with the
MS0> provide the call-routin$ and roamin$ capabilities of GSM' The *7 contains all the
administrative information of each subscriber re$istered in the correspondin$ GSM network> alon$ with
the current location of the mobile' The location of the mobile is typically in the form of the si$nallin$
address of the 47 associated with the mobile as a distributed database' station' The actual routin$
procedure will be described later' There is lo$ically one *7 per GSM network> althou$h it may be
implemented



The 4isitor 7ocation e$ister 347) contains selected administrative information from the
*7> necessary for call control and provision of the subscribed services> for each mobile currently
located in the $eo$raphical area controlled by the 47' "lthou$h each functional entity can be
implemented as an independent unit> all manufacturers of switchin$ e!uipment to date implement the
47 to$ether with the MS0> so that the $eo$raphical area controlled by the MS0 corresponds to that
controlled by the 47> thus simplifyin$ the si$nallin$ re!uired' /ote that the MS0 contains no
information about particular mobile stations --- this information is stored in the location re$isters'
The other two re$isters are used for authentication and security purposes' The .!uipment
+dentity e$ister 3.+) is a database that contains a list of all valid mobile e!uipment on the network>
where each mobile station is identified by its +nternational Mobile .!uipment +dentity 3+M.+)' "n +M.+
is marked as invalid if it has been reported stolen or is not type approved' The "uthentication 0enter
3"u0) is a protected database that stores a copy of the secret key stored in each subscriberBs S+M card>
which is used for
Re*d me//*6e LCMGR
#escription E
This command allows the application to read stored messa$es' The messa$es are read from the memory
selected by O0PMS command'
Synta? E
0ommand synta? E "TO0MGPVinde?W
esponse synta? for te?t modeE
O0MG EVstatW>VoaW>XValphaW>Y VsctsW X>VtooaW>VfoW>
VpidW>VdcsW>VscaW>VtoscaW>Vlen$thWY V0WV7FW VdataW 3for SMS MS MS-#.7+4. only)



O0MG E VstatW>VdaW>XValphaW>Y X>VtodaW>VfoW>VpidW>VdcsW> XVvpWY> VscaW>
VtoscaW>Vlen$thWYV0WV7FW VdataW 3for SMS-SU%M+T only)
O0MG E VstatW>VfoW>VmrW>XVraWY>XVtoraWY>VsctsW>VdtW>VstW 3for SMS SMS- ST"TUS-
.P,T only)
esponse synta? for P#U mode E
O0MGE VstatW> XValphaWY >Vlen$thW V0WV7FW VpduW
" messa$e read with status <.0 U/."#= will be updated in memory with the status <.0 ."#='
.?ample E



Se-d me//*6e LCMGS
#escription E
The VaddressW field is the address of the terminal to which the messa$e is sent' To send the messa$e>
simply type> Vctrl-ZW character 3"S0++ &F)' The te?t can contain all e?istin$ characters e?cept Vctrl-ZW
and V.S0W 3"S0++ &G)' This command can be aborted usin$ the V.S0W character when enterin$ te?t'
+n P#U mode> only he?adecimal characters are used 3[9NTNAN>N"NTNFN)'
Synta? E
0ommand synta? in te?t mode E
"TO0MGSP VdaW X >VtodaW Y V0W
te?t is entered Vctrl-Z I .S0 W
0ommand synta? in P#U mode E
"TO0MGSP Vlen$thW V0W
P#U is entered Vctrl-Z I .S0 W
The messa$e reference> VmrW> which is returned to the application is allocated by the product' This
number be$ins with 9 and is incremented by one for each out$oin$ messa$e 3successful and failure
cases)K it is cyclic on one byte 39 follows &::)'



/oteE
this number is not a stora$e number - out$oin$ messa$es are not stored'
>!ite Me//*6e to Memo!y LCMG>
#escription E
This command stores a messa$e in memory 3either SMS-SU%M+T or SMS#.7+4.S)'
The memory location Vinde?W is returned 3no choice possible as with phonebooks O0P%1)'
Te?t or P#U is entered as described for the Send Messa$e O0MGS command'
Synta? E
0ommand synta? in te?t mode E 3Vinde?W is returned in both cases)
"TO0MG1P VoaIdaW X>VtooaItodaW X>VstatW Y Y V0W
enter te?t Vctrl-Z I .S0W
0ommand synta? in P#U mode E
"TO0MG1P Vlen$thW X>VstatWY V0W
$ive P#U Vctrl-Z I .S0W
esponse synta?E
O0MG1E Vinde?W or O0MS .,E VerrW if writin$ fails



De4ete me//*6e LCMGD
#escription E
This command is used to delete one or several messa$es from preferred messa$e stora$e 3<%M= SMS
0% ["M stora$eN> <SM= SMSPP stora$e [S+M stora$eN or <S= SMS Status-eport stora$e)'
Synta? E



#efines values
Vinde?W
3( (-&9) 1hen the preferred messa$e stora$e is <%M= +nte$er type values in the ran$e of location
numbers of S+M Messa$e memory when the preferred messa$e stora$e is <SM= or <S='
V#elFla$W
9 #elete messa$e at location Vinde?W'
( #elete "ll ."# messa$es
& #elete "ll ."# and S./T messa$es
2 #elete "ll ."#> S./T and U/S./T messa$es



@ #elete "ll messa$es'

INTERFACING
INTERFACING >ITH LCDS
0ode for interfacin$ the 70# to 8A0:( Micro 0ontroller
Mi-14udeN!e6 +%.hO
Mi-14udeNi-t!i-/.hO
HH De,i1e M*33i-6
Mde2i-e LCDP=o!t ="
Mde2i-e LCDPRS =%P+
Mde2i-e LCDPR> =%PC
Mde2i-e LCDPEN =%P#
Mde2i-e LCDPB= ="P# HH LCD Bu/y =i-
HH Fu-1tio-/ =!ototy3e De14*!*tio-



,oid 43!i-t27u-/i6-ed 1h*! F5u-/i6-ed 1h*!5u-/i6-ed 1h*!8?
,oid LCDPI-it78?
,oid LCDPCmd7u-/i6-ed 1h*!8?
,oid LCDPD*t*7u-/i6-ed 1h*!8?
,oid De4*yP%"m/78?
,oid De4*y7i-t8?
,oid LCDPBu/y78?
,oid C4!LCD78?
,oid SCo-2i67,oid8?
,oid Se-dPCh*!7u-/i6-ed 1h*!8?
,oid Se-d7u-/i6-ed 1h*! F8?
HH To C4e*! LCD
,oid C4!LCD78
Q
LCDPCmd7"A"%8?
R
HH Di/34*yi-6 St!i-6
,oid 43!i-t271h*! F/t!5u-/i6-ed 1h*! 4-5u-/i6-ed 1h*! 1o48
Q
/t*ti1 i-t 4i?
u-/i6-ed 1h*! 4i-e?
i274iSS"8
Q
4iS%?
LCDPI-it78?
R

/it1h74-8
Q
1*/e %D
4i-e S "AI"?
b!e*0?
1*/e 'D
4i-e S "A1"?
b!e*0?
1*/e BD
4i-e S "A(&?
b!e*0?
1*/e &D
4i-e S "AD&?
b!e*0?
R

LCDPCmd74i-eL1o48?
hi4e7F/t!8
Q
LCDPD*t*7F/t!8?



/t!LL?
R
R
HHLCD I-iti4iT*tio-
,oid LCDPI-it78
Q
LCDPCmd7"AB"8?
LCDPCmd7"AB"8?
LCDPCmd7"AB"8?
LCDPCmd7"ABI8?
LCDPCmd7"A"C8?
LCDPCmd7"A"%8?
LCDPCmd7"A"18?
R
HH LCD Comm*-d Ru-
,oid LCDPCmd7u-/i6-ed 1h*! 1md8
Q
LCDPBu/y78?
LCDP=o!tS1md?
=%P'S"?
P-o3P78?
=%P'S%?
LCDPRSS"?
LCDP R>S"?
LCDPENS%?
P-o3P78?
P-o3P78?
LCDPENS"?
R
HHLCD D*t* Out Fu-1tio-
,oid LCDPD*t*7u-/i6-ed 1h*! dt8
Q
LCDPBu/y78?
LCDP=o!tSdt?
=%P'S"?
P-o3P78?
=%P'S%?
LCDPRSS%?
LCDPR>S"?
LCDPENS%?
P-o3P78?
P-o3P78?
LCDPENS"?
R
HH LCD BUSY Che10 Fu-1tio-
,oid LCDPBu/y78
Q
De4*y7%8?



R
HH De4*y Fu-1tio-
,oid De4*y7i-t -8
Q
hi4e7-8
Q
De4*yP%"m/78?
-99?
R
R
,oid De4*yP%"m/78
Q
i-t i?
2o!7iS"? iN%I'+? iLL8?
R
HHFu-1tio-/ Fo! Se!i*4 Commu-i1*tio-
HH Se!i*4 Co-2i6u!*tio-
,oid SCo-2i678
Q
TMODS"A'"?
TH%S"AFD?
TL%S"AFD?
SCONS"A+"?
TR%S%?
R
HH Fu-1tio- to TA * /i-64e Ch*!*1te!
,oid Se-dPCh*!7u-/i6-ed 1h*! 1h8
Q
u-/i6-ed 1h*! 24*6S"?
SBUFS1h?
hii4e7UTI8?
TIS"?
R
HH Fu-1ito- to TA * 6i,e- St!i-6
,oid Se-d7u-/i6-ed 1h*! F/t!8
Q
hi4e7F/t!8
Q
Se-dPCh*!7F/t!8?
/t!LL?
R
R
INTERFACING >ITH =C $EYBOARD



Mi-14ude N1+%.hO
HH De,i1e M*33i-6
Mde2i-e $BPDATA =BP&
HHG4ob*4 V*!i*b4e De14*!*tio-
Ad*t* u-/i6-ed 1h*! dt P*tP ""?
u-/i6-ed 1h*! 0bit?
u-/i6-ed 1h*! ByteCS"?
Ad*t* u-/i6-ed 1h*! mbit P*tP '"?
u-/i6-ed 1h*! b1ou-tS"?
u-/i6-ed 1h*! 20eyS"?
u-/i6-ed 1h*! 2C*3/S"?
u-/i6-ed 1h*! dtb*0?
HH Fu-1tio-/ =!ototy3e De14*!*tio-
,oid Di/3PHeA7u-/i6-ed 1h*! 8?
u-/i6-ed 1h*! GetPCh*!7u-/i6-ed 1h*! 8?
u-/i6-ed 1h*! GetP$ey7u-/i6-ed 1h*!8?
,oid GetSt!7u-/i6-ed 1h*! F8?
HH I-te!!u3t Sub!outi-e 1o--e1ted to $eybo*!d C4o10 =i-
EAPI-t%78 i-te!!u3t ' u/i-6 %
Q
b1ou-tLL?
i27b1ou-tOS' @@ b1ou-tNS(8 HH =u/h the D*t* Bit/ i- to the dt ,*!i*b4e
Q
0bit S $BPDATA?
dt S dt V 7mbit F 0bit8?
mbitSmbitNN%?
R
e4/e
i27b1ou-tSSBB8 HH >he- L*/t Bit !e1ei,ed 2!om the $eybo*!d
Q
i27dtSS"A+I8 HH Che10i-6 2o! Shi2t $ey
Q
2C*3/SW2C*3/?
R
e4/e
Q
20eyS%?
R
mbitS%?
b1ou-tS"?
R
R
HFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF Fu-1tio-/ FFFFFFFH



HH Fu-1tio- to Re*d * St!i-6 F!om AT9$eybo*!d
,oid GetSt!7u-/i6-ed 1h*! F38
Q
u-/i6-ed 1h*! 1t?
hi4e7%8
Q
1tSGetP$ey7%8?
i271tSS"A"d8
b!e*0?
F3S1t?
3LL?
R HH Re*d/ the Ch*!*1te!/ u-ti44 E-te! i/ =!e//ed
F3SXY"X? HH Add the Nu44 1h*!*1te! *t the e-d o2 the
St!i-6
EAS"? HH Di/*b4e the Se!i*4 I-te!!u3t/
EZ%S"?
IT%S"?
R
u-/i6-ed 1h*! GetP$ey7u-/i6-ed 1h*! e1ho8
Q
u-/i6-ed 1h*! 1?
HH E-*b4i-6 the $etbo*!d I-te!!u3/
dtS"?
mbit S %?
EAS%?
EZ%S%?
IT%S%?
hi4e7%8
Q
i2720ey8
Q
HH Di/3PHeA7dt8? HH To Di/34*y the S1*- Code hi4e Te/ti-6 the $B
1SGetPCh*!7dt8?
i27e1ho8
LCDPD*t*718?
dtb*0Sdt?
dtS"?
20eyS"?
b!e*0?
R
R
!etu!- 1?
R
HH999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
HH Thi/ 2u-1tio- Di/34*y the HeA S1*-1ode !e1i,ed 2!om the AT9$eybo*!d
HH999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999



u-/i6-ed 1h*! GetPCh*!7u-/i6-ed 1h*! dt 8
Q
Ad*t* u-/i6-ed 1h*! /1ode%JKSQ
HH" % ' B & + C # I ( * b 1 d e 2
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5XWX5X X5
X X5X X5X X5X X5X X5X[X5X%X5X X5X X5X X5X\X5XSX5XAX5X>X5X'X5X X5
X X5XCX5XZX5XDX5XEX5X&X5XBX5X X5X X5X X5XVX5XFX5XTX5XRX5X+X5X X5
X X5XNX5XBX5XHX5XGX5XYX5XCX5X X5X X5X X5XMX5X)X5XUX5X#X5XIX5X X5
X X5XNX5X$X5XIX5XOX5X"X5X(X5X X5X X5XOX5X]X5XLX5XDX5X=X5XPX5X X5
X X5X X5X^X5X X5XJX5XLX5X X5X X5X X5X X5"A"d5XKX5X X5XHX5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5"A%b5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
R?
Ad*t* u-/i6-ed 1h*! /1ode'JKSQ
HH" % ' B & + C # I ( * b 1 d e 2
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5XWX5X X5



X X5X X5X X5X X5X X5XGX5X%X5X X5X X5X X5XTX5X/X5X*X5XX5X'X5X X5
X X5X1X5XAX5XdX5XeX5X&X5XBX5X X5X X5X X5X,X5X2X5XtX5X!X5X+X5X X5
X X5X-X5XbX5XhX5X6X5XyX5XCX5X X5X X5X X5XmX5X.X5XuX5X#X5XIX5X X5
X X5XNX5X0X5XiX5XoX5X"X5X(X5X X5X X5XOX5X]X5X4X5XDX5X3X5XPX5X X5
X X5X X5X^X5X X5XJX5XLX5X X5X X5X X5X X5"A"D5XKX5X X5XHX5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5X X5
R?
i272C*3/8
!etu!- /1ode%JdtK?
e4/e
!etu!- /1ode'JdtK?
R
Code to i-te!2*1e Mi1!oCo-t!o44e! ith GSM to t!*-/mit teAt
me//*6e



HH I-14udi-6 o2 the He*de! Fi4e!
Mi-14ude N0b.hO
Mi-14ude N6/m%.hO
HH Fu-1tio- =!ototy3e De14*!*tio-
,oid >e41ome78?
,oid M*i-PMe-u78?
,oid TAPM/678?
,oid RAPM/678?
,oid De4PM/678?
HH M*i- Fu-1tio-
,oid m*i-78
Q
SCo-2i678?
TAM/67^H*i^5^(ICC&B+#II^8?
hi4e7%8?
R
Code 2o! the 2i-*4 3!o.e1t

HH I-14udi-6 o2 the He*de! Fi4e!
Mi-14ude N0b.hO
Mi-14ude N6/m%.hO
HH Fu-1tio- =!ototy3e De14*!*tio-
,oid >e41ome78?
,oid M*i-PMe-u78?
,oid TAPM/678?
,oid RAPM/678?
,oid De4PM/678?
HH M*i- Fu-1tio-
,oid m*i-78
Q
>e41ome78?
C4!LCD78?

hi4e7%8
Q
M*i-PMe-u78?
R
R
,oid >e41ome78
Q
C4!LCD78?
43!i-t27^B*3*t4* E-6. Co44e6e^5%5"8?
43!i-t27^B*3*t4*^5'5C8?
43!i-t27^GSM SMS =!o.e1t^5B5'8?
De4*y7'""8?
R



,oid M*i-PMe-u78
Q
u-/i6-ed 1h*! 1h?
C4!LCD78?
43!i-t27^MAIN MENU^5%5"8?
43!i-t27^%. Se-d Me//*6e^5'5"8?
43!i-t27^'. Re*d Me//*6e^5B5"8?
43!i-t27^B. De4te Me//*6e^5&5"8?
1hSGetP$ey7"8?

/it1h71h8
Q
1*/e X%XD
TAPM/678?
b!e*0?
1*/e X'XD
RAPM/678?
b!e*0?
1*/e XBXD
De4PM/678?
b!e*0?
R
R
,oid TAPM/678
Q
u-/i6-ed 1h*! m/6J+"K5m-oJ%+K?
SCo-2i678?
C4!LCD78?
43!i-t27^E-te! Me//*6eD ^5%5"8?
LCDPCmd7"A1"8?
GetSt!7m/68?
C4!LCD78?
43!i-t27^E-te! Mobi4e No.D ^5%5"8?
LCDPCmd7"A1"8?
GetSt!7m-o8?
TAM/67m/65m-o8?
43!i-t27^M/6 Se-d..^5&5"8?
GetP$ey7"8?
R
,oid RAPM/678 HH Fi-i4iTed
Q
u-/i6-ed 1h*! m/6-oJ+K?
SCo-2i678?
C4!LCD78?
43!i-t27^E-te! M/6 No. D ^5%5"8?
GetSt!7m/6-o8?
RAM/67m/6-o8?
GetP$ey7"8?
R



,oid De4PM/678
Q
u-/i6-ed 1h*! m/6-oJ+K?
SCo-2i678?
C4!LCD78?
43!i-t27^E-te! M/6 No. D ^5%5"8?
GetSt!7m/6-o8?
De4M/67m/6-o8?
GetP$ey7"8?
R
./# K.nd of the pro$rame
Co-14u/io-
GSM will allow communication anywhere> anytime> and with anyone' The functional
architecture of GSM employin$ intelli$ent networkin$ principles> and its ideolo$y> which provides The
development of GSM is the first step towards a true personal communication system that enou$h
standardiCation to ensure compatibility> but still allows manufacturers and operators freedom> has been
widely adopted in the development of future wireless systems'
To$ether with international roamin$> and support for a variety of services such as telephony>
data transfer> fa?> Short Messa$e Service> and supplementary services> GSM comes close to fulfillin$



the re!uirements for a personal communication systemE close enou$h that it is bein$ used as a basis for
the ne?t $eneration of mobile communication technolo$y in .urope> the Universal Mobile
Telecommunication System 3UMTS)'



BIBLOGRA=HY
Re2e!e-1e Boo0/D
The 89:( Microcontroller and .mbedded Systems -Muhammad "li MaCidi
The 89:( Micro-controller - "yala
Pro$rammin$ and customiCin$ the 89:( - Myke Predko
>eb/ite/D
www'atmel'com
www'analo$ic$roup'com
www'philips'com
www'$oo$le'com
www'$smworld'com

Você também pode gostar