Está en la página 1de 71

ADVANCED VEHICLE SECURITY SYSTEM

CHAPTER 1
INTRODUCTION
The rapid development of electronic provide ec!red environment to the
h!man" A a part of thi #ADVANCED VEHICLE SECURITY SYSTEM $ITH THE%T
C&NTR&L AND ACCIDENT N&TI%ICATI&N' i dei(ned to red!ce the ri)
involved in loin( the vehicle and providin( accident notification *hich *ill red!ce
the rate of death"
Thi trac)in( +tem i compoed of a ,-S receiver. Microcontroller and a ,SM
Modem" ,-S Receiver (et the location information from atellite in the form of latit!de
and lon(it!de
Thi i an ine/penive device *hich red!ce the pro0lem aociated *ith
accident notification and antitheft control"
ADVANCED VEHICLE SECURITY SYSTEM
CHAPTER 2
DESCRIPTION OF THE PROJECT
Fig 2.1 Block diagram of !" #ro$"c.
E%#la&aio&'
In thi pro1ect the ,-S i !ed to provide the e/act poition of the vehicle" The
information that i collected 0+ the ,-S modem i paed to the microcontroller on it
re2!et" The information provided 0+ the ,-S +tem contain lon(it!dinal and latit!de
poition "It alo provide the peed and time of the vehicle"
Here *e !e -IC34f544A microcontroller" It mainl+ control the all f!nction of the
pro1ect" It (et the information fro the ,-S modem and paed it to the ,SM modem" It
control the i(nition enor and accident enor"
,SM modem i !ed to end mea(e to the predefined n!m0er tored in the
microcontroller" Thi ,SM modem !e AT command in order to end mea(e to the
predefined n!m0er"
ADVANCED VEHICLE SECURITY SYSTEM
%i("6"6 Schematic Dia(ram of the pro1ect"
ADVANCED VEHICLE SECURITY SYSTEM
CHAPTER (
HARD)ARE ANA*+SIS
(.1. Po,"r -.##l/
-o*er !ppl+ i the ma1or concern for ever+ electronic device "Since the controller and
other device !ed are lo* po*er device there i a need to tep do*n the volta(e and a
*ell a rectif+ the o!tp!t to convert the o!tp!t to a contant dc"
(.1.1 Tra&-form"r
Tranformer i a device !ed to increment or decrement the inp!t volta(e (iven a per the
re2!irement" The tranformer are claified into t*o t+pe dependin( !pon there
f!nctionalit+"
Step !p tranformer
Step do*n tranformer
Here *e !e a tep do*n tranformer for teppin( do*n the ho!e hold ac po*er !ppl+
i"e" the 67896:8v po*er !ppl+ to ; v "$e !e a ;989; v center tapped tep do*n
tranformer"

(.1.2 R"cifi"r
The o!tp!t of the tranformer i an ac and ho!ld 0e rectified to a contant dc for thi it i
necear+ to feed the o!tp!t of the tranformer to a rectifier"
The rectifier i emplo+ed to convert the alternatin( ac to a contant dc" There are
man+ rectifier availa0le in the mar)et ome of them are<9

Half *ave rectifier
%!ll *ave rectifier
ADVANCED VEHICLE SECURITY SYSTEM
=rid(e rectifier
The rectification i done 0+ !in( one or more diode connected in erie or parallel"

If onl+ one diode i !ed then onl+ firt half c+cle i rectified and it i termed a half
*ave rectification and the rectifier !ed i termed a Half ,a0" r"cifi"r. If t*o diode are
emplo+ed in parallel then 0oth poitive and ne(ative half c+cle are rectified and thi i f!ll
*ave rectification and the rectifier i termed a F.ll ,a0" r"cifi"r.
If the diode are arran(ed in the form of 0rid(e then it i termed a Bridg" r"cifi"r1
it act a a f!ll *ave rectifier"
Thee rectifier are availa0le in the mar)et in the form of inte(rated chip >I"C?
(.1.( 2olag" r"g.laor
The volta(e re(!lator i !ed for the volta(e re(!lation p!rpoe" $e !e IC 3456 volta(e
re(!lator"
The IC n!m0er ha a pecific i(nificance" The n!m0er 45 repreent the erie
*hile 8; repreent the o!tp!t volta(e (enerated 0+ the IC"
(.1.7 *ig! "mii&g diod"
$e emplo+ a li(ht emittin( diode for tetin( the f!nctionalit+ of the po*er !ppl+ circ!it"
Here *e !e a ; volt LED *hich i connected in erie *ith the po*er !ppl+ circ!it it
verifie the f!nctionin( of the po*er !ppl+"
LED' are alo emplo+ed in other area for man+ p!rpoe" The fallo*in( are the
advanta(e of !in( LED'"
It help ! *hile tro!0lehootin( the device i"e" *hen the device i
malf!nctionin( it *o!ld 0e ea+ to detect *here the act!al pro0lem araied
LED emplo+ed *ith microcontroller verifie *hether data i 0ein(
tranmitted
ADVANCED VEHICLE SECURITY SYSTEM
It verifie the f!nctionalit+ of the po*er !ppl+"
(.2 8icroco&roll"r PIC19F433A
(.2.1. I&rod.cio&
The -IC3@%544A CM&S %LASH90aed 590it microcontroller i !p*ard
compati0le *ith the -IC3@C;/. -IC36C/// and -IC3@C4/ device" It feat!re 688 n
intr!ction e/ec!tion. 6;@ 0+te of EE-R&M data memor+. elf pro(rammin(. an ICD. 6
Comparator. 5 channel of 3890it Analo(9to9Di(ital >AAD? converter. 6
capt!reAcompareA-$M f!nction. a +nchrono! erial port that can 0e confi(!red a either
79*ire S-I or 69*ire I6C 0!. a USART. and a -arallel Slave -ort"
(.2.(. Hig!:P"rforma&c" RISC CPU
Lead9freeB RoHS9compliant
&peratin( peed< 68 MHC. 688 n intr!ction c+cle
&peratin( volta(e< :"89;";V
Ind!trial temperat!re ran(e >9:8D to E5;DC?
3; Interr!pt So!rce
7; in(le9*ord intr!ction
All in(le9c+cle intr!ction e/cept for pro(ram 0ranche >t*o9c+cle?
(.2.7 S#"cial 8icroco&roll"r F"a.r"-
%lah Memor+< 3:"7 F0+te >53G6 *ord?
Data SRAM< 7@5 0+te
Data EE-R&M< 6;@ 0+te
Self9repro(ramma0le !nder oft*are control
In9Circ!it Serial -ro(rammin( via t*o pin >;V?
$atchdo( Timer *ith on9chip RC ocillator
-ro(ramma0le code protection
-o*er9avin( Sleep mode
ADVANCED VEHICLE SECURITY SYSTEM
Selecta0le ocillator option
In9Circ!it De0!( via t*o pin
(.2.6P"ri#!"ral F"a.r"-
77 IA& pinB ; IA& port
Timer8< 590it timerAco!nter *ith 590it precaler
Timer3< 3@90it timerAco!nter *ith precaler
Can 0e incremented d!rin( Sleep via e/ternal cr+talAcloc)
Timer6< 590it timerAco!nter *ith 590it period re(iter. precaler and potcaler
T*o Capt!re. Compare. -$M mod!le
3@90it Capt!re inp!tB ma/ reol!tion 36"; n
3@90it CompareB ma/ reol!tion 688 n
3890it -$M
S+nchrono! Serial -ort *ith t*o mode<
S-I Mater
I6C Mater and Slave
USARTASCI *ith G90it addre detection
-arallel Slave -ort >-S-?
5 0it *ide *ith e/ternal RD. $R and CS control
=ro*n9o!t detection circ!itr+ for =ro*n9&!t Reet
Analo( %eat!re
3890it. 59channel AAD Converter
=ro*n9&!t Reet
(.2.9 A&alog Com#araor mod.l"
6 analo( comparator
-ro(ramma0le on9chip volta(e reference mod!le
-ro(ramma0le inp!t m!ltiple/in( from device inp!t and internal VRE%
Comparator o!tp!t are e/ternall+ accei0le
ADVANCED VEHICLE SECURITY SYSTEM
Program m"mor/ ;F*ASH? i !ed for torin( a *ritten pro(ram"
Since memor+ made in %LASH technolo(+ can 0e pro(rammed and cleared more than
once. it ma)e thi microcontroller !ita0le for device development"
EEPRO8 9 data memor+ that need to 0e aved *hen there i no !ppl+"
It i !!all+ !ed for torin( important data that m!t not 0e lot if po*er !ppl+ !ddenl+
top" %or intance. one !ch data i an ai(ned temperat!re in temperat!re re(!lator" If
d!rin( a lo of po*er !ppl+ thi data *a lot. *e *o!ld have to ma)e the ad1!tment
once a(ain !pon ret!rn of !ppl+" Th! o!r device looe on elf9reliance"
RA8 9 Data memor+ !ed 0+ a pro(ram d!rin( it e/ec!tion"
In RAM are tored all inter9re!lt or temporar+ data d!rin( r!n9time"
PORTS are ph+ical connection 0et*een the microcontroller and the o!tide *orld"
-IC3@%544A ha five IA& -ort and 77 pin in all ; port"
FREE:RUN TI8ER i an 590it re(iter inide a microcontroller that *or)
independentl+ of the pro(ram" &n ever+ fo!rth cloc) of the ocillator it increment it
val!e !ntil it reache the ma/im!m >6;;?. and then it tart co!ntin( over a(ain from Cero"
A *e )no* the e/act timin( 0et*een each t*o increment of the timer content. timer can
0e !ed for mea!rin( time *hich i ver+ !ef!l *ith ome device"
CENTRA* PROCESSIN< UNIT ha a role of connective element 0et*een other
0loc) in the microcontroller" It coordinate the *or) of other 0loc) and e/ec!te the !er
pro(ram"

ADVANCED VEHICLE SECURITY SYSTEM
%i("7"3 Architect!re of the S+tem"
CISC1 RISC
It ha alread+ 0een aid that -IC3@%544A ha a RISC architect!re" Thi term i
often fo!nd in comp!ter literat!re. and it need to 0e e/plained here in more detail"
Harvard architect!re i a ne*er concept than von9Ne!mannH" It roe o!t of the need to
peed !p the *or) of a microcontroller" In Harvard architect!re. data 0! and addre 0!
are eparate" Th! a (reater flo* of data i poi0le thro!(h the central procein( !nit. and
of co!re. a (reater peed of *or)" Separatin( a pro(ram from data memor+ ma)e it
f!rther poi0le for intr!ction not to have to 0e 590it *ord" -IC3@%544A !e 3: 0it for
intr!ction *hich allo* for all intr!ction to 0e one *ord intr!ction" It i alo t+pical
for Harvard architect!re to have fe*er intr!ction than von9Ne!mannH. and to have
intr!ction !!all+ e/ec!ted in one c+cle"
Microcontroller *ith Harvard architect!re are alo called IRISC
microcontrollerI" RISC tand for Red!ced Intr!ction Set Comp!ter" Microcontroller
*ith von9Ne!mannH architect!re are called HCISC microcontrollerH" Title CISC tand for
Comple/ Intr!ction Set Comp!ter"
Since -IC3@%544A i a RISC microcontroller. that mean that it ha a red!ced et
of intr!ction. more preciel+ 7; intr!ction" >E/" IntelH and MotorolaH microcontroller
have over h!ndred intr!ction? All of thee intr!ction are e/ec!ted in one c+cle e/cept
for 1!mp and 0ranch intr!ction" Accordin( to *hat it ma)er a+. -IC3@%544A !!all+
reache re!lt of 6<3 in code compreion and :<3 in peed in relation to other 590it
microcontroller in it cla"
ADVANCED VEHICLE SECURITY SYSTEM
(.2.3 A##licaio&-
-IC3@%544A perfectl+ fit man+ !e. from a!tomotive ind!trie and controllin(
home appliance to ind!trial intr!ment. remote enor. electrical door loc) and afet+
device" It i alo ideal for mart card a *ell a for 0atter+ !pplied device 0eca!e of it
lo* con!mption"
EE-R&M memor+ ma)e it eaier to appl+ microcontroller to device *here
permanent tora(e of vario! parameter i needed >code for tranmitter. motor peed.
receiver fre2!encie. etc"?" Lo* cot. lo* con!mption. ea+ handlin( and fle/i0ilit+ ma)e
-IC3@%544A applica0le even in area *here microcontroller had not previo!l+ 0een
conidered >e/ample< timer f!nction. interface replacement in lar(er +tem. coproceor
application. etc"?"
S+tem -ro(ramma0ilit+ of thi chip >alon( *ith !in( onl+ t*o pin in data
tranfer? ma)e poi0le the fle/i0ilit+ of a prod!ct. after aem0lin( and tetin( have 0een
completed" Thi capa0ilit+ can 0e !ed to create aem0l+9line prod!ction. to tore
cali0ration data availa0le onl+ after final tetin(. or it can 0e !ed to improve pro(ram on
finihed prod!ct"
(.2.4 Clock = i&-r.cio& c/cl"
Cloc) i microcontrollerH main tarter. and i o0tained from an e/ternal component
called an IocillatorI" If *e *ant to compare a microcontroller *ith a time cloc). o!r
Icloc)I *o!ld then 0e a tic)in( o!nd *e hear from the time cloc)" In that cae. ocillator
co!ld 0e compared to a prin( that i *o!nd o time cloc) can r!n" E/ec!tion of
intr!ction tart 0+ callin( an intr!ction that i ne/t in trin(" Intr!ction i called from
pro(ram memor+ on ever+ J3 and i *ritten in intr!ction re(iter on J:" Decodin( and
e/ec!tion of intr!ction are done 0et*een the ne/t J3 and J: c+cle" &n the follo*in(
dia(ram *e can ee the relationhip 0et*een intr!ction c+cle and cloc) of the ocillator
>&SC3? a *ell a that of internal cloc) J39J:" -ro(ram co!nter >-C? hold information
a0o!t the addre of the ne/t intr!ction"
ADVANCED VEHICLE SECURITY SYSTEM
%i( 7"6 Cloc)AIntr!ction C+cle
Pi#"li&i&g
Intr!ction c+cle conit of c+cle J3. J6. J7 and J:" C+cle of callin( and
e/ec!tin( intr!ction are connected in !ch a *a+ that in order to ma)e a call. one
intr!ction c+cle i needed. and one more i needed for decodin( and e/ec!tion" Ho*ever.
d!e to pipelinin(. each intr!ction i effectivel+ e/ec!ted in one c+cle" If intr!ction ca!e
a chan(e on pro(ram co!nter. and -C doenHt point to the follo*in( 0!t to ome other
addre >*hich can 0e the cae *ith 1!mp or *ith callin( !0pro(ram?. t*o c+cle are
needed for e/ec!tin( an intr!ction" Thi i o 0eca!e intr!ction m!t 0e proceed
a(ain. 0!t thi time from the ri(ht addre" C+cle of callin( 0e(in *ith J3 cloc). 0+
*ritin( into intr!ction re(iter >IR?" Decodin( and e/ec!tin( 0e(in *ith J6. J7 and J:
cloc)"
ADVANCED VEHICLE SECURITY SYSTEM
%i( 7"7 Intr!ction -ipeline %lo*
TCY8 read in intr!ction M&VL$ ;;h >it doenHt matter to ! *hat intr!ction
*a e/ec!ted. 0eca!e there i no rectan(le pict!red on the 0ottom?"TCY3 e/ec!te
intr!ction M&VL$ ;;h and read in M&V$% -&RT="TCY6 e/ec!te M&V$% -&RT=
and read in CALL SU=K3"TCY7 e/ec!te a call of a !0pro(ram CALL SU=K3. and
read in intr!ction =S% -&RTA. =IT7" A thi intr!ction i not the one *e need. or i not
the firt intr!ction of a !0pro(ram SU=K3 *hoe e/ec!tion i ne/t in order. intr!ction
m!t 0e read in a(ain" Thi i a (ood e/ample of an intr!ction needin( more than one
c+cle" TCY: intr!ction c+cle i totall+ !ed !p for readin( in the firt intr!ction from a
!0pro(ram at addre SU=K3"TCY; e/ec!te the firt intr!ction from a !0pro(ram
SU=K3 and read in the ne/t one"
Pi& d"-cri#io&
-IC3@%544A ha a total of :8 pin" It i mot fre2!entl+ fo!nd in a DI-:8 t+pe of cae 0!t
can alo 0e fo!nd in SMD cae *hich i maller from a DI-" DI- i an a00reviation for
D!al In -ac)a(e" SMD i an a00reviation for S!rface Mo!nt Device !((etin( that hole
for pin to (o thro!(h *hen mo!ntin( arenHt necear+ in olderin( thi t+pe of a
component"
ADVANCED VEHICLE SECURITY SYSTEM
%i("7": -in Dia(ram of -IC3@%544A
-in on -IC3@%544A microcontroller have the follo*in( meanin(<
There are :8 pin on -IC3@%544A" Mot of them can 0e !ed a an I& pin" &ther are
alread+ for pecific f!nction" Thee are the pin f!nction"
3" MCLR L to reet the -IC
6" RA8 L port A pin 8
7" RA3 L port A pin 3
:" RA6 L port A pin 6
;" RA7 L port A pin 7
@" RA: L port A pin :
4" RA; L port A pin ;
5" RE8 L port E pin 8
G" RE3 9 port E pin 3
38" RE6 L port E pin 6
ADVANCED VEHICLE SECURITY SYSTEM
33" VDD L po*er !ppl+
36" VSS L (ro!nd
37" &SC3 L connect to ocillator
3:" &SC6 L connect to ocillator
3;" RC8 L port C pin 8
3@" RC3 L port C pin 8
34" RC6 L port C pin 8
35" RC7 L port C pin 8
3G" RD8 9 port D pin 8
68" RD3 9 port D pin 3
63" RD6 9 port D pin 6
66" RD7 9 port D pin 7
67" RC: 9 port C pin :
6:" RC; 9 port C pin ;
6;" RC@ 9 port C pin @
6@" RC4 9 port C pin 4
64" RD: 9 port D pin :
65" RD; 9 port D pin ;
6G" RD@ 9 port D pin @
78" RD4 9 port D pin 4
73" VSS 9 (ro!nd
76" VDD L po*er !ppl+
77" R=8 9 port = pin 8
7:" R=3 9 port = pin 3
7;" R=6 9 port = pin 6
7@" R=7 9 port = pin 7
74" R=: 9 port = pin :
75" R=; 9 port = pin ;
7G" R=@ 9 port = pin @
:8" R=4 9 port = pin 4
ADVANCED VEHICLE SECURITY SYSTEM
=+ !tiliCin( all of thi pin o man+ application can 0e done !ch a<
3" LCD L connect to -ort = pin"
6" LED L connect to an+ pin declared a o!tp!t"
7" Rela+ and Motor 9 connect to an+ pin declared a o!tp!t"
:" E/ternal EE-R&M L connect to I6C interface pin L RC7 and RC: >SCL and SDA?
;" LDR. -otentiometer and enor L connect to analo(!e inp!t pin !ch a RA8"
@" ,SM modem dial !p modem L connect to RC@ and RC4 L the erial comm!nication
interface !in( RS676 protocol"
%or more detail f!nction for each pecific pin pleae refer to the device dataheet from
Microchip"
(.2.4 Clock g"&"raor > o-cillaor
&cillator circ!it i !ed for providin( a microcontroller *ith a cloc)" Cloc) i needed o
that microcontroller co!ld e/ec!te a pro(ram or pro(ram intr!ction"
T/#"- of o-cillaor-
-IC3@%544A can *or) *ith fo!r different confi(!ration of an ocillator" Since
confi(!ration *ith cr+tal ocillator and reitor9capacitor >RC? are the one that are !ed
mot fre2!entl+. thee are the onl+ one *e *ill mention here" Microcontroller t+pe *ith a
cr+tal ocillator ha in it dei(nation MT. and a microcontroller *ith reitor9capacitor
pair ha a dei(nation RC" Thi i important 0eca!e +o! need to mention the t+pe of
ocillator *hen 0!+in( a microcontroller"
?T O-cillaor
Cr+tal ocillator i )ept in metal ho!in( *ith t*o pin *here +o! have *ritten do*n the
fre2!enc+ at *hich cr+tal ocillate" &ne ceramic capacitor of 78p% *hoe other end i
connected to the (ro!nd need to 0e connected *ith each pin"
ADVANCED VEHICLE SECURITY SYSTEM
&cillator and capacitor can 0e pac)ed in 1oint cae *ith three pin" S!ch element i called
ceramic reonator and i repreented in chart li)e the one 0elo*" Center pin of the
element i the (ro!nd. *hile end pin are connected *ith &SC3 and &SC6 pin on the
microcontroller" $hen dei(nin( a device. the r!le i to place an ocillator nearer a
microcontroller. o a to avoid an+ interference on line on *hich microcontroller i
receivin( a cloc)"RC &cillator"
In application *here (reat time preciion i not necear+. RC ocillator offer
additional avin( d!rin( p!rchae" Reonant fre2!enc+ of RC ocillator depend on
!ppl+ volta(e rate. reitance R. capacit+ C and *or)in( temperat!re" It ho!ld 0e
mentioned here that reonant fre2!enc+ i alo infl!enced 0+ normal variation in proce
parameter. 0+ tolerance of e/ternal R and C component. etc"
A0ove dia(ram ho* ho* RC ocillator i connected *ith -IC3@%544A" $ith
val!e of reitor R 0ein( 0elo* 6"6). ocillator can 0ecome !nta0le. or it can even top
the ocillation" $ith ver+ hi(h val!e of R >e/"3M? ocillator 0ecome ver+ enitive to
noie and h!midit+" It i recommended that val!e of reitor R ho!ld 0e 0et*een 7 and
388)" Even tho!(h ocillator *ill *or) *itho!t an e/ternal capacitor >CN8p%?. capacitor
a0ove 68p% ho!ld till 0e !ed for noie and ta0ilit+" No matter *hich ocillator i 0ein(
!ed. in order to (et a cloc) that microcontroller *or) !pon. a cloc) of the ocillator m!t
0e divided 0+ :" &cillator cloc) divided 0+ : can alo 0e o0tained on &SC6ACLF&UT
pin. and can 0e !ed for tetin( or +nchroniCin( other lo(ical circ!it"
%i( 7"; Cloc) and Intr!ction C+cle
%ollo*in( a !ppl+. ocillator tart ocillatin(" &cillation at firt ha an !nta0le period
and amplit!de. 0!t after ome period of time it 0ecome ta0iliCed"
To prevent !ch inacc!rate cloc) from infl!encin( microcontrollerH performance.
*e need to )eep the microcontroller in reet tate d!rin( ta0iliCation of ocillatorH cloc)"
ADVANCED VEHICLE SECURITY SYSTEM
Dia(ram a0ove ho* a t+pical hape of a i(nal *hich microcontroller (et from the
2!artC ocillator"
R"-"
Reet i !ed for p!ttin( the microcontroller into a H)no*nH condition" That
practicall+ mean that microcontroller can 0ehave rather inacc!ratel+ !nder certain
!ndeira0le condition" In order to contin!e it proper f!nctionin( it ha to 0e reet.
meanin( all re(iter *o!ld 0e placed in a tartin( poition" Reet i not onl+ !ed *hen
microcontroller doenHt 0ehave the *a+ *e *ant it to. 0!t can alo 0e !ed *hen tr+in( o!t
a device a an interr!pt in pro(ram e/ec!tion. or to (et a microcontroller read+ *hen
loadin( a pro(ram"
In order to prevent from 0rin(in( a lo(ical Cero to MCLR pin accidentall+ >line a0ove it
mean that reet i activated 0+ a lo(ical Cero?. MCLR ha to 0e connected via reitor to
the poitive !ppl+ pole" Reitor ho!ld 0e 0et*een ; and 38F" Thi )ind of reitor.
*hoe f!nction i to )eep a certain line on a lo(ical one a a preventive. i called a p!ll !p"
Microcontroller -IC3@%544A )no* everal o!rce of reet<
a? Reet d!rin( po*er on. -&R >-o*er9&n Reet?
0? Reet d!rin( re(!lar *or) 0+ 0rin(in( lo(ical Cero to MCLR microcontrollerH pin"
c? Reet d!rin( SLEE- re(ime
d? Reet at *atchdo( timer >$DT? overflo*
e? Reet d!rin( at $DT overflo* d!rin( SLEE- *or) re(ime"
The mot important reet o!rce are a? and 0?" The firt one occ!r each time a po*er
!ppl+ i 0ro!(ht to the microcontroller and erve to 0rin( all re(iter to a tartin(
poition initial tate" The econd one i a prod!ct of p!rpoef!l 0rin(in( in of a lo(ical Cero
to MCLR pin d!rin( normal operation of the microcontroller" Thi econd one i often
!ed in pro(ram development"
D!rin( a reet. RAM memor+ location are not 0ein( reet" The+ are !n)no*n
d!rin( a po*er !p and are not chan(ed at an+ reet" Unli)e thee. S%R re(iter are reet to
a tartin( poition initial tate" &ne of the mot important effect of a reet i ettin( a
ADVANCED VEHICLE SECURITY SYSTEM
pro(ram co!nter >-C? to Cero >8888h? . *hich ena0le the pro(ram to tart e/ec!tin( from
the firt *ritten intr!ction"
Reet at !ppl+ volta(e drop 0elo* the permii0le >=ro*n9o!t Reet? Imp!le for
reettin( d!rin( volta(e volta(e9!p i (enerated 0+ microcontroller itelf *hen it detect an
increae in !ppl+ Vdd >in a ran(e from 3"6V to 3"5V?" That imp!le lat 46m *hich i
eno!(h time for an ocillator to (et ta0iliCed" Thee 46m are provided 0+ an internal
-$RT timer *hich ha it o*n RC ocillator" Microcontroller i in a reet mode a lon( a
-$RT i active" Ho*ever. a device i *or)in(. pro0lem arie *hen !ppl+ doenHt drop
to Cero 0!t fall 0elo* the limit that (!arantee microcontrollerH proper f!nctionin(" Thi
i a li)el+ cae in practice. epeciall+ in ind!trial environment *here dit!r0ance and
inta0ilit+ of !ppl+ are an ever+da+ occ!rrence" To olve thi pro0lem *e need to ma)e
!re that microcontroller i in a reet tate each time !ppl+ fall 0elo* the approved limit"
%i("7"@ Volta(e Drop =elo* the -roper Level
If. accordin( to electrical pecification. internal reet circ!it of a microcontroller
can not atif+ the need. pecial electronic component can 0e !ed *hich are capa0le of
(eneratin( the deired reet i(nal" =eide thi f!nction. the+ can alo f!nction in *atchin(
over !ppl+ volta(e" If volta(e drop 0elo* pecified level. a lo(ical Cero *o!ld appear on
MCLR pin *hich hold the microcontroller in reet tate !ntil volta(e i not *ithin limit
that (!arantee acc!rate performance"
C"&ral Proc"--i&g U&i
ADVANCED VEHICLE SECURITY SYSTEM
Central procein( !nit >C-U? i the 0rain of a microcontroller" Thi part i
reponi0le for findin( and fetchin( the ri(ht intr!ction *hich need to 0e e/ec!ted. for
decodin( that intr!ction. and finall+ for it e/ec!tion" Central procein( !nit connect all
part of the microcontroller into one *hole" S!rel+. it mot important f!nction i to decode
pro(ram intr!ction"
$hen pro(rammer *rite a pro(ram. intr!ction have a clear form li)e M&VL$
8/68" Ho*ever. in order for a microcontroller to !ndertand that. thi HletterH form of an
intr!ction m!t 0e tranlated into a erie of Cero and one *hich i called an HopcodeH"
Thi tranition from a letter to 0inar+ form i done 0+ tranlator !ch a aem0ler
tranlator >alo )no*n a an aem0ler?" Intr!ction th! fetched from pro(ram memor+
m!t 0e decoded 0+ a central procein( !nit" $e can then elect from the ta0le of all the
intr!ction a et of action *hich e/ec!te a ai(ned ta) defined 0+ intr!ction" A
intr!ction ma+ *ithin themelve contain ai(nment *hich re2!ire different tranfer
of data from one memor+ into another. from memor+ onto port. or ome other
calc!lation. C-U m!t 0e connected *ith all part of the microcontroller" Thi i made
poi0le thro!(h a data 0! and an addre 0!"
Arithmetic lo(ic !nit i reponi0le for performin( operation of addin(.
!0tractin(. movin( >left or ri(ht *ithin a re(iter? and lo(ic operation" Movin( data
inide a re(iter i alo )no*n a Hhiftin(H" -IC3@%544A contain an 590it arithmetic lo(ic
!nit and 590it *or) re(iter"
%i( 7"4 STATUS Re(iter format
In intr!ction *ith t*o operand. ordinaril+ one operand i in *or) re(iter >$
re(iter?. and the other i one of the re(iter or a contant" =+ operand *e mean the
content on *hich ome operation i 0ein( done. and a re(iter i an+ one of the ,-R or
S%R re(iter" ,-R i an a00reviation for H,eneral -!rpoe Re(iterH. and S%R for
ADVANCED VEHICLE SECURITY SYSTEM
HSpecial %!nction Re(iterH" In intr!ction *ith one operand. an operand i either $
re(iter or one of the re(iter" A an addition in doin( operation in arithmetic and lo(ic.
ALU control tat! 0it >0it fo!nd in STATUS re(iter?" E/ec!tion of ome intr!ction
affect tat! 0it. *hich depend on the re!lt itelf" Dependin( on *hich intr!ction i
0ein( e/ec!ted. ALU can affect val!e of Carr+ >C?. Di(it Carr+ >DC?. and Oero >O? 0it in
STATUS re(iter"
(.2.@ Por-
Term IportI refer to a (ro!p of pin on a microcontroller *hich can 0e acceed
im!ltaneo!l+. or on *hich *e can et the deired com0ination of Cero and one. or read
from them an e/itin( tat!" -h+icall+. port i a re(iter inide a microcontroller *hich i
connected 0+ *ire to the pin of a microcontroller" Microcontroller !e them in order to
monitor or control other component or device" D!e to f!nctionalit+. ome pin have
t*ofold role li)e -A:AT&CFI for intance. *hich i in the ame time the fo!rth 0it of port
A and an e/ternal inp!t for free9r!n co!nter" Selection of one of thee t*o pin f!nction i
done in one of the confi(!ration re(iter" An ill!tration of thi i the fifth 0it T8CS in
&-TI&N re(iter" =+ electin( one of the f!nction the other one i dia0led"
All port pin can 0e dei(nated a inp!t or o!tp!t. accordin( to the need of a device thatH
0ein( developed" In order to define a pin a inp!t or o!tp!t pin. the ri(ht com0ination of
Cero and one m!t 0e *ritten in TRIS re(iter" If the appropriate 0it of TRIS re(iter
contain lo(ical I3I. then that pin i an inp!t pin. and if the oppoite i tr!e. itH an o!tp!t
pin" Ever+ port ha it proper TRIS re(iter" Th!. port A ha TRISA. and port = ha
TRIS=" -in direction can 0e chan(ed d!rin( the co!re of *or) *hich i partic!larl+
fittin( for one9line comm!nication *here data flo* contantl+ chan(e direction" -&RTA
and -&RT= tate re(iter are located in 0an) 8. *hile TRISA and TRIS= pin direction
re(iter are located in 0an) 3"
8"mor/ orga&iAaio&
ADVANCED VEHICLE SECURITY SYSTEM
-IC3@%544A ha t*o eparate memor+ 0loc). one for data and the other for pro(ram"
EE-R&M memor+ *ith ,-R and S%R re(iter in RAM memor+ ma)e !p the data 0loc).
*hile %LASH memor+ ma)e !p the pro(ram 0loc)"
Program m"mor/
-ro(ram memor+ ha 0een carried o!t in %LASH technolo(+ *hich ma)e it poi0le to
pro(ram a microcontroller man+ time 0efore itH intalled into a device. and even after it
intallment if event!al chan(e in pro(ram or proce parameter ho!ld occ!r" The iCe of
pro(ram memor+ i 386: location *ith 3: 0it *idth *here location Cero and fo!r are
reerved for reet and interr!pt vector"
Daa m"mor/
Data memor+ conit of EE-R&M and RAM memorie" EE-R&M memor+ conit of
6;@ ei(ht 0it location *hoe content i not lot d!rin( looin( of po*er !ppl+"
EE-R&M i not directl+ addrea0le. 0!t i acceed indirectl+ thro!(h EEADR and
EEDATA re(iter" A EE-R&M memor+ !!all+ erve for torin( important parameter
>for e/ample. of a (iven temperat!re in temperat!re re(!lator? . there i a trict proced!re
for *ritin( in EE-R&M *hich m!t 0e follo*ed in order to avoid accidental *ritin("
RAM memor+ for data occ!pie pace on a memor+ map from location 8/8C to 8/:%
*hich come to @5 location" Location of RAM memor+ are alo called ,-R re(iter
*hich i an a00reviation for General Purpose Registers" ,-R re(iter can 0e acceed
re(ardle of *hich 0an) i elected at the moment"
8"mor/ Ba&k-
=eide thi Hlen(thH diviion to S%R and ,-R re(iter. memor+ map i alo divided in
H*idthH >ee precedin( map? to t*o area called H0an)H" Selectin( one of the 0an) i done
via R-8 0it in STATUS re(iter"
ADVANCED VEHICLE SECURITY SYSTEM
E%am#l"'
0cf STATUS. R-8
Intr!ction =C% clear 0it R-8 >R-8N8? in STATUS re(iter and th! et !p 0an) 8"
0f STATUS. R-8
Intr!ction =S% et the 0it R-8 >R-8N3? in STATUS re(iter and th! et !p 0an)3"
It i !ef!l to conider *hat *o!ld happen if the *ron( 0an) *a elected" LetH a!me
that *e have elected 0an) 8 at the 0e(innin( of the pro(ram. and that *e no* *ant to
*rite to certain re(iter located in 0an) 3. a+ TRIS=" Altho!(h *e pecified the name of
the re(iter TRIS=. data *ill 0e act!all+ tored to a 0an) 8 re(iter at the appropriate
addre. *hich i -&RT= in o!r e/ample"
=ANF8 macro
=cf STATUS. R-8 BSelect memor+ 0an) 8
endm
=ANF3 macro
=f STATUS. R-8 BSelect memor+ 0an) 3
endm
=an) election can 0e alo made via directive banksel after *hich name of the re(iter
to 0e acceed i pecified" In thi manner. there i no need to memoriCe *hich re(iter i
in *hich 0an)"
Program Co.&"r
-ro(ram co!nter >-C? i a 3790it re(iter that contain the addre of the intr!ction 0ein(
e/ec!ted" It i ph+icall+ carried o!t a a com0ination of a ;90it re(iter -CLATH for the
five hi(her 0it of the addre. and the 590it re(iter -CL for the lo*er 5 0it of the
addre"
ADVANCED VEHICLE SECURITY SYSTEM
=+ it incrementin( or chan(e >i"e" in cae of 1!mp? microcontroller e/ec!te pro(ram
intr!ction tep90+9tep"
Sack
-IC3@%544A ha a 3790it tac) *ith 5 level. or in other *ord. a (ro!p of 5 memor+
location. 37 0it *ide. *ith pecial p!rpoe" It 0aic role i to )eep the val!e of pro(ram
co!nter after a 1!mp from the main pro(ram to an addre of a !0pro(ram " In order for a
pro(ram to )no* ho* to (o 0ac) to the point *here it tarted from. it ha to ret!rn the
val!e of a pro(ram co!nter from a tac)" $hen movin( from a pro(ram to a !0pro(ram.
pro(ram co!nter i 0ein( p!hed onto a tac) >e/ample of thi i CALL intr!ction?" $hen
e/ec!tin( intr!ction !ch a RETURN. RETL$ or RET%IE *hich *ere e/ec!ted at the
end of a !0pro(ram. pro(ram co!nter *a ta)en from a tac) o that pro(ram co!ld
contin!e *here *a topped 0efore it *a interr!pted" Thee operation of placin( on and
ta)in( off from a pro(ram co!nter tac) are called -USH and -&-. and are named
accordin( to imilar intr!ction on ome 0i((er microcontroller"
I& S/-"m Programmi&g
In order to pro(ram a pro(ram memor+. microcontroller m!t 0e et to pecial *or)in(
mode 0+ 0rin(in( !p MCLR pin to 37";V. and !ppl+ volta(e Vdd ha to 0e ta0iliCed
0et*een :";V to ;";V" -ro(ram memor+ can 0e pro(rammed eriall+ !in( t*o HdataAcloc)H
pin *hich m!t previo!l+ 0e eparated from device line. o that error *o!ldnHt come !p
d!rin( pro(rammin("
ADVANCED VEHICLE SECURITY SYSTEM
%i( 7"5 Direct addrein( format
I&dir"c Addr"--i&g
Indirect !nli)e direct addrein( doe not ta)e an addre from an intr!ction 0!t
derive it from IR- 0it of STATUS and %SR re(iter" Addreed location i acceed via
IND% re(iter *hich in fact hold the addre indicated 0+ a %SR" In other *ord. an+
intr!ction *hich !e IND% a it re(iter in realit+ accee data indicated 0+ a %SR
re(iter" LetH a+. for intance. that one (eneral p!rpoe re(iter >,-R? at addre 8%h
contain a val!e of 68" =+ *ritin( a val!e of 8%h in %SR re(iter *e *ill (et a re(iter
indicator at addre 8%h. and 0+ readin( from IND% re(iter. *e *ill (et a val!e of 68.
*hich mean that *e have read from the firt re(iter it val!e *itho!t accein( it directl+
>0!t via %SR and IND%?" It appear that thi t+pe of addrein( doe not have an+
advanta(e over direct addrein(. 0!t certain need do e/it d!rin( pro(rammin( *hich
can 0e olved moothl+ onl+ thro!(h indirect addrein("
ADVANCED VEHICLE SECURITY SYSTEM
Indirect addrein( i ver+ convenient for manip!latin( data arra+ located in ,-R
re(iter" In thi cae. it i necear+ to initialiCe %SR re(iter *ith a tartin( addre of the
arra+. and the ret of the data can 0e acceed 0+ incrementin( the %SR re(iter"

%i( 7"G Indirect addrein( format
S!ch e/ample incl!de endin( a et of data via erial comm!nication. *or)in( *ith
0!ffer and indicator >*hich *ill 0e dic!ed f!rther in a chapter *ith e/ample?. or
erain( a part of RAM memor+ >3@ location? a in the follo*in( intance"
Readin( data from IND% re(iter *hen the content of %SR re(iter i e2!al to Cero ret!rn
the val!e of Cero. and *ritin( to it re!lt in N&- operation >no operation?"
I&"rr.#-
Interr!pt are a mechanim of a microcontroller *hich ena0le it to repond to ome
event at the moment the+ occ!r. re(ardle of *hat microcontroller i doin( at the time"
Thi i a ver+ important part. 0eca!e it provide connection 0et*een a microcontroller and
environment *hich !rro!nd it" ,enerall+. each interr!pt chan(e the pro(ram flo*.
ADVANCED VEHICLE SECURITY SYSTEM
interr!pt it and after e/ec!tin( an interr!pt !0pro(ram >interr!pt ro!tine? it contin!e
from that ame point on"
Control re(iter of an interr!pt i called INTC&N and can 0e acceed re(ardle of
the 0an) elected" It role i to allo* or diallo*ed interr!pt. and in cae the+ are not
allo*ed. it re(iter in(le interr!pt re2!et thro!(h it o*n 0it"
INTCON R"gi-"r
%i( 7"38 INTC&N re(iter %ormat
Bit 7 <IE >Global Interrupt Enable bit? =it *hich ena0le or dia0le all interr!pt"
3 N all interr!pt are ena0led
8 N all interr!pt are dia0led
Bit 6 EEIE >EEPROM Write Complete Interrupt Enable bit? =it *hich ena0le an interr!pt
at the end of a *ritin( ro!tine to EE-R&M
3 N interr!pt ena0led
8 N interr!pt dia0led
If EEIE and EEI% >*hich i in EEC&N3 re(iter? are et im!ltaneo!l+ . an interr!pt *ill
occ!r"
bit 5 T5IE >TMR0 Oer!lo" Interrupt Enable bit? =it *hich ena0le interr!pt d!rin(
co!nter TMR8 overflo*"
3 N interr!pt ena0led
ADVANCED VEHICLE SECURITY SYSTEM
8 N interr!pt dia0led
If T8IE and T8I% are et im!ltaneo!l+. interr!pt *ill occ!r"
bit # INTE >I$T E%ternal Interrupt Enable bit? =it *hich ena0le e/ternal interr!pt from
pin R=8AINT"
3 N e/ternal interr!pt ena0led
8 N e/ternal interr!pt dia0led
If INTE and INT% are et im!ltaneo!l+. an interr!pt *ill occ!r"
bit & RBIE >RB port '(ange Interrupt Enable bit? Ena0le interr!pt to occ!r at the chan(e
of tat! of pin :. ;. @. and 4 of port ="
3 N ena0le interr!pt at the chan(e of tat!
8 Ninterr!pt dia0led at the chan(e of tat!
If R=IE and R=I% are im!ltaneo!l+ et. an interr!pt *ill occ!r"
bit ) T5IF >TMR0 Oer!lo" Interrupt *lag bit? &verflo* of co!nter TMR8"
3 N co!nter chan(ed it tat! from %%h to 88h
8 N overflo* did not occ!r
=it m!t 0e cleared in pro(ram in order for an interr!pt to 0e detected"
bit + INTF >I$T E%ternal Interrupt *lag bit? E/ternal interr!pt occ!rred"
3 N interr!pt occ!rred
8 N interr!pt did not occ!r
If a riin( or fallin( ed(e *a detected on pin R=8AINT. >*hich i defined *ith 0it
INTED, in &-TI&N re(iter?. 0it INT% i et"
bit 0 RBIF >RB Port C(ange Interrupt *lag bit? =it *hich inform a0o!t chan(e on pin
:. ;. @ and 4 of port ="
3 N at leat one pin ha chan(ed it tat!
8 N no chan(e occ!rred on an+ of the pin
=it ha to 0e cleared in an interr!pt !0ro!tine to 0e a0le to detect f!rther interr!pt"

ADVANCED VEHICLE SECURITY SYSTEM
-IC3@%544A ha fo!r interr!pt o!rce<
3" Termination of *ritin( data to EE-R&M
6" TMR8 interr!pt ca!ed 0+ timer overflo*"
7" Interr!pt d!rin( alteration on R=:. R=;. R=@ and R=4 pin of port ="
:" E/ternal interr!pt from R=8AINT pin of microcontroller
,enerall+ pea)in(. each interr!pt o!rce ha t*o 0it 1oined to it" &ne ena0le
interr!pt. and the other detect *hen interr!pt occ!r" There i one common 0it called ,IE
*hich can 0e !ed to diallo* or ena0le all interr!pt im!ltaneo!l+" Thi 0it i ver+
!ef!l *hen *ritin( a pro(ram 0eca!e it allo* for all interr!pt to 0e dia0led for a
period of time. o that e/ec!tion of ome important part of a pro(ram *o!ld not 0e
interr!pted" $hen intr!ction *hich reet ,IE 0it *a e/ec!ted >,IEN8. all interr!pt
diallo*ed?. an+ interr!pt that remained !nolved ho!ld 0e i(nored"
Interr!pt *hich remained !nolved and *ere i(nored. are proceed *hen ,IE 0it
>,IEN3. all interr!pt allo*ed? *o!ld 0e cleared" $hen interr!pt *a an*ered. ,IE 0it
*a cleared o that an+ additional interr!pt *o!ld 0e dia0led. ret!rn addre *a p!hed
onto tac) and addre 888:h *a *ritten in pro(ram co!nter 9 onl+ after thi doe
repl+in( to an interr!pt 0e(inP After interr!pt i proceed. 0it *hoe ettin( ca!ed an
interr!pt m!t 0e cleared. or interr!pt ro!tine *o!ld a!tomaticall+ 0e proceed over a(ain
d!rin( a ret!rn to the main pro(ram"
B""#i&g !" co&"&- of im#ora& r"gi-"r-
&nl+ ret!rn val!e of pro(ram co!nter i tored on a tac) d!rin( an interr!pt >0+
ret!rn val!e of pro(ram co!nter *e mean the addre of the intr!ction *hich *a to 0e
e/ec!ted. 0!t *anHt 0eca!e interr!pt occ!rred?" Feepin( onl+ the val!e of pro(ram
co!nter i often not eno!(h" Some re(iter *hich are alread+ in !e in the main pro(ram
can alo 0e in !e in interr!pt ro!tine" If the+ *ere not retained. main pro(ram *o!ld
d!rin( a ret!rn from an interr!pt ro!tine (et completel+ different val!e in thoe re(iter.
*hich *o!ld ca!e an error in the pro(ram" &ne e/ample for !ch a cae i content of the
*or) re(iter $" If *e !ppoe that main pro(ram *a !in( *or) re(iter $ for ome of
ADVANCED VEHICLE SECURITY SYSTEM
it operation. and if it had tored in it ome val!e thatH important for the follo*in(
intr!ction. then an interr!pt *hich occ!r 0efore that intr!ction *o!ld chan(e the val!e
of *or) re(iter $ *hich *o!ld directl+ 0e infl!enced the main pro(ram"
-roced!re of recordin( important re(iter 0efore (oin( to an interr!pt ro!tine i
called -USH. *hile the proced!re *hich 0rin( recorded val!e 0ac). i called -&-"
-USH and -&- are intr!ction *ith ome other microcontroller >Intel?. 0!t are o *idel+
accepted that a *hole operation i named after them" -IC3@%544A doe not have
intr!ction li)e -USH and -&-. and the+ have to 0e pro(rammed"
%i( 7"33 Common error< avin( the val!e *anHt done 0efore enterin( the interr!pt ro!tine
D!e to implicit+ and fre2!ent !a(e. thee part of the pro(ram can 0e made a macro"
The concept of a Macro i e/plained in I-ro(ram aem0l+ lan(!a(eI" In the follo*in(
e/ample. content of $ and STATUS re(iter are tored in $KTEM- and
STATUSKTEM- varia0le prior to interr!pt ro!tine" At the 0e(innin( of -USH ro!tine *e
need to chec) preentl+ elected 0an) 0eca!e $KTEM- and STATUSKTEM- are fo!nd in
ADVANCED VEHICLE SECURITY SYSTEM
0an) 8" %or e/chan(e of data 0et*een thee re(iter. S$A-% intr!ction i !ed intead of
M&V% 0eca!e it doe not affect the STATUS re(iter 0it"
E/ample i an aem0ler pro(ram for follo*in( tep<
3" Tetin( the c!rrent 0an)
6" Storin( re(iter re(ardle of the c!rrent 0an)
7" Storin( STATUS re(iter in 0an) 8"
:" E/ec!tin( interr!pt ro!tine for interr!pt procein( >ISR?
;" Retore STATUS re(iter
@" Retore $ re(iter
If there are ome more varia0le or re(iter that need to 0e tored. then the+ need to
0e )ept after torin( STATUS re(iter >tep 7?. and 0ro!(ht 0ac) 0efore STATUS re(iter
i retored >tep ;?" The ame e/ample can 0e carried o!t !in( macro. th! (ettin( a more
le(i0le pro(ram" Macro that are alread+ defined can 0e !ed for *ritin( ne* macro"
Macro =ANF3 and =ANF8 *hich are e/plained in IMemor+ or(aniCationI chapter are
!ed *ith macro Hp!hH and HpopH"
Fr"":r.& im"r T8R5
Timer are !!all+ the mot complicated part of a microcontroller. o it i necear+ to et
aide more time for !ndertandin( them thoro!(hl+" Thro!(h their application it i poi0le
to eta0lih relation 0et*een a real dimenion !ch a ItimeI and a varia0le *hich
repreent tat! of a timer *ithin a microcontroller" -h+icall+. timer i a re(iter *hoe
val!e i contin!all+ increain( to 6;;. and then it tart all over a(ain< 8. 3. 6. 7.
:"""6;;""""8.3. 6. 7""""""etc"
Thi incrementin( i done in the 0ac)(ro!nd of ever+thin( a microcontroller doe" It i
!p to pro(rammer to thin) !p a *a+ ho* he *ill ta)e advanta(e of thi characteritic for
ADVANCED VEHICLE SECURITY SYSTEM
hi need" &ne of the *a+ i increain( ome varia0le on each timer overflo*" If *e )no*
ho* m!ch time a timer need to ma)e one complete ro!nd. then m!ltipl+in( the val!e of a
varia0le 0+ that time *ill +ield the total amo!nt of elaped time"
EEPRO8 Daa m"mor/
-IC3@%544A ha 6;@ 0+te of EE-R&M memor+ location on addree from 88h to @7h
that can 0e *ritten to or read from" The mot important characteritic of thi memor+ i
that it doe not loe it content *ith the lo of po*er !ppl+" Data can 0e retained in
EE-R&M *itho!t po*er !ppl+ for !p to :8 +ear >a man!fact!rer of -IC3@%544A
microcontroller tate?. and !p to 3 million c+cle of *ritin( can 0e e/ec!ted"
In practice. EE-R&M memor+ i !ed for torin( important data or proce
parameter" &ne !ch parameter i a (iven temperat!re. ai(ned *hen ettin( !p a
temperat!re re(!lator to ome proce" If that data *anHt retained. it *o!ld 0e necear+ to
ad1!t a (iven temperat!re after each lo of !ppl+" Since thi i ver+ impractical >and
even dan(ero!?. man!fact!rer of microcontroller have 0e(an intallin( one maller t+pe
of EE-R&M memor+"

(.( <.S.8 8od"m=8oClil"
(.(.1 <S8 Hi-or/
D!rin( the earl+ 3G58. analo( cell!lar telephone +tem *ere e/periencin( rapid (ro*th
in E!rope. partic!larl+ in Scandinavia and the United Fin(dom. 0!t alo in %rance and
,erman+" Each co!ntr+ developed it o*n +tem. *hich *a incompati0le *ith ever+one
eleH in e2!ipment and operation" Thi *a an !ndeira0le it!ation. 0eca!e not onl+ *a
the mo0ile e2!ipment limited to operation *ithin national 0o!ndarie. *hich in a !nified
E!rope *ere increain(l+ !nimportant. 0!t there *a alo a ver+ limited mar)et for each
t+pe of e2!ipment. o economie of cale and the !0e2!ent avin( co!ld not 0e realiCed"
ADVANCED VEHICLE SECURITY SYSTEM
The E!ropean realiCed thi earl+ on. and in 3G56 the Conference of E!ropean -ot
and Tele(raph >CE-T? formed a t!d+ (ro!p called the ,ro!pe Special Mo0ile >,SM? to
t!d+ and develop a pan9E!ropean p!0lic land mo0ile +tem" The propoed +tem had to
meet certain criteria<
,ood !01ective peech 2!alit+
Lo* terminal and ervice cot
Lo* terminal and ervice cot
A0ilit+ to !pport handheld terminal
S!pport for ran(e of ne* ervice and facilitie
Spectral efficienc+
ISDN compati0ilit+
-an9E!ropean mean E!ropean9*ide" ISDN thro!(hp!t at @:F0 *a never enviioned.
indeed. the hi(het rate a normal ,SM net*or) can achieve i G"@)0"
E!rope a* cell!lar ervice introd!ced in 3G53. *hen the Nordic Mo0ile Telephone
S+tem or NMT:;8 0e(an operatin( in Denmar). S*eden. %inland. and Nor*a+ in the :;8
MHC ran(e" It *a the firt m!ltinational cell!lar +tem" In 3G5; ,reat =ritain tarted
!in( the Total Acce Comm!nication S+tem or TACS at G88 MHC" Later. the $et
,erman C9NetC. the %rench Radio C&M 6888. and the Italian RTMIARTMS helped ma)e
!p E!ropeH nine analo( incompati0le radio telephone +tem" -lan *ere afoot d!rin( the
earl+ 3G58. ho*ever. to create a in(le E!ropean *ide di(ital mo0ile ervice *ith
advanced feat!re and ea+ roamin(" $hile North American (ro!p concentrated on
0!ildin( o!t their ro0!t 0!t increain(l+ fra!d pla(!ed and feat!rele analo( net*or).
E!rope planned for a di(ital f!t!re"
In 3G5G. ,SM reponi0ilit+ *a tranferred to the E!ropean Telecomm!nication
Standard Intit!te >ETSI?. and phae I of the ,SM pecification *ere p!0lihed in 3GG8"
Commercial ervice *a tarted in mid93GG3. and 0+ 3GG7 there *ere 7@ ,SM net*or) in
66 co!ntrie" Altho!(h tandardiCed in E!rope. ,SM i not onl+ a E!ropean tandard"
&ver 688 ,SM net*or) >incl!din( DCS3588 and -CS3G88? are operational in 338
co!ntrie aro!nd the *orld" In the 0e(innin( of 3GG:. there *ere 3"7 million !0cri0er
ADVANCED VEHICLE SECURITY SYSTEM
*orld*ide. *hich had (ro*n to more than ;; million 0+ &cto0er 3GG4" $ith North
America ma)in( a dela+ed entr+ into the ,SM field *ith a derivative of ,SM called
-CS3G88. ,SM +tem e/it on ever+ continent. and the acron+m ,SM no* aptl+ tand
for ,lo0al S+tem for Mo0ile comm!nication"
The developer of ,SM choe an !nproven >at the time? di(ital +tem. a oppoed to
the then9tandard analo( cell!lar +tem li)e AM-S in the United State and TACS in the
United Fin(dom" The+ had faith that advancement in compreion al(orithm and di(ital
i(nal proceor *o!ld allo* the f!lfillment of the ori(inal criteria and the contin!al
improvement of the +tem in term of 2!alit+ and cot" The over 5888 pa(e of ,SM
recommendation tr+ to allo* fle/i0ilit+ and competitive innovation amon( !pplier. 0!t
provide eno!(h tandardiCation to (!arantee proper net*or)in( 0et*een the component
of the +tem" Thi i done 0+ providin( f!nctional and interface decription for each of
the f!nctional entitie defined in the +tem"
(.(.2 S"r0ic"- #ro0id"d C/ <S8
%rom the 0e(innin(. the planner of ,SM *anted ISDN compati0ilit+ in term of the
ervice offered and the control i(nalin( !ed" Ho*ever. radio tranmiion limitation. in
term of 0and*idth and cot. do not allo* the tandard ISDN =9channel 0it rate of @: )0p
to 0e practicall+ achieved"
Telecomm!nication ervice can 0e divided into 0earer ervice. teleervice. and
!pplementar+ ervice" The mot 0aic tele ervice !pported 0+ ,SM i telephon+" A
*ith all other comm!nication. peech i di(itall+ encoded and tranmitted thro!(h the
,SM net*or) a a di(ital tream" There i alo an emer(enc+ ervice. *here the nearet
emer(enc+9ervice provider i notified 0+ dialin( three di(it"
B"ar"r -"r0ic"-< T+picall+ data tranmiion intead of voice" %a/ and SMS are
e/ample"
T"l"-"r0ic"-< Voice oriented traffic"
S.##l"m"&ar/ -"r0ic"-< Call for*ardin(. caller ID. call *aitin( and the li)e"
ADVANCED VEHICLE SECURITY SYSTEM
A variet+ of data ervice i offered" ,SM !er can end and receive data. at rate !p
to G@88 0p. to !er on -&TS >-lain &ld Telephone Service?. ISDN. -ac)et S*itched
-!0lic Data Net*or). and Circ!it S*itched -!0lic Data Net*or) !in( a variet+ of
acce method and protocol. !ch a M"6; or M"76" Since ,SM i a di(ital net*or). a
modem i not re2!ired 0et*een the !er and ,SM net*or). altho!(h an a!dio modem i
re2!ired inide the ,SM net*or) to inter*or) *ith -&TS"
&ther data ervice incl!de ,ro!p 7 facimile. a decri0ed in ITU9T
recommendation T"78. *hich i !pported 0+ !e of an appropriate fa/ adaptor" A !ni2!e
feat!re of ,SM. not fo!nd in older analo( +tem. i the Short Mea(e Service >SMS?"
SMS i a 0idirectional ervice for hort alphan!meric >!p to 3@8 0+te? mea(e"
Mea(e are tranported in a tore9and9for*ard fahion" %or point9to9point SMS. a
mea(e can 0e ent to another !0cri0er to the ervice. and an ac)no*led(ement of
receipt i provided to the ender" SMS can alo 0e !ed in a cell90roadcat mode. for
endin( mea(e !ch a traffic !pdate or ne* !pdate" Mea(e can alo 0e tored in
the SIM card for later retrieval"
S!pplementar+ ervice are provided on top of tele ervice or 0earer ervice" In the
c!rrent >-hae I? pecification. the+ incl!de everal form of call for*ard >!ch a call
for*ardin( *hen the mo0ile !0cri0er i !nreacha0le 0+ the net*or)?. and call 0arrin( of
o!t(oin( or incomin( call. for e/ample *hen roamin( in another co!ntr+" Man+
additional !pplementar+ ervice *ill 0e provided in the -hae 6 pecification. !ch a
caller identification. call *aitin(. m!lti9part+ converation"
(.(.( 8oCil" Saio&
The mo0ile tation >MS? conit of the mo0ile e2!ipment >the terminal? and a mart card
called the S!0cri0er Identit+ Mod!le >SIM?" The SIM provide peronal mo0ilit+. o that
the !er can have acce to !0cri0ed ervice irrepective of a pecific terminal" =+
inertin( the SIM card into another ,SM terminal. the !er i a0le to receive call at that
terminal. ma)e call from that terminal. and receive other !0cri0ed ervice"
ADVANCED VEHICLE SECURITY SYSTEM
The mo0ile e2!ipment i !ni2!el+ identified 0+ the International Mo0ile E2!ipment
Identit+ >IMEI?" The SIM card contain the International Mo0ile S!0cri0er Identit+
>IMSI? !ed to identif+ the !0cri0er to the +tem. a ecret )e+ for a!thentication. and
other information" The IMEI and the IMSI are independent. there0+ allo*in( peronal
mo0ilit+" The SIM card ma+ 0e protected a(aint !na!thoriCed !e 0+ a pa*ord or
peronal identit+ n!m0er"
,SM phone !e SIM card. or S!0cri0er information or identit+ mod!le" The+Hre
the 0i((et difference a !er ee 0et*een a ,SM phone or handet and a conventional
cell!lar telephone" $ith the SIM card and it memor+ the ,SM handet i a mart phone.
doin( man+ thin( a conventional cell!lar telephone cannot" Li)e )eepin( a 0!ilt in phone
0oo) or allo*in( different rin( tone to 0e do*nloaded and then tored" Conventional
cell!lar telephone either lac) the feat!re ,SM phone have 0!ilt in. or the+ m!t rel+ on
reo!rce from the cell!lar +tem itelf to provide them" Let me ma)e another. important
point"
$ith a SIM card +o!r acco!nt can 0e hared from mo0ile to mo0ile. at leat in
theor+" $ant to tr+ o!t +o!r nei(h0orH 0rand ne* mo0ileQ Yo! ho!ld 0e a0le to p!t +o!r
SIM card into that ,SM handet and have it *or)" The ,SM net*or) care onl+ that a
valid acco!nt e/it. not that +o! are !in( a different device" Yo! (et 0illed. not the
nei(h0or *ho loaned +o! the phone"
Thi fle/i0ilit+ i completel+ different than AM-S technolo(+. *hich ena0le one
device per acco!nt" No *itchin( aro!nd" Conventional cell!lar telephone have their
electronic erial n!m0er 0!rned into a chipet *hich i permanentl+ attached to the phone"
No *a+ to chan(e o!t that chipet or trade *ith another phone" SIM card technolo(+. 0+
comparion. i meant to ma)e harin( phone and other ,SM device 2!ic) and ea+"
ADVANCED VEHICLE SECURITY SYSTEM
Fig.(.12 8oCil" -aio& SI8 #or
&n the left a0ove< %ront of a -acific =ell ,SM phone" In the middle a0ove< Same phone.
ho*in( the 0ac)" The SIM card i the *hite platic 2!are" It fit into the (re+ colored
holder ne/t to it" &n the ri(ht a0ove" A ne* and different idea. a holder for t*o SIM card.
allo*in( one phone to acce either of t*o *irele carrier" -rovided +o! have an acco!nt
*ith 0oth" <9? The Sim card i to the left of the 0od+"
(.(.7 Ba-" Saio& S.C-/-"m
The =ae Station S!0+tem i compoed of t*o part. the =ae Tranceiver Station >=TS?
and the =ae Station Controller >=SC?" Thee comm!nicate acro the tandardiCed A0i
interface. allo*in( >a in the ret of the +tem? operation 0et*een component made 0+
different !pplier"
The =ae Tranceiver Station ho!e the radio tranceiver that define a cell and
handle the radio9lin) protocol *ith the Mo0ile Station" In a lar(e !r0an area. there *ill
potentiall+ 0e a lar(e n!m0er of =TS deplo+ed. th! the re2!irement for a =TS are
r!((edne. relia0ilit+. porta0ilit+. and minim!m cot"
ADVANCED VEHICLE SECURITY SYSTEM
%i( 7"37 =ate Station S!0+tem"
The =TS or =ae Tranceiver Station i alo called an R=S or Remote =ae tation"
$hatever the name. thi i the radio (ear that pae all call comin( in and (oin( o!t of a
cell ite" The 0ae tation i !nder direction of a 0ae tation controller o traffic (et ent
there firt" The 0ae tation controller. decri0ed 0elo*. (ather the call from man+ 0ae
tation and pae them on to a mo0ile telephone *itch" %rom that *itch come and (o
the call from the re(!lar telephone net*or)" Some 0ae tation are 2!ite mall. the one
pict!red here i a lar(e o!tdoor !nit" The lar(e n!m0er of 0ae tation and their attendant
controller. are a 0i( difference 0et*een ,SM and IS937@"
T!" Ba-" Saio& Co&roll"r
The =ae Station Controller mana(e the radio reo!rce for one or more =TS" It handle
radio9channel et!p. fre2!enc+ hoppin(. and handover. a decri0ed 0elo*" The =SC i
the connection 0et*een the mo0ile tation and the Mo0ile ervice S*itchin( Center
>MSC?"
Another difference 0et*een conventional cell!lar and ,SM i the 0ae tation
controller" ItH an intermediate tep 0et*een the 0ae tation tranceiver and the mo0ile
*itch" ,SM dei(ner tho!(ht thi a 0etter approach for hi(h denit+ cell!lar net*or)"
A one anon+mo! *riter penned. IIf ever+ 0ae tation tal)ed directl+ to the MSC. traffic
*o!ld 0ecome too con(eted" To en!re 2!alit+ comm!nication via traffic mana(ement.
the *irele infratr!ct!re net*or) !e =ae Station Controller a a *a+ to e(ment the
ADVANCED VEHICLE SECURITY SYSTEM
net*or) and control con(etion" The re!lt i that MSC ro!te their circ!it to =SC *hich
in t!rn are reponi0le for connectivit+ and ro!tin( of call for ;8 to 388 *irele 0ae
tation"I
%i( 7"3: Siemen =SC

Man+ ,SM decription pict!re e2!ipment called a TRAU. *hich tand for Trancodin(
Rate and Adaptation Unit" &f co!re alo )no*n a a TranCodin( Unit or TCU. the
TRAU i a compreor and converter" It firt compree traffic comin( from the mo0ile
thro!(h the 0ae tation controller" ThatH 2!ite an achievement 0eca!e voice and data
have alread+ 0een compreed 0+ the voice coder in the handet" An+*a+. it cr!nche that
data do*n even f!rther" It then p!t the traffic into a format the Mo0ile S*itch can
!ndertand" Thi i the TranCodin( part of it name. *here code in one format i
converted to another" The TRAU i not re2!ired 0!t apparentl+ it ave 2!ite a 0it of
mone+ to intall one" HereH ho* Nortel Net*or) ell their !nit<
IRed!ce tranmiion reo!rce and realiCe !p to 4;R tranmiion cot avin( *ith
the TCU"I
IThe TranCodin( Unit >TCU?. inerted 0et*een the =SC and MSC. ena0le peech
compreion and data rate adaptation *ithin the radio cell!lar net*or)" The TCU i
dei(ned to red!ce tranmiion cot 0+ minimiCin( tranmiion reo!rce 0et*een the
=SC and MSC" Thi i achieved 0+ red!cin( the n!m0er of -CM lin) (oin( to the =SC.
ince fo!r traffic channel >data or peech? can 0e handled 0+ one -CM time lot"
ADVANCED VEHICLE SECURITY SYSTEM
Additionall+. the mod!lar architect!re of the TCU !pport all three ,SM vocoder >%!ll
Rate. Enhanced %!ll Rate. and Half Rate? in the ame ca0inet. providin( +o! *ith a
complete ran(e of deplo+ment option"I
%i( 7"3; Siemen' TRAU
Voice coder or vocoder are 0!ilt into the handet a cell!lar carrier ditri0!te"
The+Hre the circ!itr+ that t!rn peech into di(ital" The carrier pecifie *hich rate the+
*ant traffic compreed. either a (reat deal or 1!t a little" The cell!lar +tem i dei(ned
thi *a+. *ith handet vocoder *or)in( in lea(!e *ith the e2!ipment of the 0ae tation
!0+tem"
(.(.6 Arc!i"c.r" of !" <S8 &",ork
A ,SM net*or) i compoed of everal f!nctional entitie. *hoe f!nction and interface
are pecified" %i(!re 3 ho* the la+o!t of a (eneric ,SM net*or)" The ,SM net*or) can
0e divided into three 0road part" The Mo0ile Station i carried 0+ the !0cri0er" The =ae
Station S!0+tem control the radio lin) *ith the Mo0ile Station" The Net*or)
S!0+tem. the main part of *hich i the Mo0ile ervice S*itchin( Center >MSC?.
perform the *itchin( of call 0et*een the mo0ile !er. and 0et*een mo0ile and fi/ed
net*or) !er" The MSC alo handle the mo0ilit+ mana(ement operation" Not ho*n i
the &peration and Maintenance Center. *hich overee the proper operation and et!p of
ADVANCED VEHICLE SECURITY SYSTEM
the net*or)" The Mo0ile Station and the =ae Station S!0+tem comm!nicate acro the
Um interface. alo )no*n a the air interface or radio lin)" The =ae Station S!0+tem
comm!nicate *ith the Mo0ile ervice S*itchin( Center acro the A interface"
A Sohn tate. he preent a (eneric ,SM architect!re" L!cent. Ericon. No)ia. and
other feat!re their o*n viion in their o*n dia(ram"
L!cent ,SM architect!reA Ericon ,SM architect!re A No)ia ,SM architect!re A
Siemen' ,SM architect!re
%i( 7"3; ,eneral architect!re of a ,SM net*or)
(.(.9 Radio li&k a-#"c-
The International Telecomm!nication Union >ITU?. *hich mana(e the international
allocation of radio pectr!m >amon( man+ other f!nction?. allocated the 0and 5G89G3;
MHC for the !plin) >mo0ile tation to 0ae tation? and G7;9G@8 MHC for the do*nlin)
>0ae tation to mo0ile tation? for mo0ile net*or) in E!rope" Since thi ran(e *a
alread+ 0ein( !ed in the earl+ 3G58 0+ the analo( +tem of the da+. the CE-T had the
forei(ht to reerve the top 38 MHC of each 0and for the ,SM net*or) that *a till 0ein(
developed" Event!all+. ,SM *ill 0e allocated the entire 6/6; MHC 0and*idth"
Cell!lar Radio fre2!encie aro!nd the *orld
ADVANCED VEHICLE SECURITY SYSTEM
American Cell!lar
AM-S. N9AM-S. D9
AM-S >IS937@?
CDMA
56:95:G MHC
5@G95G: MHC
Mo0ile to 0ae
=ae to mo0ile
American -CSA,SM
Narro*0and G839G:3 MHC
=road0and
35;893G38MHC
3G7893GG8
MHC
Mo0ile to 0ae
=ae to mo0ile
E9TACS

5469G8; MHC
G349G;8 MHC
Mo0ile to 0ae
=ae to mo0ile
,SM
,SM ha three main
fre2!enc+ 0and
aro!nd the *orld< G88
MHC. 3588 MHC. and
3G88 MHC" It all
depend on the
co!ntr+" &ther 0and
ma+ 0e !ed in the
f!t!re or ma+ 0e in
trial ri(ht no*"
G7;9G@8MHC
5G89G3;MHC

3588MHC
3G88 MHC"

SDC

538956@ MHC
G:89G;@ MHC
3:6G93::3
MHC
3:4493:5G
MHC
Mo0ile to 0ae
=ae to mo0ile
=ae to mo0ile
Mo0ile to 0ae
(.(.3 8.li#l" acc"-- a&d c!a&&"l -r.c.r"
Since radio pectr!m i a limited reo!rce hared 0+ all !er. a method m!t 0e devied to
divide !p the 0and*idth amon( a man+ !er a poi0le" The method choen 0+ ,SM i
a com0ination of Time9 and %re2!enc+9Diviion M!ltiple Acce >TDMAA%DMA?" The
%DMA part involve the diviion 0+ fre2!enc+ of the >ma/im!m? 6; MHC 0and*idth into
36: carrier fre2!encie paced 688 )HC apart" &ne or more carrier fre2!encie are ai(ned
ADVANCED VEHICLE SECURITY SYSTEM
to each 0ae tation" Each of thee carrier fre2!encie i then divided in time. !in( a
TDMA cheme" The f!ndamental !nit of time in thi TDMA cheme i called a 0!rt
period and it lat 3;A6@ m >or appro/" 8";44 m?" Ei(ht 0!rt period are (ro!ped into a
TDMA frame >368A6@ m. or appro/" :"@3; m?. *hich form the 0aic !nit for the
definition of lo(ical channel" &ne ph+ical channel i one 0!rt period per TDMA frame"
Traffic c!a&&"l-
A traffic channel >TCH? i !ed to carr+ peech and data traffic" Traffic channel are
defined !in( a 6@9frame m!ltiframe. or (ro!p of 6@ TDMA frame" The len(th of a 6@9
frame m!ltiframe i 368 m. *hich i ho* the len(th of a 0!rt period i defined >368 m
divided 0+ 6@ frame divided 0+ 5 0!rt period per frame?" &!t of the 6@ frame. 6: are
!ed for traffic. 3 i !ed for the Slo* Aociated Control Channel >SACCH? and 3 i
c!rrentl+ !n!ed >ee %i(!re 6?" TCH for the !plin) and do*nlin) are eparated in time 0+
7 0!rt period. o that the mo0ile tation doe not have to tranmit and receive
im!ltaneo!l+. th! implif+in( the electronic"
Co&rol c!a&&"l-
Common channel can 0e acceed 0oth 0+ idle mode and dedicated mode mo0ile" The
common channel are !ed 0+ idle mode mo0ile to e/chan(e the i(nalin( information
re2!ired to chan(e to dedicated mode" Mo0ile alread+ in dedicated mode monitor the
!rro!ndin( 0ae tation for handover and other informatio"Dedicated mode mean a
mo0ile i in !e"
Dedicated to ervice" Control and common channel eem to 0e +non+mo! term"
Spea)in( of term. donHt tr+ to memoriCe thee channel name and f!nction"
Co&rol C!a&&"l- C!a&&"l T/#"- U-ag"
Broadca- Co&rol
C!a&&"l ;BCCHD
=roadcat do*nlin)
>=ae tation to mo0ile?
Contin!all+
0roadcat. on
the do*nlin).
information
incl!din( 0ae
ADVANCED VEHICLE SECURITY SYSTEM
tation identit+.
fre2!enc+
allocation. and
fre2!enc+9
hoppin(
e2!ence"
Fr"E."&c/
Corr"cio& C!a&&"l
;FCCHD =roadcat do*nlin)
Ued to
+nchroniCe the
mo0ile to the
time lot
tr!ct!re of a
cell 0+ definin(
the 0o!ndarie
of 0!rt period.
and the time lot
n!m0erin("
Ever+ cell in a
,SM net*or)
0roadcat
e/actl+ one
%CCH and one
SCH. *hich are
0+ definition on
time lot n!m0er
8 >*ithin a
TDMA frame?"
S/&c!ro&iAaio&
C!a&&"l ;SCHD
=roadcat do*nlin)
Ra&dom Acc"--
C!a&&"l ;RACHD
Common !plin)
>Mo0ile to 0ae tation?
Slotted Aloha
channel !ed 0+
the mo0ile to
re2!et acce to
the net*or)"
>p"" I love that
term IAlohaIB
appropriate and
to the point?
Pagi&g C!a&&"l
;PCHD
Common do*nlin)
>=ae tation to mo0ile?
Ued to alert the
mo0ile tation of
an incomin(
call"
Acc"-- <ra&
C!a&&"l ;A<CHD
=roadcat do*nlin) Ued to allocate
an SDCCH to a
mo0ile for
ADVANCED VEHICLE SECURITY SYSTEM
i(nalin( >in
order to o0tain a
dedicated
channel?.
follo*in( a
re2!et on the
RACH"
Slo, A--ocia"d
Co&rol C!a&&"l
;SACCHD
Uplin) and do*nlin)
In ever+ traffic
channel" Ued
for lo* rate. non
critical
i(nalin("
Fa- A--ocia"d
Co&rol C!a&&"l
;FACCHD
Uplin) and do*nlin)
IA hi(h rate
i(nalin(
channel. !ed
d!rin( call
eta0lihment.
!0cri0er
a!thentication.
and for
handover
command"I
Macaroon
(.(.4 Fr"E."&c/ !o##i&g
The mo0ile tation alread+ ha to 0e fre2!enc+ a(ile. meanin( it can move 0et*een a
tranmit. receive. and monitor time lot *ithin one TDMA frame. *hich normall+ are on
different fre2!encie" ,SM ma)e !e of thi inherent fre2!enc+ a(ilit+ to implement lo*
fre2!enc+ hoppin(. *here the mo0ile and =TS tranmit each TDMA frame on a different
carrier fre2!enc+" The fre2!enc+ hoppin( al(orithm i 0roadcat on the =roadcat Control
Channel" Since m!ltipath fadin( i dependent on carrier fre2!enc+. lo* fre2!enc+
hoppin( help alleviate the pro0lem" In addition. co9channel interference i in effect
randomiCed"
HereH a h!(e difference 0et*een conventional cell!lar >IS937@? and ,SM< fre2!enc+
hoppin(" $hen ena0led. lot *ithin frame can leapfro( from one fre2!enc+ to another" In
ADVANCED VEHICLE SECURITY SYSTEM
IS937@. 0+ comparion. once ai(ned a channel +o!r call ta+ on that pair of radio
fre2!encie !ntil the call i over or +o! have moved to another cell"
(.(.@ Di-co&i&.o.- r"c"#io&
Another method !ed to conerve po*er at the mo0ile tation i dicontin!o! reception"
The pa(in( channel. !ed 0+ the 0ae tation to i(nal an incomin( call. i tr!ct!red into
!09channel" Each mo0ile tation need to liten onl+ to it o*n !09channel" In the time
0et*een !cceive pa(in( !09channel. the mo0ile can (o into leep mode. *hen almot
no po*er i !ed"
(.(.15 Po,"r co&rol
There are five clae of mo0ile tation defined. accordin( to their pea) tranmitter po*er.
rated at 68. 5. ;. 6. and 8"5 *att" To minimiCe co9channel interference and to conerve
po*er. 0oth the mo0ile and the =ae Tranceiver Station operate at the lo*et po*er
level that *ill maintain an accepta0le i(nal 2!alit+" -o*er level can 0e tepped !p or
do*n in tep of 6 d= from the pea) po*er for the cla do*n to a minim!m of 37 d=m
>68 milli*att?"
$e need onl+ eno!(h po*er to ma)e a connection" An+ more i !perfl!o!" If +o!
canHt ma)e a connection !in( one *att then t*o *att *onHt help at thee near micro*ave
fre2!encie" Uin( le po*er mean le interference or con(etion amon( all the mo0ile
in a cell"
The mo0ile tation mea!re the i(nal tren(th or i(nal 2!alit+ >0aed on the =it
Error Ratio?. and pae the information to the =ae Station Controller. *hich !ltimatel+
decide if and *hen the po*er level ho!ld 0e chan(ed" -o*er control ho!ld 0e handled
caref!ll+. ince there i the poi0ilit+ of inta0ilit+" Thi arie from havin( mo0ile in co9
channel cell alternatin( increae their po*er in repone to increaed co9channel
interference ca!ed 0+ the other mo0ile increain( it po*er" Thi in !nli)el+ to occ!r in
practice 0!t it i >or *a a of 3GG3? !nder t!d+"
ADVANCED VEHICLE SECURITY SYSTEM
T*o point" The firt i that the 0ae tation can reach o!t to the mo0ile and t!rn
do*n the tranmittin( po*er the handet i !in(" Ver+ cool" The econd point i that a
di(ital i(nal *ill drop a call m!ch more 2!ic)l+ than an analo( i(nal" $ith an analo(
radio +o! can hear thro!(h tatic and fadin(" =!t *ith a di(ital radio the connection *ill 0e
dropped. 1!t li)e +o!r landline modem. *hen too man+ 8 and 3 (o miin(" Yo! need
more 0ae tation. cone2!entl+. to provide the ame covera(e a analo(
(.(.11 N",ork a-#"c-
En!rin( the tranmiion of voice or data of a (iven 2!alit+ over the radio lin) i onl+ part
of the f!nction of a cell!lar mo0ile net*or)" A ,SM mo0ile can eamlel+ roam
nationall+ and internationall+. *hich re2!ire that re(itration. a!thentication. call ro!tin(
and location !pdatin( f!nction e/it and are tandardiCed in ,SM net*or)" In addition.
the fact that the (eo(raphical area covered 0+ the net*or) i divided into cell neceitate
the implementation of a handover mechanim" Thee f!nction are performed 0+ the
Net*or) S!0+tem. mainl+ !in( the Mo0ile Application -art >MA-? 0!ilt on top of the
Si(nalin( S+tem No" 4 protocol"
The i(nalin( protocol in ,SM i tr!ct!red into three (eneral la+er T 3U. T3GU.
dependin( on the interface. a ho*n in %i(!re 7" La+er 3 i the ph+ical la+er. *hich !e
the channel tr!ct!re dic!ed a0ove over the air interface" La+er 6 i the data lin) la+er"
Acro the Um interface. the data lin) la+er i a modified verion of the LA-D protocol
!ed in ISDN >e/ternal lin)?. called LA-Dm" Acro the A interface. the Mea(e Tranfer
-art la+er 6 of Si(nalin( S+tem N!m0er 4 i !ed" La+er 7 of the ,SM i(nalin( protocol
i itelf divided into 7 !0 la+er"
Radio Reo!rce Mana(ement
Control the et!p. maintenance. and termination of radio and fi/ed channel.
Incl!din( handover"
Mo0ilit+ Mana(ement
ADVANCED VEHICLE SECURITY SYSTEM
Mana(e the location !pdatin( and re(itration proced!re. a *ell a ec!rit+ and
a!thentication"
Connection Mana(ement
Handle (eneral call control. imilar to CCITT Recommendation J"G73. and
mana(e S!pplementar+ Service and the Short Mea(e Service"
%i(!re 7"3@ Si(nalin( protocol tr!ct!re in ,SM
(.(.12 Radio r"-o.rc"- ma&ag"m"&
The radio reo!rce mana(ement >RR? la+er overee the eta0lihment of a lin). 0oth
radio and fi/ed. 0et*een the mo0ile tation and the MSC" The main f!nctional component
involved are the mo0ile tation. and the =ae Station S!0+tem. a *ell a the MSC" The
RR la+er i concerned *ith the mana(ement of an RR9eion T3@U. *hich i the time that a
mo0ile i in dedicated mode. a *ell a the confi(!ration of radio channel incl!din( the
allocation of dedicated channel"
An RR9eion i al*a+ initiated 0+ a mo0ile tation thro!(h the acce proced!re.
either for an o!t(oin( call. or in repone to a pa(in( mea(e" The detail of the acce
and pa(in( proced!re. !ch a *hen a dedicated channel i act!all+ ai(ned to the
mo0ile. and the pa(in( !09channel tr!ct!re. are handled in the RR la+er" In addition. it
handle the mana(ement of radio feat!re !ch a po*er control. dicontin!o!
tranmiion and reception. and timin( advance"

(.(.1( Ha&do0"r
ADVANCED VEHICLE SECURITY SYSTEM
In a cell!lar net*or). the radio and fi/ed lin) re2!ired are not permanentl+ allocated for
the d!ration of a call" Handover. or handoff a it i called in North America. i the
*itchin( of an on9(oin( call to a different channel or cell" The e/ec!tion and
mea!rement re2!ired for handover form one of 0aic f!nction of the RR la+er"
There are fo!r different t+pe of handover in the ,SM +tem. *hich involve
tranferrin( a call 0et*een<
Channel >time lot? in the ame cell
Cell >=ae Tranceiver Station? !nder the control of the ame =ae Station
Controller >=SC?.
Cell !nder the control of different =SC. 0!t 0elon(in( to the ame Mo0ile
ervice S*itchin( Center >MSC?. and
Cell !nder the control of different MSC"
The firt t*o t+pe of handover. called internal handover. involve onl+ one =ae
Station Controller >=SC?" To ave i(nalin( 0and*idth. the+ are mana(ed 0+ the =SC
*itho!t involvin( the Mo0ile ervice S*itchin( Center >MSC?. e/cept to notif+ it at the
completion of the handover" The lat t*o t+pe of handover. called e/ternal handover. are
handled 0+ the MSC involved" An important apect of ,SM i that the ori(inal MSC. the
anchor MSC. remain reponi0le for mot call9related f!nction. *ith the e/ception of
!0e2!ent inter9=SC handover !nder the control of the ne* MSC. called the rela+ MSC"
Handover can 0e initiated 0+ either the mo0ile or the MSC >a a mean of traffic
load 0alancin(?" D!rin( it idle time lot. the mo0ile can the =roadcat Control Channel
of !p to 3@ nei(h0orin( cell. and form a lit of the i/ 0et candidate for poi0le
handover. 0aed on the received i(nal tren(th" Thi information i paed to the =SC and
MSC. at leat once per econd. and i !ed 0+ the handover al(orithm"
The al(orithm for *hen a hand over deciion ho!ld 0e ta)en i not pecified in the
,SM recommendation" There are t*o 0aic al(orithm !ed. 0oth cloel+ tied in *ith
po*er control" Thi i 0eca!e the =SC !!all+ doe not )no* *hether the poor i(nal
ADVANCED VEHICLE SECURITY SYSTEM
2!alit+ i d!e to m!ltipath fadin( or to the mo0ile havin( moved to another cell" Thi i
epeciall+ tr!e in mall !r0an cell"
The Hminim!m accepta0le performanceH al(orithm T7U (ive precedence to po*er
control over handover. o that *hen the i(nal de(rade 0e+ond a certain point. the po*er
level of the mo0ile i increaed" If f!rther po*er increae do not improve the i(nal. then
a handover i conidered" Thi i the impler and more common method. 0!t it create
HmearedH cell 0o!ndarie *hen a mo0ile tranmittin( at pea) po*er (oe ome ditance
0e+ond it ori(inal cell 0o!ndarie into another cell"
The Hpo*er 0!d(etH method T7U !e handover to tr+ to maintain or improve a certain
level of i(nal 2!alit+ at the ame or lo*er po*er level" It th! (ive precedence to
handover over po*er control" It avoid the HmearedH cell 0o!ndar+ pro0lem and red!ce
co9channel interference. 0!t it i 2!ite complicated"
(.(.17 8oCili/ ma&ag"m"&
The Mo0ilit+ Mana(ement la+er >MM? i 0!ilt on top of the RR la+er >radio reo!rce?.
and handle the f!nction that arie from the mo0ilit+ of the !0cri0er. a *ell a the
a!thentication and ec!rit+ apect" Location mana(ement i concerned *ith the
proced!re that ena0le the +tem to )no* the c!rrent location of a po*ered9on mo0ile
tation o that incomin( call ro!tin( can 0e completed"
(.(.16 *ocaio& .#dai&g
A po*ered9on mo0ile i informed of an incomin( call 0+ a pa(in( mea(e ent over the
-A,CH channel of a cell" &ne e/treme *o!ld 0e to pa(e ever+ cell in the net*or) for each
call. *hich i o0vio!l+ a *ate of radio 0and*idth" The other e/treme *o!ld 0e for the
mo0ile to notif+ the +tem. via location !pdatin( mea(e. of it c!rrent location at the
individ!al cell level" Thi *o!ld re2!ire pa(in( mea(e to 0e ent to e/actl+ one cell. 0!t
*o!ld 0e ver+ *atef!l d!e to the lar(e n!m0er of location !pdatin( mea(e" A
compromie ol!tion !ed in ,SM i to (ro!p cell into location area" Updatin( mea(e
are re2!ired *hen movin( 0et*een location area. and mo0ile tation are pa(ed in the
cell of their c!rrent location area"
In conventional cell!lar location mea(e are ent to the e/act cell a mo0ile i in"
ADVANCED VEHICLE SECURITY SYSTEM
To revie*. the VLR Data =ae. or Viited or Viitor Location Re(iter. contain all the data
needed to comm!nicate *ith the mo0ile *itch" Levine a+ thi data incl!de<
E2!ipment identit+ and a!thentication9related data
Lat )no*n Location Area >LA?
-o*er Cla and other ph+ical attri0!te of the mo0ile or handet
Lit of pecial ervice availa0le to thi !0cri0er
More data entered *hile en(a(ed in a Call
C!rrent cell
Encr+ption )e+
The location !pdatin( proced!re. and !0e2!ent call ro!tin(. !e the MSC and t*o
location re(iter< the Home Location Re(iter >HLR? and the Viitor Location Re(iter
>VLR?" $hen a mo0ile tation i *itched on in a ne* location area. or it move to a ne*
location area or different operatorH -LMN. it m!t re(iter *ith the net*or) to indicate it
c!rrent location" In the normal cae. a location !pdate mea(e i ent to the ne*
MSCAVLR. *hich record the location area information. and then end the location
information to the !0cri0erH HLR" The information ent to the HLR i normall+ the SS4
addre of the ne* VLR. altho!(h it ma+ 0e a ro!tin( n!m0er" The reaon a ro!tin(
n!m0er i not normall+ ai(ned. even tho!(h it *o!ld red!ce i(nalin(. i that there i
onl+ a limited n!m0er of ro!tin( n!m0er availa0le in the ne* MSCAVLR and the+ are
allocated on demand for incomin( call" If the !0cri0er i entitled to ervice. the HLR
end a !0et of the !0cri0er information. needed for call control. to the ne*
MSCAVLR. and end a mea(e to the old MSCAVLR to cancel the old re(itration"
A proced!re related to location !pdatin( i the IMSI >International Mo0ile S!0cri0er
Identit+? attach and detach" A detach let the net*or) )no* that the mo0ile tation i
!nreacha0le. and avoid havin( to needlel+ allocate channel and end pa(in( mea(e"
An attach i imilar to a location !pdate. and inform the +tem that the mo0ile i
reacha0le a(ain" The activation of IMSI attachAdetach i !p to the operator on an individ!al
cell 0ai"
(.(.19 A.!"&icaio& a&d -"c.ri/
ADVANCED VEHICLE SECURITY SYSTEM
Since the radio medi!m can 0e acceed 0+ an+one. a!thentication of !er to prove that
the+ are *ho the+ claim to 0e. i a ver+ important element of a mo0ile net*or)"
A!thentication involve t*o f!nctional entitie. the SIM card in the mo0ile. and the
A!thentication Center >AUC?" Each !0cri0er i (iven a ecret )e+. one cop+ of *hich i
tored in the SIM card and the other in the AUC" D!rin( a!thentication. the AUC (enerate
a random n!m0er that it end to the mo0ile" =oth the mo0ile and the AUC then !e the
random n!m0er. in con1!nction *ith the !0cri0erH ecret )e+ and a cipherin( al(orithm
called A7. to (enerate a i(ned repone >SRES? that i ent 0ac) to the AUC" If the
n!m0er ent 0+ the mo0ile i the ame a the one calc!lated 0+ the AUC. the !0cri0er i
a!thenticated"
The ame initial random n!m0er and !0cri0er )e+ are alo !ed to comp!te the
cipherin( )e+ !in( an al(orithm called A5" Thi cipherin( )e+. to(ether *ith the TDMA
frame n!m0er. !e the A; al(orithm to create a 33: 0it e2!ence that i M&Red *ith the
33: 0it of a 0!rt >the t*o ;4 0it 0loc)?" Encipherin( i an option for the fairl+ paranoid.
ince the i(nal i alread+ coded. interleaved. and tranmitted in a TDMA manner. th!
providin( protection from all 0!t the mot peritent and dedicated eavedropper"
Another level of ec!rit+ i performed on the mo0ile e2!ipment itelf. a oppoed to
the mo0ile !0cri0er" A mentioned earlier. each ,SM terminal i identified 0+ a !ni2!e
International Mo0ile E2!ipment Identit+ >IMEI? n!m0er" A lit of IMEI in the net*or) i
tored in the E2!ipment Identit+ Re(iter >EIR?" The tat! ret!rned in repone to an
IMEI 2!er+ to the EIR i one of the follo*in(<
)!i":li-"d< The terminal i allo*ed to connect to the net*or)"
<r"/:li-"d< The terminal i !nder o0ervation from the net*or) for poi0le pro0lem"
Black:li-"d< The terminal ha either 0een reported tolen. or i not t+pe approved >the
correct t+pe of terminal for a ,SM net*or)?" The terminal i not allo*ed to connect to the
net*or)"
(.(.13 Comm.&icaio& ma&ag"m"&
The Comm!nication Mana(ement la+er >CM? i reponi0le for Call Control >CC?.
!pplementar+ ervice mana(ement. and hort mea(e ervice mana(ement" Each of thee
ADVANCED VEHICLE SECURITY SYSTEM
ma+ 0e conidered a a eparate !0 la+er *ithin the CM la+er" Call control attempt to
follo* the ISDN proced!re pecified in J"G73. altho!(h ro!tin( to a roamin( mo0ile
!0cri0er i o0vio!l+ !ni2!e to ,SM" &ther f!nction of the CC !0 la+er incl!de call
eta0lihment. election of the t+pe of ervice >incl!din( alternatin( 0et*een ervice
d!rin( a call?. and call releae"
Fig (.13 Call ro.i&g for a moCil" "rmi&ai&g call
(.(.14 Call ro.i&g
Unli)e ro!tin( in the fi/ed net*or). *here a terminal i emi9permanentl+ *ired to a
central office. a ,SM !er can roam nationall+ and even internationall+" >$ith. if needed. a
properl+ ena0led handet"? The director+ n!m0er dialed to reach a mo0ile !0cri0er i
called the Mo0ile S!0cri0er ISDN >MSISDN?. *hich i defined 0+ the E"3@: n!m0erin(
plan" Thi n!m0er incl!de a co!ntr+ code and a National Detination Code *hich
identifie the !0cri0erH operator" The firt fe* di(it of the remainin( !0cri0er n!m0er
ma+ identif+ the !0cri0erH HLR *ithin the home -LMN"
An incomin( mo0ile terminatin( call i directed to the ,ate*a+ MSC >,MSC?
f!nction" The ,MSC i 0aicall+ a *itch *hich i a0le to interro(ate the !0cri0erH HLR
ADVANCED VEHICLE SECURITY SYSTEM
to o0tain ro!tin( information. and th! contain a ta0le lin)in( MSISDN to their
correpondin( HLR" A implification i to have a ,SMC handle one pecific -LMN" It
ho!ld 0e noted that the ,MSC f!nction i ditinct from the MSC f!nction. 0!t i !!all+
implemented in an MSC"
-LMN< -!0lic land mo0ile net*or)" In thi conte/t a cell!lar telephone net*or)" -LMN i
chiefl+ a E!ropean !a(e"
The ro!tin( information that i ret!rned to the ,MSC i the Mo0ile Station Roamin(
N!m0er >MSRN?. *hich i alo defined 0+ the E"3@: n!m0erin( plan" MSRN are related
to the (eo(raphical n!m0erin( plan. and not ai(ned to !0cri0er. nor are the+ vii0le to
!0cri0er"
The mot (eneral ro!tin( proced!re 0e(in *ith the ,MSC 2!er+in( the called
!0cri0erH HLR for an MSRN" The HLR t+picall+ tore onl+ the SS4 addre of the
!0cri0erH c!rrent VLR. and doe not have the MSRN >ee the location !pdatin( ection?"
The HLR m!t therefore 2!er+ the !0cri0erH c!rrent VLR. *hich *ill temporaril+
allocate an MSRN from it pool for the call" Thi MSRN i ret!rned to the HLR and 0ac)
to the ,MSC. *hich can then ro!te the call to the ne* MSC" At the ne* MSC. the IMSI
correpondin( to the MSRN i loo)ed !p. and the mo0ile i pa(ed in it c!rrent location
area"
(.7 <.P.S RECIE2ER
(.7.1 Hi-or/
The <loCal Po-iio&i&g S/-"m ;<PSD i a ,lo0al Navi(ation Satellite S+tem >,NSS?
developed 0+ the United State Department of Defene" It i the onl+ f!ll+ f!nctional
,NSS in the *orld" It !e a contellation of 0et*een 6: and 76 Medi!m Earth &r0it
atellite that tranmit precie micro*ave i(nal. *hich ena0le ,-S receiver to determine
their c!rrent location. the time. and their velocit+" It official name i NA2STAR <PS"
Altho!(h NAVSTAR i not an acron+m. a fe* 0ac)ron+m have 0een created for it" The
ADVANCED VEHICLE SECURITY SYSTEM
,-S atellite contellation i mana(ed 0+ the United State Air %orce ;8th Space $in("
,-S i often !ed 0+ civilian a a navi(ation +tem"
After Forean Air Line %li(ht 884 *a hot do*n in 3G57 after tra+in( into the
USSRH prohi0ited airpace. -reident Ronald Rea(an i!ed a directive ma)in( ,-S
freel+ availa0le for civilian !e a a common (ood" A !((eted 0+ ph+icit D" %anelli
a fe* +ear 0efore" Since then. ,-S ha 0ecome a *idel+ !ed aid to navi(ation
*orld*ide. and a !ef!l tool for map9ma)in(. land !rve+in(. commerce. cientific !e.
and ho00ie !ch a (eocachin(" Alo. the precie time reference i !ed in man+
application incl!din( the cientific t!d+ of earth2!a)e" ,-S i alo a re2!ired )e+
+nchroniCation reo!rce of cell!lar net*or). !ch a the J!alcomm CDMA air interface
!ed 0+ man+ *irele carrier in a m!ltit!de of co!ntrie"
The firt atellite navi(ation +tem. Tranit. !ed 0+ the United State Nav+. *a
firt !ccef!ll+ teted in 3G@8" Uin( a contellation of five atellite. it co!ld provide a
navi(ational fi/ appro/imatel+ once per ho!r" In 3G@4. the U"S" Nav+ developed the
Imation atellite *hich proved the a0ilit+ to place acc!rate cloc) in pace. a technolo(+
that ,-S relie !pon" In the 3G48. the (ro!nd90aed &me(a Navi(ation S+tem. 0aed on
i(nal phae comparion. 0ecame the firt *orld*ide radio navi(ation +tem"
The dei(n of ,-S i 0aed partl+ on imilar (ro!nd90aed radio navi(ation +tem.
!ch a L&RAN and the Decca Navi(ator developed in the earl+ 3G:8. and !ed d!rin(
$orld $ar II" Additional inpiration for the ,-S came *hen the Soviet Union la!nched
the firt Sp!tni) in 3G;4" A team of U"S" cientit led 0+ Dr" Richard =" Ferhner *ere
monitorin( Sp!tni)H radio tranmiion" The+ dicovered that. 0eca!e of the Doppler
Effect. the fre2!enc+ of the i(nal 0ein( tranmitted 0+ Sp!tni) *a hi(her a the atellite
approached. and lo*er a it contin!ed a*a+ from them" The+ realiCed that ince the+ )ne*
their e/act location on the (lo0e. the+ co!ld pinpoint *here the atellite *a alon( it or0it
0+ mea!rin( the Doppler ditortion"
ADVANCED VEHICLE SECURITY SYSTEM
(.7.2 )orki&g a&d O#"raio&
$hen people tal) a0o!t Ia ,-S.I the+ !!all+ mean a ,-S receiver" The ,lo0al
-oitionin( S+tem >,-S? i act!all+ a contellation of 64 Earth9or0itin( atellite >6: in
operation and three e/tra in cae one fail?" The U"S" militar+ developed and implemented
thi atellite net*or) a a militar+ navi(ation +tem. 0!t oon opened it !p to ever+0od+
ele"
Each of thee 7.8889 to :.8889po!nd olar9po*ered atellite circle the (lo0e at
a0o!t 36.888 mile >3G.788 )m?. ma)in( t*o complete rotation ever+ da+" The or0it are
arran(ed o that at an+ time. an+*here on Earth. there are at leat fo!r atellite Ivii0leI in
the )+"
A ,-S receiverH 1o0 i to locate fo!r or more of thee atellite. fi(!re o!t the ditance to
each. and !e thi information to ded!ce it o*n location" Thi operation i 0aed on a
imple mathematical principle called trilateration",-S receiver calc!late it poition on
earth 0aed on the information it receive from fo!r located atellite" Thi +tem *or)
prett+ *ell. 0!t inacc!racie do pop !p" %or one thin(. thi method a!me the radio
i(nal *ill ma)e their *a+ thro!(h the atmophere at a conitent peed >the peed of
li(ht?" In fact. the EarthH atmophere lo* the electroma(netic ener(+ do*n ome*hat.
partic!larl+ a it (oe thro!(h the ionophere and tropophere" The dela+ varie dependin(
on *here +o! are on Earth. *hich mean itH diffic!lt to acc!ratel+ factor thi into the
ditance calc!lation" -ro0lem can alo occ!r *hen radio i(nal 0o!nce off lar(e o01ect.
!ch a )+craper. (ivin( a receiver the impreion that a atellite i farther a*a+ than it
act!all+ i" &n top of all that. atellite ometime 1!t end o!t 0ad almanac data.
mireportin( their o*n poition"
Differential ,-S >D,-S? help correct thee error" The 0aic idea i to (a!(e ,-S
inacc!rac+ at a tationar+ receiver tation *ith a )no*n location" Since the D,-S
hard*are at the tation alread+ )no* it o*n poition. it can eail+ calc!late it receiverH
inacc!rac+" The tation then 0roadcat a radio i(nal to all D,-S9e2!ipped receiver in
the area. providin( i(nal correction information for that area" In (eneral. acce to thi
correction information ma)e D,-S receiver m!ch more acc!rate than ordinar+ receiver"
ADVANCED VEHICLE SECURITY SYSTEM
(.14 <.P.S r"c"i0"r comm.&icai&g ,i! !" -a"lli" a&d -"&di&g i&formaio& !ro.g!
!" ,ir"l"-- moCil" #!o&"
(.7.6 <.P.S daa d"codi&g
,"-"S receiver contin!o!l+ end data and the microcontroller receive the data *hen ever
it re2!ire" The data ent 0+ the ,"-"S i a trin( of character *hich ho!ld 0e decoded to
the tandard format" Thi i done 0+ the pro(ram *hich *e implement in the controller"
(.6. Accid"& -"&-or
Accid"& -"&-or i a imple *itch *hich !e the air Cag mechanim *hich *a
readil+ availa0le in the car" The air 0a( *a 0!ilt !ch that *hen ever an accident occ!r it
ene it and come o!t" &!r *itch i attached to the air 0a( circ!it and made to *itch on
*hen ever the air 0a( t!rn on allo*in( the controller to )no* the information re(ardin(
the occ!rrence of accident and the controller immediatel+ end the accident information
and location *here it occ!rred to the concerned peron"
ADVANCED VEHICLE SECURITY SYSTEM
ADVANCED VEHICLE SECURITY SYSTEM
%i( 7"3G Snap of the pro1ect"
CHAPTER 7
CO88UNICATION PROTOCO*S ANS CO88ANDS
7.1. AT comma&d-
AT command are intr!ction !ed to control a modem" AT i the a00reviation of
Attention" Ever+ command line tart *ith IATI or IatI" ThatH *h+ modem command are
called AT command" Man+ of the command that are !ed to control *ired dial9!p
modem" Thee are alo !pported 0+ ,SMA,-RS modem and mo0ile phone" =eide
thi common AT command et. ,SMA,-RS modem and mo0ile phone !pport an AT
command et that i pecific to the ,SM technolo(+. *hich incl!de SMS9related
command"
7.1.1 Ba-ic Comma&d- a&d E%"&d"d Comma&d-
T!"r" ar" ,o /#"- of AT comma&d-' Ca-ic comma&d- a&d "%"&d"d comma&d-.
=aic command are AT command that do not tart *ith IEI" %or e/ample. D >Dial?. A
>An*er?. H >Hoo) control? and & >Ret!rn to online data tate? are 0aic command"
E/tended command are AT command that tart *ith IEI" All ,SM AT command are
e/tended command" %or e/ample. ECM,S >Send SMS mea(e?. ECMSS >Send SMS
mea(e from tora(e?. ECM,L >Lit SMS mea(e? and ECM,R >Read SMS mea(e?
are e/tended command"
Here are ome of the ta) that can 0e done !in( AT command *ith a ,SMA,-RS
modem or mo0ile phone<
ADVANCED VEHICLE SECURITY SYSTEM
4.1.2 List of commands
AT Command Functionality
AT+CGMI Name of the manufacture
AT+CGMM Model number
AT+CGSN International mobile subscriber identity
AT+CGMR Software version
AT+CIMI International mobile subscriber identity
AT+CS Radio si!nal stren!th
AT+C"C Char!in! status
AT+CMGS Send messa!e
AT+CMGR Read messa!e
AT+CMG# #rite messa!e
AT+CMG$ $elete messa!e
AT+CNMI Notifications of received messa!es
AT+C%"R Read &hone boo'
AT+C%"# #rite to &hone boo'
AT+C%"F Search &hone boo'
AT+C(C) Chec'in! whether a facility is loc'ed
AT+C%#$ Chan!e &assword
ADVANCED VEHICLE SECURITY SYSTEM
AT* Return to online data state
AT+ +oo' control
ATA Answer call
AT$ $ial call
CHAPTER 6
I8P*E8ENTATION AND CODIN<
6.1 CO8PI*ER AND TOO* BIT '
6.1.1 CCS CO8PI*ER
The compiler !ed in the VADVANCED VEHICLE SECUIRTY SYSTEM USIN, ,-S
AND ,SM Vi Microchip -IC Micro C Compiler" CCS provide a complete. inte(rated
tool !ite for developin( and de0!((in( em0edded application r!nnin( on Microchip
ADVANCED VEHICLE SECURITY SYSTEM
-ICW MCU" The heart of thi development tool !ite i the CCS intelli(ent code
optimiCin( C compiler. *hich free developer to concentrate on dei(n f!nctionalit+
intead of havin( to 0ecome an MCU architect!re e/pert"
Ma/imiCe code re!e 0+ eail+ portin( from one MCU to another"
MinimiCe line of ne* code *ith CCS provided peripheral driver. 0!ilt9in
f!nction and tandard C operator"
=!ilt in li0rarie are pecific to -ICW MCU re(iter. allo*in( acce to hard*are
feat!re directl+ from C"
6.1.2 PIC TOO* BIT'
$e !e -IC FIT 6 to d!mp the code in to the microcontroller" The he/ file
(enerated 0+ the CCS compiler after de0!((in( and compilation i !ed 0+ the -IC FIT 6"
Im#ori&g a H"% fil"'
To import a he/ file to 0e pro(rammed in to the tar(et device. elect
*ile,Import -e%
*oadi&g !"% fil" o co&roll"r
After a device famil+ ha 0een elected and a he/ file ha 0een imported. the tar(et device
can 0e pro(rammed 0+ clic)in( *rite" The device *ill 0e eraed and pro(rammed *ith the
he/ code previo!l+ imported"
ADVANCED VEHICLE SECURITY SYSTEM
The tat! of $rite operation i dipla+ed in the tat! 0ar located !nder the Device
confi(!ration *indo*" &f the *rite i !ccef!l. the tat! 0ar t!rn (reen and dipla+
I-ro(rammin( S!ccef!lI. a ho*n in fi( 0elo*"
"
6.2 E8BEDDED C SOURCE CODE'
Xincl!de Y3@%544A"hZ
Xincl!de Y(m"cZ
Xincl!de Y(p"cZ
X!e dela+ >cloc)N68M? AACr+tal &cillator peed 68MHC
X!e r676 >0a!d N G@88. /mitN-INK=8.rcvN-INK=3.treamN,SM? AA%or ,SM
Modem
X!e r676 >0a!d N :588. /mitN-INKA3.rcvN-INKA8.treamN,-S? AA%or ,-S
Receiver
0+te ch N 8B
ADVANCED VEHICLE SECURITY SYSTEM
int co!nt N 8B
0+te dataT3;8UB AA%or SMS tora(e
0+te *r!TU N [ I*r!I \B
0+te a0o!tTU N [Ia0o!tI\B
0+te helpTU N [IhelpI\B
0+te loc)TU N [Iloc)I\B
0+te !nloc)TU N [I!nloc)I\B
0+te n!mT36UB AAfor torin( phone n!m0er
char latT36UB AAfor torin( latit!de
char ln(tdT36UB AAfor torin( ln(td
char peedT36UB AAfor torin( peed
char tdataT36UB AAfor temprar+ data
void main>?
[
int i N 8B
int 1 N 8B
int fla( N 8B
o!tp!tKhi(h>-INKD3?B
dela+Km>3888?B
o!tp!tKlo*>-INKD3?B
dela+Km>3888?B
o!tp!tKhi(h>-INKD3?B
dela+Km>3888?B
ADVANCED VEHICLE SECURITY SYSTEM
o!tp!tKlo*>-INKD3?B
initKphone>?B
*hile>3?
[
o!tp!tKto((le>-INKD3?B AA,SM Indicator LED
dela+Km>;88?B
co!nt N 8B AAreet data 0!ffer
dataTco!ntU N 8B

if>Pinp!t>-INKC:?? AAAccident Senor *itch"
[
AACrah Mea(e Handlin(
o!tp!tKhi(h>-INKD8?B AALED Indicator
(etK,-SKdata>lat.ln(td?B AARead ,-S data for lat and ln(td
fprintf>,SM.IATECM,SN]IR]I]r]nI.m+n!m?B AASend SMS mea(e to pre9
defined n!m0er
fprintf>,SM.IALERT< Vehicle No"GGGG Crahed at Latit!de< R Lon(it!de< R
]r]nI.lat.ln(td?B AASend SMS data
fp!tc>8/3A.,SM?B AA^O to end m
o!tp!tKlo*>-INKD8?B AALED Indicator
contin!eB
\
\
f(et>data.,SM?B AARead m data into data 0!ffer
ADVANCED VEHICLE SECURITY SYSTEM
if>trlen>data? Y 3:? AANo mea(e in trin(" ret!rn &F or ERR&R" Depend on
Modem t+pe
[
contin!eB
\
AADelete the mea(e
fprintf>,SM.IATECM,DN3]r]nI?B AAdelete mea(e from SIM card
dela+Km>6888?B
AARead the availa0le mea(e content
AAe/tract the phone n!m0er from SMS Mea(e
(etKphoneKn!m0er>data.n!m?B AAe/tract phone n!m0er into n!m varia0le
if>trtr>data.*r!?? AAIf the mea(e contain I*r!I
[
(etK,-SKdata>lat.ln(td?B
o!tp!tKhi(h>-INKD3?B

fprintf>,SM.IATECM,SN]IR]I]r]nI.n!m?B
fprintf>,SM.IHello. I am located at I?B
fprintf>,SM.ILatit!de< R Lon(it!de< R I.lat.ln(td?B
fprintf>,SM.ISpeed< R )mph" I.peed?B
ADVANCED VEHICLE SECURITY SYSTEM
fprintf>,SM.I-leae !e ,oo(le Earth to ee m+ location"]r]nI?B
fp!tc>8/3A.,SM?B
\
ele if>trtr>data.a0o!t?? AAIf the mea(e contain Ia0o!tI
[
o!tp!tKhi(h>-INKD3?B
fprintf>,SM.IATECM,SN]IR]I]r]nI.n!m?B
fprintf>,SM.I="Tech %inal Year>688G96838? -ro1ect ]r]nI?B
fprintf>,SM.I,-S _ ,SM =aed Vehicle Theft Control S+tem" ]r]nI?B
fprintf>,SM.IEn(ineerin( %inal Year -ro1ect"]r]nI?B
fp!tc>8/3A.,SM?B
\
ele if>trtr>data.!nloc)??
[
o!tp!tKhi(h>-INKD3?B
o!tp!tKlo*>-INKD4?B
fprintf>,SM.IATECM,SN]IR]I]r]nI.n!m?B
fprintf>,SM.IVehicle (ot !nloc)edI?B
fp!tc>8/3A.,SM?B
\
ele if>trtr>data.loc)??
[
(etK,-SKdata>lat.ln(td?B
ADVANCED VEHICLE SECURITY SYSTEM
o!tp!tKhi(h>-INKD3?B
o!tp!tKhi(h>-INKD4?B
fprintf>,SM.IATECM,SN]IR]I]r]nI.n!m?B
fprintf>,SM.IVehicle (ot loc)ed o!t at location I?B
fprintf>,SM.ILatit!de< R Lon(it!de< R I.lat.ln(td?B
fprintf>,SM.I-leae !e ,oo(le Earth to ee m+ location"]r]nI?B
fp!tc>8/3A.,SM?B AA^O
\
ele if>trtr>data.help??
[
o!tp!tKhi(h>-INKD3?B
fprintf>,SM.IATECM,SN]IR]I]r]nI.n!m?B
fprintf>,SM.ISend ]I*r!]I to (et m+ location ]r]nI?B
fprintf>,SM.ISend ]Ia0o!t]I to )no* a0o!t me]r]nI?B
fprintf>,SM.ISend ]Iloc)]I to Loc) the Vehicle I(nition"]r]nI?B
fprintf>,SM.ISend ]I!nloc)]I to Unloc)"]r]nI?B
fp!tc>8/3A.,SM?B
\
\
\
ADVANCED VEHICLE SECURITY SYSTEM
CHAPTER 9
APP*ICATIONS
VI- vehicle trac)in("
Child and animal trac)in("
Accident Notification of Vehicle"
Am0!lance trac)in("
Vehicle Theft Control
ADVANCED VEHICLE SECURITY SYSTEM
*I8ITATIONS
%or the location of the vehicle. the ,-S provide the information in the form of
latit!de and lon(it!de *hich f!rther re2!ire oft*are !ch a ,oo(le Map to )no* the
name of the area and the nearet landmar)" Ho*ever 0+ attachin( an e/ternal Memor+
card to the pro1ect conitin( of repective information can ma)e the limitation to
overcome
CHAPTER 3
CONC*USION
The pro1ect ha 0een !ccef!ll+ dei(ned and implemented for the VADVANCED
VEHICLE SECURITY SYSTEM $ITH THE%T C&NTR&L AND ACCIDENT
N&TI%ICATI&N`"
ADVANCED VEHICLE SECURITY SYSTEM
It ha 0een developed 0+ inte(ratin( feat!re of all the hard*are component !ed"
-reence of ever+ mod!le ha 0een reaoned o!t and placed caref!ll+ th! contri0!tin( to
the 0et *or)in( of the !nit"
Secondl+. !in( hi(hl+ advanced IC' and *ith the help of (ro*in( technolo(+ the
pro1ect ha 0een !ccef!ll+ implemented and teted"
%inall+ *e concl!de that ,-S and ,SM 0aed Sec!rit+ S+tem add a h!(e for the
rapid (ro*th of Technolo(+"
CHAPTER 4
BIBI*O<RAPH+
T!" PIC microco&roll"r' /o.r #"r-o&al i&rod.cor/ co.r-"
9 Sohn Morton
I&rod.cio& o <PS' !" <loCal Po-iio&i&g S/-"m
9Ahmed El9Ra00an+
F.&dam"&al- Of 8icro #roc"--or- a&d 8icro com#."r-
ADVANCED VEHICLE SECURITY SYSTEM
9="Ram
Programmi&g a&d C.-omiAi&g !" PIC 8icroco&roll"r
9 M+)e -red)o
<S8' "0ol.io& o,ard- (rd g"&"raio& -/-"m-
9 Ooran Ovonar
-eter S!n(
Farl Fammerlander
R"f"r"&c"- o& !" )"C'
,,,.&aio&al.com
,,,.am"l.com
,,,.,iki#"dia.com
,,,.g"ocii"-.com

También podría gustarte