Vous êtes sur la page 1sur 111

KARNATAKA STATE OPEN UNIVERSITY MANASA GANGOTHRI, MYSORE- 570006

TITLE OF THE PROJECT REPORT WIRELESS HEALTH CARE MONITORING SYSTEM


A PROJECT REPORT Submitted by

NAME OF THE CANDIDATE


SUMA G.O 11 !1"LDEC06 Under the guidance of

G#$%& N'(& KANNAN


I) *'+,$'- .#-.$--(&), /. ,0& +&1#$+&(&), F/+ ,0& '2'+% /. ,0& %&3+&& /. D$*-/('

$n
ELECTRONICS COMMUNICATION AND ENGINEERING

KARNATAKA STATE OPEN UNIVERSITY MANASA GANGOTHRI, MYSORE- 570006


CERTIFICATE

This is to certify that this project entitle !" W$+&-&44 H&'-,0 C'+& M/)$,/+$)3 S54,&(# Title$##S%&'itte &y## st% ent na'e S#(' on !6-06G.O#####(ith Re)ister No11 !1"LDEC06 ! is s%&'itte

!01"!!! to the KARNATAKA STATE OPEN UNIVERSITY* +arnata,a* In ia* in partial f%lfill'ent of the re-%ire'ents for the a(ar of D$*-/(' $) ELECTRONICSCOMMUNICATION')% of &onafie (or, ENIGINEERING77777777777777777 is a recor %n erta,en &y her.hi'# St% ent Na'e/SUMA G#O Si)nat%re/ Date/ Internal G%i e Na'e/ Desi)nation/ Internal G%i e Si)nat%re/ Date/

St% y Center Na'e/ Seal of St% y Centre Date/


1

E0ternal G%i e Na'e/ Desi)nation/ E0ternal G%i e Si)nat%re/ Date/

KARNATAKA STATE OPEN UNIVERSITY MANASA GANGOTHRI, MYSORE- 570006

TITLE OF THE PROJECT REPORT WIRELESS HEALTH CARE MONITORING SYSTEM


A PROJECT REPORT Submitted by

NAME OF THE CANDIDATE


SUMA G.O 11 !1"LDEC06 Under the guidance of

G#$%& N'(& KANNAN


I) *'+,$'- .#-.$--(&), /. ,0& +&1#$+&(&), F/+ ,0& '2'+% /. ,0& %&3+&& /. D$*-/('

$n
ELECTRONICS COMMUNICATION AND ENGINEERING

A,

A,

S0'+'%' V$8'4 T+#4,


N/. 509191 , !)% .-//+. L'840($ :/(*-&;, 10,0 ('$) !7,0 :+/44, ,0 <-/:8, J'5')'3'+, =')3'-/+&-11

M/),0 > Y&'+ JUNE !01" TA=LE OF CONTENTS C0'*,&+ N/ 1 1#1 1 1#1 2 2#1 7 7#1 8 8#1 : :#1 T$,-& Itro %ction to (ireless health care 'onitorin) syste' 4i)#5l, sche'atic of si)nal ac-%isition 'o %le Intro %ction to E'&e e syste' 4i)# E'&e e syste' esi)n calls Intro %ction to Sensors 4i)#9in )' of Te'perat%re sensor Intro %ction to Microcontroller 9IC1:43;;A 4i)#Internal architect%re of Microcontroller 9IC1:43;;A Intro %ction to Glo&al syste' GSM architect%re Intro %ction <IG5EE 4i)# <IG5EE stac, architect%re
7

P'3& N/ 3 16 17 18 12 1: 26 21 77 78 82 8;

; 3 A 16 16#1 11 11 12 17 18 1: 1;

Intro %ction to MA=121 >?olta)e con?erter@ Intro %ction to 9o(er S%pply Intro %ction to LCD isplay Intro %ction to Soft(are Re-ire'ents CODINGBTrans'itter co in) Concl%sion 5i&ilo)raphy Appen i0 A Appen i0 5 Appen i0 C Appen i0 D Appen i0 E

:1 :8 ;7 ;3 38 162 167 168 16: 16; 16A 116

D&:-'+',$/)
I certify that a# The (or, containe in this report is ori)inal an has &een one &y 'e %n er the )%i ance of 'y s%per?isor>s@# &# The (or, has not &een s%&'itte to any other Instit%te for any e)ree or iplo'a#

c# I ha?e follo(e the )%i elines pro?i e &y the Instit%te in preparin) the report# # I ha?e confor'e to the nor's an )%i elines )i?en in the Ethical Co e of Con %ct of the Instit%te#

e# Chene?er I ha?e %se 'aterials > ata* theoretical analysis* fi)%res* an te0t@ fro' other so%rces* I ha?e )i?en %e cre it to the' &y citin) the' in the te0t of the report an )i?in) their etails in the references# 4%rther* I ha?e ta,en per'ission fro' the copyri)ht o(ners of the so%rces* (hene?er necessary#

Si)nat%re of the St% ent

A:8)/2-&%3&(&),
?T$(&4 N&2 R/(') 1 @

W$+&-&44 H&'-,0 C'+& M/)$,/+$)3 S54,&( ./+ P',$&),4 ='4&% O) AIG=EE CHAPTER 1 INTRODUCTION
1.1 I),+/%#:,$/)
A ?ances in (ireless sensor net(or,s ha?e opene %p ne( opport%nities in healthcare syste's# The f%t%re (ill see the inte)ration of the a&%n ance of e0istin) specialiDe 'e ical technolo)y (ith per?asi?e* (ireless net(or,s# They (ill coBe0ist (ith the installe infrastr%ct%re* a%)'entin) ata collection an realBti'e response# An e0a'ple of an area in (hich f%t%re 'e ical syste's can &enefit the 'ost fro' (ireless sensor net(or,s is inBho'e assistance# InBho'e per?asi?e net(or,s 'ay assist resi ents &y pro?i in) 'e'ory enhance'ent* control of ho'e appliances* 'e ical ata loo,%p* an e'er)ency co''%nication# The 'ain re-%ire'ents for (ireless ho'ecare 'onitorin) syste's >CEMS@ areB Interopera&ility RealBti'e ata ac-%isition an analysis Relia&ility an ro&%stness Ne( no e architect%res

1.! P+$):$*-&4 ./+ WHMS D&4$3)


Ce propose (ireless sensor net(or, >CSN@ architect%re for s'art ho'ecare that possesses the essential ele'ents of each of the f%t%re 'e ical applications* na'ely/ Inte)ration (ith e0istin) 'e ical practices an technolo)y* RealBti'e* lon)Bter'* re'ote 'onitorin)*

Miniat%re* (eara&le sensors* an Assistance to the el erly an chronic patients#

It e0ten s healthcare fro' the tra itional clinic or hospital settin) to the patientFs ho'e* ena&lin) teleBcare#

1." D&4:+$*,$/) /. WHMS A+:0$,&:,#+&


The propose CEMS inte)rate a coherent set of interactin) porta&le e?ices* (hile preser?in) 'o&ility an in epen ence an &rin)in) opti'%' assistance to 'e ical s%pport# This inte)ration incl% es the follo(in) feat%res/ A%to'atic 'onitorin) of ?ital 'e ical physiolo)ical para'eters s%ch as &o y te'perat%re* p%lse rate an heart rate# Co''%nication of physiolo)ical para'eters &et(een the %ser an e0ternal inter?enin) parties s%ch as 'e ical 'onitorin) centers# The res%ltin) syste' is 'o %lar an co'prises 'iniat%riDe &o yB(orn 'o %les that pro?i e contin%o%s 'e ical an C9AN protocol@ an trans'itte &eha?ioral 'onitorin) >p%lse rate* &o y to the te'perat%re an acti?ity@#The 'onitore para'eters are (ireless >IEEE 361#18#7 to a &ase station that is connecte GSM.G9RS or Lan Line internet ser?ice# The &ase station processes an relays the recei?e para'eters an sen s alar's to the e0ternal people s%ch as socioB'e ical 'onitorin) centers* nei)h&ors an spea, (ith healthcare professionals# 'e ical octors* (hoe?er is &est s%ite to inter?ene epen in) on the type of alar'# Chen the lin, is esta&lishe * the %ser 'ay octors* 'e icoBsocial instit%tions or

1. H'+%2'+& ')% S/.,2'+& R&1#$+&(&),4

H'+%2'+& ,//-4B 9IC 1:43;;A* 101:BLCD* RS121* 361#18#7 'o %le* GSM 'o e' (ith 9C interface* 5o y te'perat%re sensor* Eeart rate 'eas%re'ent sensor* p%lse rate 'eas%re'ent sensor* User Mo&ile phone# S/.,2'+& ,//-4B De?elop'ent tool G M9LA5 ?;#71* har (are Co'piler B EIB Tech 9IC* C 9ro)ra''er B 9IC 4lash* Ear (are Si'%lation tool B 9rote%s ?:#A Sp7#

=-/:8 4:0&(',$: /. ,0& 4$3)'- ':1#$4$,$/) (/%#-&B

5o y te'pera t%re sensor 9atient Si)nal con itionin) 9%lse rate sensor

Eeart Rate Sensor

IEEE 802.15.4 WPA !rotoco"

9IC Microcontroller (ith 16B5IT ADC

4i)%re 1#1/ 5loc, sche'atic of the si)nal ac-%isition 'o %le

16

4i)%re 1#1 sho(s the &loc, sche'atic ia)ra' of the si)nal ac-%isition 'o %le (hich is the trans'itter part of the project# 4i)%re 1#1 sho(s the &ase station of ho'e care e'&e e syste' (hich is the recei?er part of the project#

='4& S,',$/) /. 0/(&-:'+& &(<&%%&% 454,&(B

GSM.G9R S SERHICE

IEEE C0!.15. WPAN *+/,/:/-

9IC Micro Controller

GSM MODEM

4i)%re1#1/ 5ase Station of ho'eBcare e'&e e syste' A-'+(4 ,/ ,0& E;,&+)'- P&/*-&B

Care ta,er >an @ Nei)h&ors >an @ Me ical octors MO5ILE 11

4i)%re 1#2/ Alar's to the E0ternal 9eople 4i)%re 1#2 in icates the 'o&ile to (hich the 'essa)es fro' the 'o e' present in &ase station of ho'ecare e'&e e syste' are sent# This 'i)ht &e the 'o&ile of a careta,er of the patient or a nei)h&or or a 'e ical octor or a relation to the patient#

1.5 O<D&:,$E&
Inspite of the i'pro?e'ent of co''%nication lin, an espite of all pro)resses in a ?ance co''%nication technolo)ies* there are still ?ery fe( f%nctionin) co''ercial (ireless 'onitorin) syste's* (hich are 'ost offBline* an there are still a n%'&er of iss%es to eal (ith# Therefore* there is a stron) nee for in?esti)atin) the possi&ility of esi)n an i'ple'entation of an interacti?e realBti'e (ireless co''%nication syste'# In this connection* a )eneric realBti'e (ireless co''%nication syste' has &een esi)ne for short an lon) ter' re'ote patientB'onitorin)* %sin) &y (ireless protocol# The pri'ary f%nction of this syste' is to 'onitor the te'perat%re* press%re an Eeart 5eat of the 9atient# The Data collecte the sensors are sent to a Microcontroller at the trans'ittin) en # The Microcontroller isplays the ?al%es in the LCD an then it is trans'itte ?ia <i)&ee on the trans'itter si e to the recei?er# At the recei?in) en a recei?er Di)&ee is %se (hich is then concerne to recei?e the isplaye ata an is fe to another Microcontroller* e?iation in to alert the o?er the LCD isplay# If there is any

any para'eter in the patientFs stat%s* an alar' is so%n e octor or the atten ant an 'o&ile of a care ta,er >or@ a octor#

a 'essa)e is sent ?ia GSM to the

1.6 COMPONENTS USED


C/(*/)&),4 11 S*&:$.$:',$/)4

1# Step Do(n Transfor'er 1# Dio es 2# Capacitors 7# Re)%lators 8# Li)ht E'ittin) Dio es :# 9IC 'icrocontroller ;# Crystal Oscillator 3# Transistor A# 5%DDer 16# Te'perat%re sensor 11# 9ress%re sensor 11# GSM 'o e' 12# LCD 1:01 17# Resistors

/> 126.11H@ G 1 No />1N766;@ G 11 Nos /1666I4 G 1 No* 11p4B 1 Nos /;311 G 1 No* ;368 G 2 No /LEDJs G :Nos /1:f3;;A G 1 No /7MED G 1No /5C87;B1No /11?oltsB1No /1No /1N /1No /1No /226 K G 1Nos*16 +KB 8 Nos 1 +K G 1Nos

1.7 O+3')$F',$/) /. T0&4$4


In the first chapter the 'ain o&jecti?e of the project*the re-%ire'ents of (ireless health care 'onitorin) syste' *its architecht%re an re-%ire'ents ha?e &een syste's*&loc, isc%sse #the secon circ%it %nit ia)ra's an the har (are an soft are eals (ith the e#'&e e recei?er are

ia)ra's of trans'itter an

isc%sse # In the thir chapter the ifferent sensors %se are isc%sse in etail#fo%rth Chapter eals (ith all the 9IC 'icrocontroller 1:43;;A an its architecht%re in etail # In the fifth chapter ?ario%s aspects of GSM are isc%sse in etail# si0th chapter eals in etail (ith the Di)&ee an its applications# The se?enth chapter eals (ith MA= 121 an its %sa)e# In the ei)hth chapter po(er s%pply %nit an re)%lators are isc%sse # LCD is isc%sse in the ninth chapter# Soft (are re-%ire'ents are isc%sse in the tenth chapter# Co in) is e0plaine in the ele?enh chapter

1.C CONCLUSION
12

CEMS esi)n* o&jecti?e of the project is isc%sse an the co'ponents %se are intro %ce in this chapter#

CHAPTER G ! INTRODUCTION TO EM=EDDED SYSTEM


!.1 I),+/%#:,$/)
E'&e e Syste' is a co'&ination of har (are an soft(are %se to achie?e a sin)le specific tas,# An e'&e e syste' is a 'icrocontrollerB&ase * soft(are ri?en* relia&le* realBti'e control syste'* a%tono'o%s* or h%'an or net(or, interacti?e* operatin) on i?erse physical ?aria&les an in i?erse en?iron'ents an sol into a co'petiti?e an cost conscio%s 'ar,et#

An e'&e e syste' is not a co'p%ter syste' that is %se pri'arily for processin)* not a soft(are syste' on 9C or UNI=* not a tra itional &%siness or scientific application# Ei)hBen Ei)hBen e'&e e e'&e e L lo(er en e'&e e syste's# (ith OS# e syste' B Generally 21* :7 5it Controllers %se

E0a'ples 9ersonal Di)ital Assistant an Mo&ile phones etc #Lo(er en e'&e

syste's B Generally 3*1: 5it Controllers %se (ith an 'ini'al operatin) syste's an har (are layo%t esi)ne for the specific p%rpose# E0a'ples S'all controllers an e?ices in o%r e?ery ay life li,e Cashin) Machine* Micro(a?e O?ens* (here they are e'&e e in#

!.! S54,&( D&4$3) C'--4

17

4i)%re 1#1 sho(s the pictorial representation of E'&e e syste' esi)n calls on 'any isciples >i#e@ in ?ario%s fiel s the e'&e e syste's are %se #

4i)%re 1#1/ E'&e

e syste' esi)n calls on 'any isciples

!." T0& E(<&%%&% S54,&( D&4$3) C5:-&

18

4i)%re 1#1/ H Dia)ra' of e'&e

e syste' esi)n

Eere (e isc%ss the role of si'%lation soft(are* realBti'e syste's an

ata

ac-%isition in yna'ic test applications# Tra itional testin) is referre to as "static$ testin) (here f%nctionality of co'ponents is teste &y pro?i in) ,no(n inp%ts an 'eas%rin) o%tp%ts# To ay there is 'ore press%re to )et pro %cts to 'ar,et faster# This has le to a nee for " yna'ic$ testin) (here co'ponents are teste (hile in %se (ith the entire syste' G either real or si'%late # 5eca%se of cost an safety concerns* si'%latin) the rest of the syste' (ith realBti'e har (are is preferre to testin) co'ponents in the act%al real syste'# The ia)ra' sho(n in fi)%re 1#1 is the "H Dia)ra'$ that is often %se to escri&e the e?elop'ent cycle# Ori)inally e?elope to encaps%late the esi)n process of soft(are applications* 'any ifferent ?ersions of this ia)ra' can &e fo%n to escri&e ifferent pro %ct esi)n cycles# Eere (e ha?e sho(n one e0a'ple of s%ch a ia)ra' representin) the esi)n cycle of e'&e e control applications co''on to a%to'oti?e* aerospace an efense applications#

In this ia)ra' the )eneral pro)ression in ti'e of the e?elop'ent sta)es is sho(n fro' left to ri)ht# Note ho(e?er that this is often an iterati?e process an the act%al e?elop'ent (ill not procee linearly thro%)h these steps# The )oal of rapi e?elop'ent is to 'a,e this cycle as efficient as possi&le &y 'ini'iDin) the iterations re-%ire for a esi)n# If the 0Ba0is of the ia)ra' is tho%)ht of as ti'e* the )oal is to narro( the "H$ as '%ch as possi&le an there&y re %ce e?elop'ent ti'e# The yBa0is of this ia)ra' can &e tho%)ht of as the le?el at (hich the syste' co'ponents are consi ere # Early on in the e?elop'ent* the re-%ire'ents of the o?erall syste' '%st &e consi ere # As the syste' is &eco'es ?ery lo(Ble?el i?i e into s%&Bsyste's an co'ponents* the process

o(n to the point of loa in) co e onto in i?i %al

processors# After(ar s co'ponents are inte)rate an teste to)ether %ntil s%ch

1:

ti'e that the entire syste' can enter final pro %ction testin)# Therefore the top of the ia)ra' represents the hi)hBle?el syste' ?ie( an the &otto' of the ia)ra' represents a ?ery lo(Ble?el ?ie(. H ia)ra' escri&es lots of applicationsM eri?e fro' soft(are

e?elop'ent# Reason for shape* e?ery phase of esi)n re-%ires a co'pli'entary test phase# Ei)hBle?el to lo(Ble?el ?ie( of application# This is a si'plifie ?ersion# Loop 5ac, . Iterati?e process* =Ba0is is ti'e >s%' %p@#

!. C0'+':,&+$4,$:4 /. E(<&%%&% S54,&(


An e'&e e syste' is any co'p%ter syste' hi en insi e a pro %ct other

than a co'p%ter# There (ill enco%nter a n%'&er of iffic%lties (hen (ritin) e'&e e syste'

soft(are in a ition to those (e enco%nter (hen (e (rite applications T0+/#30*#, G O%r syste' 'ay nee to han le a lot of ata in a short perio of ti'e# R&4*/)4& G O%r syste' 'ay nee to react to e?ents -%ic,ly T&4,'<$-$,5 G Settin) %p e-%ip'ent to test e'&e e soft(are can &e iffic%lt D&<#3'<$-$,5 G Citho%t a screen or a ,ey&oar * fin in) o%t (hat the soft(are is pro&le' R&-$'<$-$,5 G e'&e e syste's '%st &e a&le to han le any sit%ation (itho%t h%'an inter?ention oin) (ron) >other than not (or,in)@ is a tro%&leso'e

1;

M&(/+5 4*':& G Me'ory is li'ite on e'&e

e syste's* an yo%

'%st 'a,e the soft(are an the ata fit into (hate?er 'e'ory e0ists P+/3+'( $)4,'--',$/) G yo% (ill nee special tools to )et yo%r soft(are into e'&e e syste's

P/2&+ :/)4#(*,$/) G 9orta&le syste's '%st r%n on &attery po(er* an the soft(are in these syste's '%st conser?e po(er

P+/:&44/+ 0/34 G co'p%tin) that re-%ires lar)e a'o%nts of C9U ti'e can co'plicate the response pro&le'

C/4, G Re %cin) the cost of the har (are is a concern in 'any e'&e e syste' projectsN soft(are often operates on har (are that is &arely a e-%ate for the jo&#

E'&e e syste's ha?e a 'icroprocessor. 'icrocontroller an a 'e'ory# So'e ha?e a serial port or a net(or, connection# They %s%ally o not ha?e ,ey&oar s* screens or is, ri?es#

!.5 A**-$:',$/)4
Military an aerospace e'&e e soft(are applications C o''% n i ca t io n A pp li ca ti on s I n %s t ri al a% to 'a t io n a n p ro ce s s c on tr ol s o ft ( a re

!.6 C-'44$.$:',$/)
Real Ti'e Syste's RTS is one (hich has to respon to e?ents (ithin a specifie A ri)ht ans(er after the ea line is a (ron) ans(er ea line#

!.7 RTS C-'44$.$:',$/)


Ear Real Ti'e Syste's

13

Soft Real Ti'e Syste'

!.7.1 H'+%2'+& R&'- T$(& S54,&(B OEar O realBti'e syste's ha?e ?ery narro( response ti'e# E0a'ple/ N%clear po(er syste'* Car iac pace'a,er#

!.7.! S/.,2'+& R&'- T$(& S54,&(B OSoftO realBti'e syste's ha?e re %ce constrains on OlatenessO &%t still '%st operate ?ery -%ic,ly an repeata&le# E0a'ple/ Rail(ay reser?ation syste' G ta,es a fe( e0tra secon s the ata re'ains ?ali #

!.C L')3#'3&4 U4&%


C CPP Qa?a Lin%0 A a Asse'&ly

!.6 =-/:8 D$'3+'(4

TEM9ERATURE SENSOR 9RESSURE SENSOR EEART 5EAT SENSOR 9IC 1:43;;A

LCD

<IG5EE

1A

9OCER SU99LR

4i)%re 1#2/ 5loc, Dia)ra' of Trans'itter

LCD

<IG5EE

9IC 1:43;;A

5U<<ER

GSM MODEM

9OCER SU99LR

4i)%re 1#7/ 5loc, ia)ra' of recei?er

!.10 C$+:#$, D$'3+'(4


4i)%re 1#8 an fi)%re 1#: represents the circ%it ia)ra' of the trans'itter an recei?er# The har (are present in the circ%it co'prises of/ Microcontroller 9IC1:43;;A Sensors/ Te'perat%re sensor/ LM28 9ress%re Sensor/ M9=16 Eeart &eat sensor/ LM283 16

<i)&ee 'o %les GSM 'o e' 9o(er S%pply MA= 121 LCD

11

4i)%re 1#8/ Circ%it Dia)ra' of Trans'itter

4i)%re 1#:/ Circ%it Dia)ra' of Recei?er

11

!.11 C/):-#4$/)
E'&e e Syste' is e0plaine an the &loc, an circ%it ia)ra's %se in the project are isc%sse #

CHAPTER - " SENSORS


".1 I),+/%#:,$/)
A sensor is a trans %cer (hich con?erts physical -%antities to electrical -%antities#

".! P+&44#+& S&)4/+ HMPI10J


The M9=16 e?ice is silicon pieDo resisti?e press%re sensors pro?i in) a ?ery acc%rate an linear ?olta)e o%tp%t irectly proportional to the applie press%re# These stan ar * lo( cost* %nco'pensate sensors per'it 'an%fact%rers to esi)n an a their o(n e0ternal te'perat%re co'pensation an si)nal con itionin) net(or,s# Co'pensation techni-%es are si'plifie &eca%se of the pre icta&ility of MotorolaSs sin)le ele'ent strain )a%)e esi)n# 4i)%re 2#1 sho(s a sche'atic of the internal circ%itry on the stan Galone press%re sensor chip an fi)%re 2#1 sho(s the press%re sensor %se ".!.1 F&',#+&4B Lo( Cost 9atente Silicon Shear Stress Strain Ga%)e Desi)n Ratio 'etric to S%pply Holta)e Easy to Use Chip Carrier 9ac,a)e Options Differential an Ga%)e Options D%ra&le Epo0y Uni &o y Ele'ent or Ther'oplastic >99S@ S%rface Mo%nt 9ac,a)e

12

".!.! A**-$:',$/) E;'(*-&4B Air Mo?e'ent Control En?iron'ental Control Syste's Le?el In icators Lea, Detection Me ical Instr%'entation In %strial control 9ne%'onic control syste'

4i)%re 2#1/ internal circ%it of press%re sensor

4i)%re 2#1/ M9=16 press%re Sensor

"." T&(*&+',#+& 4&)4/+ HLM"5JB


17

The LM28 series are precision inte)rate Bcirc%it te'perat%re sensors* (hose o%tp%t ?olta)e is linearly proportional to the Celsi%s >Centi)ra e@ te'perat%re# The LM28 th%s has an a ?anta)e o?er linear te'perat%re sensors cali&rate in T +el?in* as the %ser is not re-%ire to s%&tract a lar)e constant ?olta)e fro' its o%tp%t to o&tain con?enient Centi)ra e scalin)# The LM28 oes not re-%ire any e0ternal cali&ration or tri''in) to pro?i e typical acc%racies of U1V7TC at roo' te'perat%re an U2V7TC o?er a f%ll W88 to P186TC te'perat%re ran)e# Lo( cost is ass%re &y 'i'in) an cali&ration at the (afer le?el# The LM28Ss lo( o%tp%t i'pe ance* linear o%tp%t* an precise inherent cali&ration 'a,e interfacin) to rea o%t or control circ%itry especially easy# It can &e %se (ith sin)le po(er s%pplies* or (ith pl%s an 'in%s s%pplies# As it ra(s only :6 XA fro' its s%pply* it has ?ery lo( selfBheatin)* less than 6#1TC in still air# The LM28 is rate to operate o?er a W88T to P186TC te'perat%re ran)e* (hile the LM28C is rate for a W76T to 116TC ran)e >W16T (ith i'pro?e acc%racy@# The LM28 series is a?aila&le pac,a)e in her'etic TOB7: transistor pac,a)es* (hile the LM28C* LM28CA* an LM28D are also a?aila&le in the plastic TOBA1 transistor pac,a)e# The LM28D is also a?aila&le in an 3Blea s%rface 'o%nt s'all o%tline pac,a)e an a plastic TOB116 pac,a)e# 4i)%re 2#2 sho(s the pin ia)ra' an fi)%re 2#7 sho(s the te'perat%re sensor %se in the project ".".1 F&',#+&4B Cali&rate irectly in T Celsi%s >Centi)ra e@

Linear P 16#6 'H.TC scale factor 6#8TC acc%racy )%arantee a&le >at P18TC@ Rate for f%ll W88T to P186TC ran)e S%ita&le for re'ote applications Lo( cost %e to (aferBle?el tri''in) Operates fro' 7 to 26 ?olts

18

Less than :6 XA c%rrent rain Lo( selfBheatin)* 6#63TC in still air Nonlinearity only U1V7TC typical n Lo( i'pe ance o%tp%t* 6#1 C for 1 'A loa

4i)%re 2#2/ 9in Dia)ra' of Te'perat%re Sensor

4i)%re 2#7/ LM28 Te'perat%re Sensor ".".! A**-$:',$/)4B The LM28 can &e applie easily in the sa'e (ay as other inte)rate Bcirc%it te'perat%re sensors# It can &e )l%e or ce'ente to a s%rface an its te'perat%re (ill &e (ithin a&o%t 6#61TC of the s%rface te'perat%re# This pres%'es that the a'&ient air te'perat%re is al'ost the sa'e as the s%rface te'perat%reN if the air te'perat%re (ere '%ch hi)her or lo(er than the s%rface te'perat%re* the act%al te'perat%re of the LM28 ie (o%l &e at an inter'e iate te'perat%re &et(een the s%rface te'perat%re an the air te'perat%re# This is especially tr%e for the TOBA1 plastic

1:

pac,a)e* (here the copper lea s are the principal ther'al path to carry heat into the e?ice* so its te'perat%re 'i)ht &e closer to the air te'perat%re than to the s%rface te'perat%re# To 'ini'iDe this pro&le'* &e s%re that the (irin) to the LM28* as it lea?es the e?ice* is hel at the sa'e te'perat%re as the s%rface of interest# The easiest (ay to o this is to co?er %p these (ires (ith a &ea of epo0y (hich (ill ins%re that the lea s an (ires are all at the sa'e te'perat%re as the s%rface* an that the LM28 ieSs te'perat%re (ill not &e affecte &y the air te'perat%re# The TOB7: 'etal pac,a)e can also &e sol ere to a 'etal s%rface or pipe (itho%t a'a)e# Of co%rse* in that case the HW ter'inal of the circ%it (ill &e )ro%n e to that 'etal# Alternati?ely* the LM28 can &e 'o%nte insi e a seale Ben 'etal t%&e* an can then &e ippe into a &ath or scre(e into a threa e hole in a tan,# As (ith any IC* the LM28 an acco'panyin) (irin) an circ%its '%st &e ,ept ins%late an col ry* to a?oi lea,a)e an corrosion# This is especially tr%e if the circ%it 'ay operate at te'perat%res (here con ensation can occ%r# 9rinte Bcirc%it coatin)s an ?arnishes s%ch as E%' seal an epo0y paints or ips are often %se to ins%re that 'oist%re cannot corro e the LM28 or its connections# These e?ices are so'eti'es sol ere to a s'all li)htB(ei)ht heat fin* to ecrease the ther'al ti'e constant an spee %p the response in slo(lyB'o?in) air# On the other han * a s'all ther'al 'ass 'ay &e a e to the sensor* to )i?e the stea iest rea in) espite s'all e?iations in the air te'perat%re#

". H&'+, <&', S&)4/+ HLM"5CJB


Eeart &eat is sense &y %sin) a hi)h intensity type LED an LDR# The fin)er is place &et(een the LED an LDR# As Sensor a photo io e or a photo transistor can &e %se # The s,in 'ay &e ill%'inate (ith ?isi&le >re @ %sin) trans'itte or reflecte li)ht for etection# The ?ery s'all chan)es in reflecti?ity or in

1;

trans'ittance ca%se e-%al or e?en

&y the ?aryin) &loo hi)her than the

content of h%'an tiss%e are al'ost a'plit% e of the p%lse si)nal# i)ital

in?isi&le# Hario%s noise so%rces 'ay pro %ce ist%r&ance si)nals (ith a'plit% es The ne( si)nal processin) approach presente here co'&ines analo) an

si)nal processin) in a (ay that &oth parts can &e ,ept si'ple &%t in co'&ination are ?ery effecti?e in s%ppressin) ist%r&ance si)nals# The set%p escri&e here %ses a re LED for trans'itte li)ht ill%'ination an a LDR as etector# Cith only sli)ht chan)es in the prea'plifier circ%it the sa'e har (are an soft(are co%l &e %se (ith other ill%'ination an etection concepts# The etectors photo c%rrent >AC 9art@ is con?erte to ?olta)e an a'plifie &y an operational a'plifier >LM283@# O%tp%t is )i?en to another nonBin?ertin) inp%t of the sa'e LM283N here the secon a'plification is one# The ?al%e is preset in the in?ertin) inp%t* the a'plifie ?al%e is co'pare (ith preset ?al%e if any a&nor'al con ition occ%rs it (ill )enerate an interr%pt to the controller AT3AC1681.# ". .1 F&',#+&4B Eeat &eat in ication &y LED Instant o%tp%t i)ital si)nal for irectly connectin) to 'icrocontroller Co'pact SiDe Operatin) Holta)e P8H DC re)%late Operatin) C%rrent 166 'A O%tp%t Data Le?el 8H TTL le?el Eeart 5eat etection In icate &y LED an O%tp%t Ei)h 9%lse Li)ht so%rce ::6n' S%per Re LED

". .! A**-$:',$/)4B Di)ital Eeart Rate 'onitor 9atient Monitorin) Syste' 5ioB4ee &ac, control of ro&otics an applications

13

4i)%re2#8 escri&es the internal circ%it of heart &eat sensor an fi)%re 2#: sho(s the LM283 sensor of heart &eat sensor an fi)%re 2#; sho(s the si'%lation )raph of heart &eat of the person#

Figure 3.5: Internal circuit of Heart beat Sensor

4i)%re 2#:/ LM283 Eeart&eat Sensor

".5 C/):-#4$/)
The press%re* te'perat%re an heart&eat sensors are isc%sse # Usin) sensors the Analo) o%tp%ts are o&taine (hich are in electrical for'.

1A

CHAPTER G MICROCONTROLLER PIC16FC77A


.1 I),+/%#:,$/)
The 9IC is a 'icrocontroller (hich consists of an in&%ilt ADC* USART (hich are 'ainly %se in this project# ADC is %se for the con?ersion of Analo) o%tp%t of sensors to i)ital an USART for serial asynchrono%s co''%nication#

.! M$:+/:/),+/--&+ C/+& F&',#+&4


Y Ei)hBperfor'ance RISC C9U# Y Only 28 sin)le (or instr%ctions to learn# Y All sin)le cycle instr%ctions e0cept for pro)ra' &ranches (hich are t(o cycle# Y Operatin) spee / DC B 16 MED cloc, inp%t DC B 166 ns instr%ction cycle# Y Up to 3+ 0 17 (or s of 4LASE 9ro)ra' Me'ory* Up to 2:3 0 3 &ytes of Data Me'ory >RAM@ Up to 18: 0 3 &ytes of EE9ROM ata 'e'ory# Y 9in o%t co'pati&le to the 9IC1:C;25.;75.;:.;; Y Interr%pt capa&ility >%p to 17 so%rces@ Y Ei)ht le?el eep har (are stac, Y Direct* in irect an relati?e a ressin) 'o es# Y 9o(erBon Reset >9OR@# Y 9o(erB%p Ti'er >9CRT@ an Oscillator StartB%p Ti'er >OST@# Y Catch o) Ti'er >CDT@ (ith its o(n onBchip RC oscillator for relia&le operation#

26

Y 9ro)ra''a&le co eBprotection# Y 9o(er sa?in) SLEE9 'o e# Y Selecta&le oscillator options# Y Lo(Bpo(er* hi)hBspee CMOS 4LASE.EE9ROM technolo)y# Y 4%lly static esi)n# Y Ci e operatin) ?olta)e ran)e/ 1#6H to 8#8H#

4i)%re 7#1/ 9in Dia)ra' of 'icricontroller 9IC1:43;;A

." P&+$*0&+'- F&',#+&4


Y Ti'er6/ 3B&it ti'er.co%nter (ith 3B&it prescaler

21

Y Ti'er1/ 1:B&it ti'er.co%nter (ith prescaler* can &e incre'ente e0ternal crystal.cloc,

%rin) sleep ?ia

Y Ti'er1/ 3B&it ti'er.co%nter (ith 3B&it perio re)ister* prescaler an postscaler Y T(o Capt%re* Co'pare* 9CM 'o %les B Capt%re is 1:B&it* 'a0# Resol%tion is 11#8 ns B Co'pare is 1:B&it* 'a0# Resol%tion is 166 ns B 9CM 'a0# Resol%tion is 16B&it Y 16B&it '%ltiBchannel Analo)BtoBDi)ital con?erter Y Synchrono%s Serial 9ort >SS9@ (ith S9IZ >Master Mo e@ an I1C >Master.Sla?e@ Y Uni?ersal Synchrono%s Asynchrono%s Recei?er Trans'itter >USART.SCI@ (ith AB &it a ress etection Y 9arallel Sla?e 9ort >9S9@ 3B&its (i e* (ith e0ternal RD* CR an CS controls >76.77Bpin only@ Y 5ro(nBo%t etection circ%itry for 5ro(nBo%t Reset >5OR@

. A+:0$,&:,#+&

21

4i)%re 7#1/ Internal Architect%re of 'icrocontroller 9IC1:43;;A

.5 P$) D&4:+$*,$/)
.5.1 OSC19CLKIB Oscillator crystal or e0ternal cloc, inp%t >or@ Oscillator crystal inp%t or e0ternal cloc, so%rce inp%t# ST &%ffer (hen confi)%re OSC1.CL+I* OSC1.CL+O pins@# .5.! OSC!9CLKOB in RC 'o e other(ise CMOS# E0ternal cloc, so%rce inp%t# Al(ays associate (ith pin f%nction OSC1 >see

22

Oscillator crystal or cloc, o%tp%t Oscillator# Connects to the crystal or resonator in Crystal Oscillator 'o e# In RC 'o e* OSC1 pin o%tp%ts CL+O* (hich has 1.7 the fre-%ency of OSC1 an .5." MCLR9VPPB Master Clear >inp%t@ >or@ pro)ra''in) ?olta)e >o%tp%t@# Master Clear >Reset@ inp%t# This pin is an acti?e lo( Reset to the e?ice# 9ro)ra''in) ?olta)e inp%t# RA6.AN6# RA1.AN1# RA1.AN1.HRE4B.CHRE4# HRE4CHRE4# RA2.AN2.HRE4P# HRE4P# RA7.T6C+I.C1OUT# T6C+I# C1OUT# RA8.AN7.SS.C1OUT.SS.C1OUT. enotes the instr%ction cycle rate#

.6 I)*#, ')% O#,*#, P$)4


So'e pins for these I.O ports are '%ltiple0e (ith an alternate f%nction for the peripheral feat%res on the e?ice# In )eneral* (hen a peripheral is ena&le * that pin 'ay not &e %se as a )eneral p%rpose I.O pin# .6.1 PORTA ')% TRISA R&3$4,&+B

27

9ORTA is a :B&it (i e* &i irectional port# The correspon in) ata irection re)ister is TRISA# Settin) a TRISA &it >[ 1@ (ill 'a,e the correspon in) 9ORTA pin an inp%t >i#e#* p%t the correspon in) o%tp%t ri?er in a Ei)h G I'pe ance 'o e@# Clearin) a TRISA &it >[ 6@ (ill 'a,e the correspon in) 9ORTA pin an o%tp%t >i#e#* p%t the contents of the o%tp%t latch on the selecte pin@# Rea in) the 9ORTA re)ister rea s the stat%s of the pins* (hereas (ritin) to it (ill (rite to the port latch# All (rite operations are rea B'o ifyB(rite operations# Therefore* a (rite to a port i'plies that the port pins are rea N the ?al%e is 'o ifie an then (ritten to the port ata latch# 9in RA7 is '%ltiple0e (ith the Ti'er6 'o %le cloc, inp%t to &eco'e the RA7.T6C+I pin# The RA7.T6C+I pin is a Sch'itt Tri))er inp%t an an openB rain o%tp%t# All other 9ORTA pins ha?e TTL inp%t le?els an f%ll CMOS o%tp%t ri?ers# Other 9ORTA pins are '%ltiple0e (ith analo) inp%ts an the analo) HRE4 inp%t for &oth the A.D con?erters an the co'parators# The operation of each pin is selecte &y clearin).settin) the appropriate control &its in the ADCON1 an .or CMCON re)isters# The TRISA re)ister controls the irection of the port pins e?en (hen they are &ein) %se as analo) inp%ts# The %ser '%st ens%re the &its in the TRISA re)ister are 'aintaine set (hen %sin) the' as analo) inp%ts# Note/ On a 9o(erBon Reset* these pins are confi)%re as analo) inp%ts an rea as \6S# The co'parators are in the off > i)ital@# .6.! PORT= ')% TRIS= R&3$4,&+B 9ORT5 is an 3B&it (i e* &i irectional port# The correspon in) ata irection re)ister is TRIS5# Settin) a TRIS5 &it >[ 1@ (ill 'a,e the correspon in) 9ORT5 pin an inp%t >i#e#* p%t the correspon in) o%tp%t ri?er in a Ei)hBI'pe ance 'o e@# Clearin) a TRIS5 &it >[ 6@ (ill 'a,e the correspon in) 9ORT5 pin an o%tp%t >i#e#* p%t the contents of the o%tp%t latch on the selecte pin@# Three pins of 9ORT5 are '%ltiple0e (ith the InBCirc%it De&%))er an Lo(BHolta)e 9ro)ra''in) f%nction/ R52.9GM* R5:.9GC an R5;.9GD# 4o%r of the 9ORT5 pins* R5;/R57* ha?e an interr%ptionB chan)e feat%re# Only pins confi)%re as inp%ts can ca%se this interr%pt to occ%r >i#e#* any R5;/R57 28

pin confi)%re as an o%tp%t is e0cl% e fro' the interr%ptionB chan)e co'parison@# The inp%t pins >of R5;/R57@ are co'pare (ith the ol ?al%e latche on the last rea of 9ORT5# The "'is'atch$ o%tp%ts of R5;/R57 are ORSe to)ether to )enerate the R5 port chan)e interr%pt (ith fla) &it R5I4 >INTCON]6^@# This interr%pt can (a,e the e?ice fro' Sleep# The %ser* in the Interr%pt Ser?ice Ro%tine* can clear the interr%pt in the follo(in) 'anner/ a@ Any rea or (rite of 9ORT5# This (ill en the 'is'atch con ition# &@ Clear fla) &it R5I4# A 'is'atch con ition (ill contin%e to set fla) &it R5I4# Rea in) 9ORT5 (ill en the 'is'atch con ition an allo( fla) &it R5I4 to &e cleare # The interr%ptB onBchan)e feat%re is reco''en e for (a,eB%p on ,ey epression operation an operations (here 9ORT5 is only %se for the interr%ptBonBchan)e feat%re# 9ollin) of 9ORT5 is not reco''en e (hile %sin) the interr%ptBonB chan)e feat%re# This interr%ptBonB'is'atch feat%re* to)ether (ith soft(are confi)%ra&le p%llB%ps on these fo%r pins* allo( easy interface to a ,eypa an 'a,e it possi&le for (a,eB%p on ,ey epression# .6." PORTC ')% TRISC R&3$4,&+B 9ORTC is an 3B&it (i e* &i irectional port# The correspon in) ata irection re)ister is TRISC# Settin) a TRISC &it >[ 1@ (ill 'a,e the correspon in) 9ORTC pin an inp%t >i#e#* p%t the correspon in) o%tp%t ri?er in a Ei)hB I'pe ance 'o e@# Clearin) a TRISC &it >[ 6@ (ill 'a,e the correspon in) 9ORTC pin an o%tp%t >i#e#* p%t the contents of the o%tp%t latch on the selecte pin@# 9ORTC is '%ltiple0e (ith se?eral peripheral f%nctions >Ta&le 7B8@# 9ORTC pins ha?e Sch'itt Tri))er inp%t &%ffers# Chen the I1C 'o %le is ena&le * the 9ORTC]7/2^ pins can &e confi)%re (ith nor'al I1C le?els* or (ith SM5%s le?els* &y %sin) the C+E &it >SS9STAT]:^@# Chen ena&lin) peripheral f%nctions* care sho%l &e ta,en in efinin) TRIS &its for each 9ORTC pin# So'e peripherals o?erri e the TRIS &it to 'a,e a pin an o%tp%t* (hile other peripherals o?erri e the TRIS &it to 'a,e a pin an

2:

inp%t# Since the TRIS &it o?erri e is in effect (hile the peripheral is ena&le * rea B 'o ify (rite instr%ctions >5S4* 5C4* =ORC4@ (ith TRISC as the estination* sho%l &e a?oi e # The %ser sho%l refer to the correspon in) peripheral section for the correct TRIS &it settin)s# .6. PORTD ')% TRISD R&3$4,&+B 9ORTD is an 3B&it port (ith Sch'itt Tri))er inp%t &%ffers# Each pin is in i?i %ally confi)%ra&le as an inp%t or o%tp%t# 9ORTD can &e confi)%re as an 3B &it (i e 'icroprocessor port >9arallel Sla?e 9ort@ &y settin) control &it* 9S9 MODE >TRISE]7^@# In this 'o e* the inp%t &%ffers are TTL# .6.5 PORTE ')% TRISE R&3$4,&+B 9ORTE has three pins >RE6.RD.AN8* RE1.CR.AN: an RE1.CS.AN;@

(hich are in i?i %ally confi)%ra&le as inp%ts or o%tp%ts# These pins ha?e Sch'itt Tri))er inp%t &%ffers# The 9ORTE pins &eco'e the I.O control inp%ts for the 'icroprocessor port (hen &it 9S9MODE >TRISE]7^@ is set# In this 'o e* the %ser '%st 'a,e certain that the TRISE]1/6^ &its are set an that the pins are confi)%re as i)ital inp%ts# Also* ens%re that ADCON1 is confi)%re for i)ital I.O# In this 'o e* the inp%t &%ffers are TTL# Re)ister 7B1 sho(s the TRISE re)ister (hich also controls the 9arallel Sla?e 9ort operation# 9ORTE pins are '%ltiple0e (ith analo) inp%ts# Chen selecte for analo) inp%t* these pins (ill rea as \6Ss# TRISE controls# The irection of the RE pins* e?en (hen they are &ein) %se as analo) inp%ts# The %ser '%st 'a,e s%re to ,eep the pins confi)%re as inp%ts (hen %sin) the' as analo) inp%ts#

.7 M&(/+5 O+3')$F',$/)
There are three 'e'ory &loc,s in each of the 9IC1:43;=A e?ices# The pro)ra' 'e'ory an ata 'e'ory ha?e separate &%ses so that conc%rrent access can

2;

occ%r an is etaile in this section# The EE9ROM ata 'e'ory an flah pro)ra' 'e'ory is also etaile # .7.1 P+/3+'( M&(/+5 O+3')$F',$/)B The 9IC1:43;=A e?ices ha?e a 12B&it pro)ra' co%nter capa&le of

a ressin) an 3+ (or 0 17 &it pro)ra' 'e'ory space# The 9IC1:43;:A.3;;A e?ices ha?e 3+ (or s 0 17 &its of 4lash pro)ra' 'e'ory* (hile 9IC1:43;2A.3;7A e?ices ha?e 7+ (or s 0 17 &its# Accessin) a location a&o?e the physically i'ple'ente a ress (ill ca%se a (raparo%n # The Reset ?ector is at 6666h an the interr%pt ?ector is at 6667h# The ata 'e'ory is partitione into '%ltiple &an,s (hich contain the

General 9%rpose Re)isters an the Special 4%nction Re)isters# 5its R91 >Stat%s]:^@ an R96 >Stat%s]8^@ are the &an, select &its# Each &an, e0ten s %p to ;4h >113 &ytes@# The lo(er locations of each &an, are reser?e for the Special 4%nction Re)isters# A&o?e the Special 4%nction Re)isters are General 9%rpose Re)isters* i'ple'ente as static RAM# All i'ple'ente &an,s contain Special 4%nction Re)isters# So'e fre-%ently %se Special 4%nction Re)isters fro' one &an, 'ay &e 'irrore in another &an, for co e re %ction an -%ic,er access#
4.7.2 D',' M&(/+5 O+3')$F',$/)B

The

ata 'e'ory is partitione

into '%ltiple &an,s (hich contain the

General 9%rpose Re)isters an the Special 4%nction Re)isters# 5its R91 >Stat%s]:^@ an R96 >Stat%s]8^@ are the &an, select &its# Each &an, e0ten s %p to ;4h >113 &ytes@# The lo(er locations of each &an, are reser?e for the Special 4%nction Re)isters# A&o?e the Special 4%nction Re)isters are General 9%rpose Re)isters* i'ple'ente as static RAM# All i'ple'ente &an,s contain Special 4%nction Re)isters# So'e fre-%ently %se Special 4%nction Re)isters fro' one &an, 'ay &e 'irrore in another &an, for co e re %ction an -%ic,er access# .7." D',' EEPROM ')% F-'40 P+/3+'( M&(/+5B

23

The ata EE9ROM an 4lash pro)ra' 'e'ory is rea a&le an (rita&le %rin) nor'al operation >o?er the f%ll HDD ran)e@# This 'e'ory is not irectly 'appe in the re)ister file space# Instea * it is in irectly a resse thro%)h the Special 4%nction Re)isters# There are si0 S4Rs %se to rea an (rite this 'e'ory# Y EECON1 Y EECON1 Y EEDATA Y EEDATE Y EEADR Y EEADRE

.C T$(&+4B
.C.1 T$(&+0 M/%#-&B The Ti'er6 'o %le ti'er.co%nter has the follo(in) feat%res/ Y 3B&it ti'er.co%nter Y Rea a&le an (rita&le Y 3B&it soft(are pro)ra''a&le prescaler Y Internal or e0ternal cloc, select Y Interr%pt on o?erflo( fro' 44h to 66h Y E )e select for e0ternal cloc, Ti'er 'o e is selecte &y clearin) &it T6CS >O9TION_REG]8^@# In Ti'er 'o e* the Ti'er6 'o %le (ill incre'ent e?ery instr%ction cycle >(itho%t prescaler@# If the TMR6 re)ister is (ritten* the incre'ent is inhi&ite for the follo(in) t(o instr%ction cycles# The %ser can (or, aro%n this &y (ritin) an a j%ste ?al%e to the TMR6 re)ister# .C.! T$(&+0 I),&++#*,B The TMR6 interr%pt is )enerate (hen the TMR6 re)ister o?erflo(s fro' 44h to 66h# This o?erflo( sets &it TMR6I4 >INTCON]1^@# The interr%pt can &e 'as,e &y clearin) &it TMR6IE >INTCON]8^@# 5it TMR6I4 '%st &e cleare in soft(are &y the Ti'er6 'o %le Interr%pt Ser?ice Ro%tine &efore reBena&lin) this

2A

interr%pt# The TMR6 interr%pt cannot a(a,en the processor fro' Sleep since the ti'er is sh%tBoff %rin) Sleep# .C." T$(&+1 M/%#-&B The Ti'er1 'o %le is a 1:B&it ti'er.co%nter consistin) of t(o 3B&it re)isters >TMR1E an TMR1L@ (hich are rea a&le an (rita&le# The TMR1 re)ister pair >TMR1E/TMR1L@ incre'ents fro' 6666h to 4444h an rolls o?er to 6666h# The TMR1 interr%pt* if ena&le * is )enerate on o?erflo( (hich is latche in interr%pt fla) &it* TMR1I4 >9IR1]6^@# This interr%pt can &e ena&le . isa&le &y settin) or clearin) TMR1 interr%pt ena&le &it* TMR1IE >9IE1]6^@# Ti'er1 can operate in one of t(o 'o es/ Y As a Ti'er Y As a Co%nter The operatin) 'o e is eter'ine &y the cloc, select &it* TMR1CS >T1CON]1^@#In Ti'er 'o e* Ti'er1 incre'ents e?ery instr%ction cycle# In Co%nter 'o e* it incre'ents on e?ery risin) e )e of the e0ternal cloc, inp%t# Ti'er1 can &e ena&le . isa&le &y settin).clearin) control &it* TMR1ON >T1CON]6^@#Ti'er1 also has an internal "Reset inp%t$# This Reset can &e )enerate &y either of the t(o CC9 'o %les# Sho(s the Ti'er1 Control re)ister# Chen the Ti'er1 oscillator is ena&le >T1OSCEN is set@* the RC1.T1OSI.CC91 an RC6.T1OSO.T1C+I pins &eco'e inp%ts# That is* the TRISC]1/6^ ?al%e is i)nore an these pins rea as \6S# .C. T$(&+! M/%#-&B Ti'er1 is an 3B&it ti'er (ith a prescaler an a postscaler# It can &e %se as the 9CM ti'e &ase for the 9CM 'o e of the CC9 'o %le>s@# The TMR1 re)ister is rea a&le an (rita&le an is cleare on any e?ice Reset# The inp%t cloc, >4OSC.7@ has a prescale option of 1/1* 1/7 or 1/1:* selecte &y control &its T1C+9S1/T1C+9S6 >T1CON]1/6^@# The Ti'er1 'o %le has an 3B&it perio re)ister* 9R1# Ti'er1 incre'ents fro' 66h %ntil it 'atch 9R1 an then resets to 66h on the ne0t incre'ent cycle# 9R1 is a rea a&le an (rita&le re)ister# The 9R1 re)ister is initialiDe to 44h %pon Reset# The 'atch o%tp%t of TMR1 )oes thro%)h a

76

7B&it postscaler >(hich )i?es a 1/1 to 1/1: scalin) incl%si?e@ to )enerate a TMR1 interr%pt >latche in fla) &it* TMR1I4 >9IR1]1^@@# Ti'er1 can &e sh%tBoff &y clearin) control &it* TMR1ON >T1CON]1^@* to 'ini'iDe po(er cons%'ption#

.6 I)-C$+:#$, D&<#33&+
9IC1:43;=A e?ices ha?e a Catch o) Ti'er (hich can &e sh%tBoff only thro%)h confi)%ration &its# It r%ns off its o(n RC oscillator for a e relia&ility# There are t(o ti'ers that offer necessary elays on po(erB%p# One is the Oscillator StartB%p Ti'er >OST@* inten e to ,eep the chip in Reset %ntil the crystal oscillator is sta&le# The other is the 9o(erB%p Ti'er >9CRT@* (hich pro?i es a fi0e 's >no'inal@ on po(erB%p only# It is esi)ne to ,eep the part In Reset (hile the po(er s%pply sta&iliDes# Cith these t(o ti'ers onBchip* 'ost applications nee no e0ternal Reset circ%itry# Sleep 'o e is esi)ne to offer a ?ery lo( c%rrent po(erB o(n 'o e# The %ser can (a,eB%p fro' Sleep thro%)h e0ternal Reset* Catch o) Ti'er (a,eB%p or thro%)h an interr%pt# Se?eral oscillator options are also 'a e a?aila&le to allo( the part to fit the application# The RC oscillator option sa?es syste' cost (hile the L9 crystal option sa?es po(er# A set of confi)%ration &its is %se to select ?ario%s options# elay of ;1

.10 A)'-/3 ,/ %$3$,'- :/)E&+,&+ M/%#-&


The Analo)BtoBDi)ital >A.D@ Con?erter 'o %le has fi?e inp%ts for the 13Bpin e?ices an ei)ht for the 76.77Bpin e?ices# The con?ersion of an analo) inp%t si)nal res%lts in a correspon in) 16B&it i)ital n%'&er# The A.D 'o %le has hi)h an lo(B ?olta)e reference inp%t that is soft(are selecta&le to so'e co'&ination of HDD* HSS* RA1 or RA2# The A.D con?erter has a %ni-%e feat%re of &ein) a&le to operate (hile the e?ice is in Sleep 'o e# To operate in Sleep* the A.D cloc, '%st &e eri?e fro' the A.DSs internal RC oscillator# The A.D 'o %le has fo%r re)isters# These re)isters are/ Y A.D Res%lt Ei)h Re)ister >ADRESE@

71

Y A.D Res%lt Lo( Re)ister >ADRESL@ Y A.D Control Re)ister 6 >ADCON6@ Y A.D Control Re)ister 1 >ADCON1@ The ADCON6 re)ister* sho(n in Re)ister 11B1* controls the operation of the A.D 'o %le# The ADCON1 re)ister* sho(n in Re)ister 11B1* confi)%res the f%nctions of the port pins# The port pins can &e confi)%re as analo) inp%ts >RA2 can also &e the ?olta)e reference@ or as i)ital I.O#

.11 S5):0+/)/#4 ')% A45):0+/)/#4 C/((#)$:',$/)4


There are t(o &asic types of serial co''%nications* synchrono%s an asynchrono%s# Cith synchrono%s co''%nications* the t(o e?ices initially synchroniDe the'sel?es to each other* an then contin%ally sen characters to stay in sync# E?en (hen the ata is not really &ein) sent* a constant flo( of &its allo(s each e?ice to ,no( (here the other is at any )i?en ti'e# That is* each character that is sent is either act%al ata or an i le character# Synchrono%s co''%nications allo(s faster ata transfer rates than asynchrono%s 'etho s* &eca%se a itional &its to 'ar, the &e)innin) an en of each ata &yte are not re-%ire # The serial ports on I5M style 9Cs are asynchrono%s e?ices an therefore only s%pport asynchrono%s serial co''%nications# Asynchrono%s 'eans no "synchroniDation$* an th%s oes not re-%ire sen in) an recei?in) i le characters# Eo(e?er* the &e)innin) an en of each &yte of ata '%st &e i entifie &y start an stop &its# The start &it in icates (hen the ata &yte is a&o%t to &e)in an the stop &it si)nals (hen it en s# The re-%ire'ent to sen these a itional t(o &its ca%ses asynchrono%s co''%nication to &e sli)htly slo(er than synchrono%s ho(e?er it has the a ?anta)e that the processor oes not ha?e to eal (ith the a itional i le characters#

.1! S&+$'- C/((#)$:',$/)


A serial port sen s an recei?es ata one &it at a ti'e o?er one (ire# Chile it ta,es ei)ht ti'es as lon) as to transfer each &yte of ata this (ay* only a fe( (ires

71

are re-%ire # In fact* t(oB(ay >f%ll %ple0@ co''%nications is possi&le (ith only three separate (iresB one to sen * one to recei?e* an a co''on si)nal )ro%n (ire# 5iB irectional co''%nications Co''%nicatin) &y (ires The 9arity 5it Ca&le len)ths MA=B121C DCE An DTE e?ices Synchrono%s an Asynchrono%s Co''%nications .1!.1 =$-%$+&:,$/)'- C/((#)$:',$/)4B The serial port on yo%r 9C is a f%llB %ple0 e?ice 'eanin) that it can sen an recei?e ata at the sa'e ti'e# In or er to &e a&le to o this* it %ses separate lines for trans'ittin) an recei?in) ata# So'e types of serial e?ices s%pport only oneB (ay co''%nications an therefore %se only t(oB(ires in the ca&le G the trans'it line an the si)nal )ro%n # .1!.! C/((#)$:',$)3 <5 <$,4B Once the start &it has &een sent* the trans'itter sen s the act%al ata &its# There 'ay either &e 8*:*;* or 3 ata &its* epen in) on the n%'&er yo% ha?e selecte # 5oth recei?er an the trans'itter '%st a)ree on the n%'&er of ata &its* as (ell as the &a% rate# Al'ost all e?ices trans'it ata %sin) either ; or 3 ata &its# Notice that (hen only ; ata &its are e'ploye * yo% cannot sen ASCII ?al%es )reater than 11;# Li,e(ise* %sin) 8 &its li'its the hi)hest possi&le ?al%e to 21# After the ata has &een trans'itte * a stop &it is sent# A stop &it has a ?al%e of 1B or a 'ar, stateB an it can &e etecte correctly e?en if the pre?io%s ata &it also ha a ?al%e of This is acco'plishe &y the stop &itSs %ration# .1!." T0& P'+$,5 =$,B

72

5esi es the synchroniDation pro?i e &y the %se of start an stop &its* an a itional &it calle a parity &it 'ay optionally &e trans'itte alon) (ith the ata# A parity &it affor s a s'all a'o%nt of error chec,in)* to help etect ata corr%ption that 'i)ht occ%r %rin) trans'ission. .1!. C'<-& L&)3,04B The MA=B121 stan ar i'poses a ca&le len)th li'it of 86 feet# Ro% can %s%ally i)nore this "stan ar $* since a ca&le can &e as lon) as 16666 feet at &a% rates %p to 1A166 if yo% %se a hi)h -%ality* (ell shiel e en?iron'ent has a lar)e effect on len)ths for %nshiel e ca&les ca&le# The e0ternal

.1" C/):-#4$/)
9IC 'icrocontroller (ith its a ?ance feat%res li,e re %ce instr%ction set* in&%ilt Catch o) Ti'er* A%to'atic sleep 'o e* in&%ilt ADC an USART pro?i es ?ario%s n%'&er of applications#

CHAPTER - 5 GLO=AL SYSTEM FOR MO=ILE COMMUNICATION

77

5.1 I),+/%#:,$/)
Glo&al syste' for 'o&ile co''%nication >GSM@ is a )lo&ally accepte stan ar for i)ital cell%lar co''%nication# GSM is the na'e of a stan ar iDation )ro%p esta&lishe in 1A31 to create a co''on E%ropean 'o&ile telephone stan ar that (o%l for'%late specifications for a panBE%ropean 'o&ile cell%lar ra io syste' operatin) at A66 MED* It is esti'ate that 'any co%ntries o%tsi e of E%rope (ill join the GSM partnership# Cell%lar is one of the fastest )ro(in) the an 'ost of e'an in) cell%lar to teleco''%nications stan ar iDe applications# Thro%)ho%t e?ol%tion

teleco''%nications* ?ario%s syste's ha?e &een e?elope (itho%t the &enefit of specifications# This presente 'any pro&le's irectly relate co'pati&ility* especially (ith the e?elop'ent of i)ital ra io technolo)y# The GSM stan ar is inten e to a ress these pro&le's# 4ro' 1A31 to 1A38 isc%ssions (ere hel to eci e &et(een &%il in) an analo) or i)ital syste'# After '%ltiple fiel tests* a i)ital syste' (as a opte for GSM# The ne0t tas, (as to eci e &et(een a narro( or &roa &an sol%tion# In May 1A3;* the narro(&an ti'e i?ision '%ltiple access >TDMA@ sol%tion (as chosen# GSM pro?i es reco''en ations* not re-%ire'ents# The GSM specifications efine the f%nctions an interface re-%ire'ents in etail &%t o not a ress the har (are# The reason for this is to li'it the esi)ners as little as possi&le &%t still to 'a,e it possi&le for the operators to &%y e-%ip'ent fro' ifferent s%ppliers# The GSM net(or, is i?i e into three 'ajor syste's/ the s(itchin) syste' >SS@* the &ase station syste' >5SS@* an the operation an s%pport syste' >OSS@#

5.! GSM A+:0$,&:,#+&

78

4i)%re 8#1/ GSM Architect%re

5." T0& S2$,:0$)3 S54,&(


The s(itchin) syste' >SS@ is responsi&le for perfor'in) call processin) an s%&scri&erBrelate f%nctions# The s(itchin) syste' incl% es the follo(in) f%nctional %nits# Eo'e Location Re)ister >ELR@ MThe ELR is a ata&ase %se for stora)e an 'ana)e'ent of s%&scriptions# The ELR is consi ere the 'ost i'portant ata&ase* as it stores per'anent ata a&o%t s%&scri&ers* incl% in) a s%&scri&erFs

7:

ser?ice profile* location infor'ation* an acti?ity stat%s# Chen an in i?i %al &%ys a s%&scription fro' one of the 9CS operators* he or she is re)istere in the ELR of that operator# Mo&ile Ser?ices S(itchin) Center >MSC@ MThe MSC perfor's the telephony s(itchin) f%nctions of the syste'# It controls calls to an fro' other telephone an ata syste's# It also perfor's s%ch f%nctions as toll tic,etin)* net(or, interfacin)* co''on channel si)nalin)* an others# Hisitor Location Re)ister >HLR@ MThe HLR is a ata&ase that contains te'porary infor'ation a&o%t s%&scri&ers that is nee e &y the MSC in or er to ser?ice ?isitin) s%&scri&ers# The HLR is al(ays inte)rate (ith the MSC# Chen a 'o&ile station roa's into a ne( MSC area* the HLR connecte to that MSC (ill re-%est ata a&o%t the 'o&ile station fro' the ELR# Later* if the 'o&ile station 'a,es a call* the HLR (ill ha?e the infor'ation nee e for call set%p (itho%t ha?in) to interro)ate the ELR each ti'e# 5.".1 A#,0&),$:',$/) C&),&+ HAUCJB A %nit calle the AUC pro?i es a%thentication an encryption para'eters that ?erify the %serFs i entity an ens%re the confi entiality of each call# The AUC protects net(or, operators fro' ifferent types of fra% fo%n in to ayFs cell%lar (orl # 5.".! E1#$*(&), I%&),$,5 R&3$4,&+ HEIRJB The EIR is a ata&ase that contains infor'ation a&o%t the i entity of 'o&ile e-%ip'ent that pre?ents calls fro' stolen* %na%thoriDe * or efecti?e 'o&ile stations# The AUC an AUC.EIR no e# 5."." T0& ='4& S,',$/) S54,&( H=SSJB All ra ioBrelate f%nctions are perfor'e in the 5SS* (hich consists of &ase station controllers >5SCs@ an the &ase transcei?er stations >5TSs@# EIR are i'ple'ente as stan Balone no es or as a co'&ine

7;

5.".".1 =SC M The 5SC pro?i es all the control f%nctions an

physical lin,s

&et(een the MSC an 5TS# It is a hi)hBcapacity s(itch that pro?i es f%nctions s%ch as han o?er* cell confi)%ration ata* an control of ra io fre-%ency >R4@ po(er le?els in &ase transcei?er stations# A n%'&er of 5SCs are ser?e &y an MSC# 5.".".! =TS M The 5TS han les the ra io interface to the 'o&ile station# The 5TS is the ra io e-%ip'ent >transcei?ers an antennas@ nee e to ser?ice each cell in the net(or,# A )ro%p of 5TSs are controlle &y a 5SC# 5.". T0& O*&+',$/) ')% S#**/+, S54,&(B The operations an 'aintenance center >OMC@ is connecte to all e-%ip'ent in the s(itchin) syste' an to the 5SC# The i'ple'entation of OMC is calle the operation an s%pport syste' >OSS@# The OSS is the f%nctional entity fro' (hich the net(or, operator 'onitors an controls the syste'# The p%rpose of OSS is to offer the c%sto'er costBeffecti?e s%pport for centraliDe * re)ional* an i'portant f%nction of OSS is to pro?i e a net(or, o?er?ie( an local operational an 'aintenance acti?ities that are re-%ire for a GSM net(or,# An s%pport the 'aintenance acti?ities of ifferent operation an 'aintenance or)aniDations# 5.".5. A%%$,$/)'- F#):,$/)'- E-&(&),4B 5.".5.1 M&44'3& C&),&+ HMIEJ M The M=E is a no e that pro?i es inte)rate ?oice* fa0* an ata 'essa)in)# Specifically* the M=E han les short 'essa)e ser?ice* cell &roa cast* ?oice 'ail* fa0 'ail* eB'ail* an notification# 5.".5.! M/<$-& S&+E$:& N/%& HMSNJ M The MSN is the no e that han les the 'o&ile intelli)ent net(or, >IN@ ser?ices # 5.".5." G',&2'5 M/<$-& S&+E$:&4 S2$,:0$)3 C&),&+ HGMSCJ M A )ate(ay is a no e %se to interconnect t(o net(or,s# The )ate(ay is often i'ple'ente in an MSC# The MSC is then referre to as the GMSC# 5.".5. G4( I),&+2/+8$)3 U)$, HGIWUJ MThe GICU consists of &oth har (are an soft(are that pro?i es an interface to ?ario%s net(or,s for ata co''%nications#

73

Thro%)h the GICU* %sers can alternate &et(een speech an

ata %rin) the sa'e

call# The GICU har (are e-%ip'ent is physically locate at the MSC.HLR

5. GSM C&--#-'+ N&,2/+8


GSM is a cell%lar net(or,* (hich 'eans that 'o&ile phones connect to it &y searchin) for cells in the i''e iate ?icinity# GSM net(or,s operate in fo%r ifferent fre-%ency ran)es# Most GSM net(or,s operate in the A66 MED or 1366 MED &an s# So'e co%ntries in the A'ericas >incl% in) Cana a an the Unite States@ %se the 386 MED an 1A66 MED &an s &eca%se the A66 an 1366 MED fre-%ency &an s (ere alrea y allocate # The rarer 766 an 786 MED fre-%ency &an s are assi)ne in so'e co%ntries (here these fre-%encies (ere pre?io%sly %se for firstB)eneration syste's# GSMBA66 %ses 3A6GA18 MED to sen infor'ation fro' the 'o&ile station to the &ase station >%plin,@ an A28GA:6 MED for the other irection > o(nlin,@* pro?i in) 117 R4 channels >channel n%'&ers 1 to 117@ space at 166 ,ED# D%ple0 spacin) of 78 MED is %se # In so'e co%ntries the GSMBA66 &an has &een e0ten e to co?er a lar)er fre-%ency ran)e# This Fe0ten e GSMF* EBGSM* %ses 336GA18 MED >%plin,@ an A18GA:6 MED > o(nlin,@* a in) 86 channels >channel n%'&ers A;8 to 1612 an 6@ to the ori)inal GSMBA66 &an # Ti'e i?ision '%ltiple0in) is %se to allo( ei)ht f%llBrate or si0teen halfBrate speech channels per ra io fre-%ency channel# There are ei)ht ra io ti'eslots >)i?in) ei)ht &%rst perio s@ )ro%pe into (hat is calle a TDMA fra'e# Ealf rate channels %se alternate fra'es in the sa'e ti'eslot# The channel ata rate for all 3 channels is 1;6#322 ,&it.s* an the fra'e %ration is 7#:18 's# GSM has %se a ?ariety of ?oice co ecSs to s-%eeDe 2#1 ,ED a% io into &et(een 8#: an 12 ,&it.s# Ori)inally* t(o co ecs* na'e after the types of ata channel they (ere allocate * (ere %se * calle Ealf Rate >8#: ,&it.s@ an 4%ll Rate >12 ,&it.s@# These %se a syste' &ase %pon linear pre icti?e co in) >L9C@# In

7A

a ition to &ein) efficient (ith &itrates* these co ecs also 'a e it easier to i entify 'ore i'portant parts of the a% io* allo(in) the air interface layer to prioritiDe an &etter protect these parts of the si)nal

5.5 GSM N&,2/+8 C-'44$.$:',$/)


There are fi?e ifferent cell siDes in a GSM net(or,M'acro* 'icro* 9ico* fe'to an %'&rella cells# The co?era)e area of each cell ?aries accor in) to the i'ple'entation en?iron'ent# Macro cells can &e re)ar e as cells (here the &ase station antenna is installe on a 'ast or a &%il in) a&o?e a?era)e roof top le?el# Micro cells are cells (hose antenna hei)ht is %n er a?era)e roof top le?elN they are typically %se in %r&an areas# 9ico cells are s'all cells (hose co?era)e ia'eter is a fe( oDen 'etersN they are 'ainly %se in oors# 4e'to cells are cells esi)ne for %se in resi ential or s'all &%siness en?iron'ents an connect to the ser?ice pro?i erSs net(or, ?ia a &roa &an internet connection# U'&rella cells are %se to co?er sha o(e re)ions of s'aller cells an fill in )aps in co?era)e &et(een those cells# Cell horiDontal ra i%s ?aries epen in) on antenna hei)ht* antenna )ain an propa)ation con itions fro' a co%ple of h%n re 'eters to se?eral tens of ,ilo'eters# The lon)est istance the GSM specification s%pports in practical %se is 28 ,ilo'eters >11 'i@# There are also se?eral i'ple'entations of the concept of an e0ten e cell* (here the cell ra i%s co%l &e o%&le or e?en 'ore* epen in) on the antenna syste'* the type of terrain an the ti'in) a ?ance# In oor co?era)e is also s%pporte &y GSM an 'ay &e achie?e &y %sin) an in oor pico cell &ase station* or an in oor repeater (ith istri&%te in oor antennas fe thro%)h po(er splitters* to eli?er the ra io si)nals fro' an antenna o%t oors to the separate in oor istri&%te antenna syste'# These are typically eploye (hen a lot of call capacity is nee e in oors* for e0a'ple in shoppin) centers or airports#

86

Eo(e?er* this is not a prere-%isite* since in oor co?era)e is also pro?i e &y inB &%il in) penetration of the ra io si)nals fro' near&y cells# The 'o %lation %se in GSM is Ga%ssian 'ini'%'Bshift ,eyin) >GMS+@* a ,in of contin%o%sBphase fre-%ency shift ,eyin)# In GMS+* the si)nal to &e to a fre-%ency 'o %lator* (hich )reatly re %ces the interference to 'o %late onto the carrier is first s'oothe (ith a Ga%ssian lo(Bpass filter prior to &ein) fe nei)h&orin)

5.6 GSM ,+')4($,,&+


One of the ,ey feat%res of GSM is the S%&scri&er I entity Mo %le >SIM@* co''only ,no(n as a SIM car # The SIM is a etacha&le s'art car containin) the %serFs s%&scription infor'ation an phone &oo,# This allo(s the %ser to retain his or her infor'ation after s(itchin) han sets# Alternati?ely* the %ser can also chan)e operators (hile retainin) the han set si'ply &y chan)in) the SIM# So'e operators (ill &loc, this &y allo(in) the phone to %se only a sin)le SIM* or only a SIM iss%e &y the'N this practice is ,no(n as SIM loc,in)* an is ille)al in so'e co%ntries#

5.7 GSM 4&:#+$,5


GSM (as esi)ne esi)ne (ith a 'o erate le?el of sec%rity# The syste' (as ,ey an challen)eB the &ase station can &e

to a%thenticate the s%&scri&er %sin) a preBshare

response# Co''%nications &et(een the s%&scri&er an

encrypte # The e?elop'ent of UMTS intro %ces an optional USIM* that %ses a lon)er a%thentication ,ey to )i?e )reater sec%rity* as (ell as '%t%ally a%thenticatin) the net(or, an the %ser B (hereas GSM only a%thenticates the %ser to the net(or, >an not ?ice ?ersa@# The sec%rity 'o el therefore offers confi entiality an A8.1 strea' a%thentication* &%t li'ite a%thoriDation capa&ilities* an no nonBrep% iation# GSM %ses se?eral crypto)raphic al)orith's for sec%rity# The A8.1 an ciphers are %se for ens%rin) o?erBtheBair ?oice pri?acy# A8.1 (as e?elope first an is a stron)er al)orith' %se (ithin E%rope an the Unite StatesN A8.1 is (ea,er

81

an %se in other co%ntries# Serio%s (ea,nesses ha?e &een fo%n in &oth al)orith's/ it is possi&le to &rea, A8.1 in realBti'e (ith a cipher te0tBonly attac,* an in 4e&r%ary 1663* 9ico Co'p%tin)* Inc re?eale its a&ility an plans to co''ercialiDe 49GAs that allo( A8.1 to &e &ro,en (ith a rain&o( ta&le attac, `1a# The syste' s%pports '%ltiple al)orith's so operators 'ay replace that cipher (ith a stron)er one#

5.C GSM M/%&(4 ')% M/%#-&4


A GSM 'o e' is a (ireless 'o e' that (or,s (ith a GSM (ireless net(or,# A (ireless 'o e' &eha?es li,e a ialB%p 'o e'# The 'ain ifference &et(een the' is that a ialB%p 'o e' sen s an recei?es ata thro%)h a fi0e telephone line (hile a (ireless 'o e' sen s an recei?es ata thro%)h ra io (a?es# A GSM 'o e' can &e an e0ternal e?ice or a 9C Car . 9CMCIA Car # Typically* an e0ternal GSM 'o e' is connecte to a co'p%ter thro%)h a serial ca&le or a US5 ca&le# A GSM 'o e' in the for' of a 9C Car . 9CMCIA Car is esi)ne for %se (ith a laptop co'p%ter# It sho%l &e inserte into one of the 9C Car . 9CMCIA Car slots of a laptop co'p%ter# Li,e a GSM 'o&ile phone* a GSM 'o e' re-%ires a SIM car fro' a (ireless carrier#

5.6 S$("00 GSM M/%#-& HGSM 9 GPRSB SIM"00J


5.6.1 D&,'$-&% M/%&( D&4:+$*,$/)B The Si'266 is a TriB5ran GSM G9RS sol%tion in a co'pact pl%)Bin 'o %le# 4eat%rin) an in %stryBstan ar interface* the si'266 eli?ers GSM G9RS A66 1366 1A66MED perfor'ance for ?oice* SMS* Data* an 4a0 in a s'all for' factor an (ith lo( po(er cons%'ption# The lea in) feat%res of Si'266 'a,e it i eal for ?irt%ally %nli'ite application* s%ch as CLL applications >4i0e Cell%lar Ter'inal@* M1M application* han hel e?ices an '%ch 'ore# 1@ Si'266 is a TriB&an GSM G9RS 'o %le (ith a siDe of 7602201# 38'' 1@ C%sto'iDe MMI an ,eypa LCD s%pport 2@ An e'&e e 9o(erf%l TC9 I9 protocol stac,

81

7@ 5ase %pon 'at%re an fiel Bpro?en platfor'* &ac,e %p &y o%r s%pport ser?ice* fro' efinition to esi)n an pro %ction#

5.10 C/):-#4$/)
GSM is a cell%lar net(or,* (hich 'eans that 'o&ile phones connect to it &y searchin) for cells in the i''e iate ?icinity# Architect%re* S(itchin) syste' an classification are isc%sse #

CHAPTER - 6 AIG=EE
82

6.1 I),+/%#:,$/)
The na'e O<i)5eeO is eri?e fro' the erratic Di))in) patterns 'any &ees 'a,e &et(een flo(ers (hen collectin) pollen# This is e?ocati?e of the in?isi&le (e&s of connections e0istin) in a f%lly (ireless en?iron'ent# The stan ar re)%late (orl (i e# Chile 5l%etooth foc%ses on connecti?ity &et(een lar)e pac,et %ser e?ices* s%ch as laptops* phones* an 'ajor peripherals* <i)5ee is esi)ne to pro?i e hi)hly efficient connecti?ity &et(een s'all pac,et e?ices# As a res%lt of its si'plifie operations* (hich are one to t(o f%ll or ers of 'a)nit% e less e?ice* pricin) for <i)5ee e?ices is co'ple0 than a co'para&le 5l%etooth 5l%etooth no e# <i)5ee e?ices are acti?ely li'ite to a thro%)hBrate of 186+&ps* operatin) on the 1#7 GED ISM &an * (hich is a?aila&le thro%)ho%t 'ost of the (orl # <i)5ee has &een e?elope to 'eet the )ro(in) e'an for capa&le itself is &y a )ro%p ,no(n as the <i)5ee Alliance, (ith o?er 186 'e'&ers

e0tre'ely co'petiti?e* (ith f%ll no es a?aila&le for a fraction of the cost of a

(ireless net(or,in) &et(een n%'ero%s lo(Bpo(er e?ices# In in %stry <i)5ee is &ein) %se for ne0t )eneration a%to'ate 'an%fact%rin)* (ith s'all trans'itters in e?ery e?ice on the floor* allo(in) for co''%nication &et(een e?ices to a central co'p%ter# This ne( le?el of co''%nication per'its finelyBt%ne re'ote 'onitorin) an 'anip%lation# In the cons%'er 'ar,et <i)5ee is &ein) e0plore for e?erythin) fro' lin,in) lo(Bpo(er ho%sehol e?ices s%ch as s'o,e alar's to a central ho%sin) control %nit* to centraliDe li)ht controls# The specifie 'a0i'%' ran)e of operation for <i)5ee e?ices is 186 feet >;:'@* s%&stantially f%rther than that %se &y 5l%etooth capa&le e?ices* altho%)h sec%rity concerns raise o?er Osnipin)O 5l%etooth e?ices re'otely* 'ay pro?e to hol tr%e for <i)5ee e?ices as (ell#

87

D%e to its lo( po(er o%tp%t* <i)5ee e?ices can s%stain the'sel?es on a s'all &attery for 'any 'onths* or e?en years* 'a,in) the' i eal for installBan B for)et p%rposes* s%ch as 'ost s'all ho%sehol syste's# 9re ictions of <i)5ee installation for the f%t%re* 'ost &ase on the e0plosi?e %se of <i)5ee in a%to'ate ho%sehol tas,s in China* loo, to a near f%t%re (hen %p(ar s of si0ty <i)5ee e?ices 'ay &e fo%n in an a?era)e A'erican ho'e* all co''%nicatin) (ith one another freely an re)%latin) co''on An LRBC9AN is a si'ple* lo(Bcost co''%nication net(or, that allo(s (ireless connecti?ity in applications (ith li'ite po(er an rela0e thro%)hp%t re-%ire'ents# The 'ain o&jecti?es of an LRBC9AN are ease of installation* relia&le ata transfer* shortBran)e operation* e0tre'ely lo( cost* an a reasona&le &attery life* (hile 'aintainin) a si'ple an fle0i&le protocol# So'e of the characteristics of an LRBC9AN are as follo(s/ O?erBtheBair ata rates of 186 ,&.s* 166,&.s* 76 ,&.s* an 16 ,&.s Star or peerBtoBpeer operation Allocate 1:B&it short or :7B&it e0ten e a resses Optional allocation of )%arantee ti'e slots >GTSs@ Carrier sense '%ltiple access (ith collision a?oi ance >CSMABCA@ channel access 4%lly ac,no(le )e protocol for transfer relia&ility Lo( po(er cons%'ption Ener)y etection >ED@ Lin, -%ality in ication >LbI@ 1: channels in the 1786 MED &an * 26 channels in the A18 MED &an * an 2 channels in the 3:3 MED &an # T(o ifferent e?ice types can participate in an IEEE 361#18#7 net(or,N a f%llBf%nction e?ice >44D@ an a re %ce Bf%nction e?ice >R4D@# The 44D can operate in three 'o es ser?in) as a personal area net(or, >9AN@ coor inator* a coor inator* or a e?ice# An 44D can tal, to R4Ds or other 44Ds* (hile an R4D can 88

tal, only to an 44D# An R4D is inten e for applications that are e0tre'ely si'ple* s%ch as a li)ht s(itch or a passi?e infrare sensorN they o not ha?e the nee to sen lar)e a'o%nts of capacity# ata an 'ay only associate (ith a sin)le 44D at a ti'e# Conse-%ently* the R4D can &e i'ple'ente %sin) 'ini'al reso%rces an 'e'ory

6.! N&,2/+8 ,/*/-/3$&4


Depen in) on the application re-%ire'ents* an IEEE 361#18#7 LRBC9AN 'ay operate in either of t(o topolo)ies/ the star topolo)y or the peerBtoBpeer topolo)y# 5oth are sho(n in 4i)%re 0# In the star topolo)y the co''%nication is esta&lishe &et(een e?ices an a sin)le central controller* calle the 9AN coor inator# A e?ice typically has so'e associate application an is either the initiation point or the ter'ination point for net(or, co''%nications# A 9AN coor inator 'ay also ha?e a specific application* &%t it can &e %se to initiate* ter'inate* or ro%te co''%nication aro%n the net(or,# The 9AN coor inator is the pri'ary controller of the 9AN# All e?ices operatin) on a net(or, of either topolo)y shall ha?e %ni-%e :7B &it a resses# This a ress 'ay &e %se for irect co''%nication (ithin the 9AN* or a short a ress 'ay &e allocate &y the 9AN coor inator (hen the e?ice associates an %se instea # The 9AN coor inator 'i)ht often &e 'ains po(ere * (hile the e?ices (ill 'ost li,ely &e &attery po(ere # Applications that &enefit fro' a star topolo)y incl% e ho'e a%to'ation* personal co'p%ter >9C@ peripherals* toys an )a'es* an personal health care#

8:

4i)%re :#1/ star an peer to peer Topolo)ies The peerBtoBpeer topolo)y also has a 9AN coor inatorN ho(e?er* it iffers fro' the star topolo)y in that any e?ice 'ay co''%nicate (ith any other e?ice as lon) as they are in ran)e of one another# 9eerBtoBpeer topolo)y allo(s 'ore co'ple0 net(or, for'ations to &e i'ple'ente * s%ch as 'esh net(or,in) topolo)y# Applications s%ch as in %strial control an 'onitorin)* (ireless sensor net(or,s* asset an in?entory trac,in)* intelli)ent a)ric%lt%re* an sec%rity (o%l &enefit fro' s%ch a net(or, topolo)y# A peerBtoBpeer net(or, can &e a hoc* selfBor)aniDin)* an selfBhealin)# It 'ay also allo( '%ltiple hops to ro%te 'essa)es fro' any e?ice to any other e?ice on the net(or,# S%ch f%nctions can &e a e at the hi)her layer* &%t are not part of this stan ar # Each in epen ent 9AN selects a %ni-%e i entifier# This 9AN i entifier allo(s co''%nication &et(een e?ices (ithin a net(or, %sin) short a resses an ena&les trans'issions &et(een e?ices across in epen ent net(or,s#

6." A+:0$,&:,#+&
The IEEE 361#18#7 architect%re is efine in ter's of a n%'&er of &loc,s in or er to si'plify the stan ar # These &loc,s are calle layers# Each layer is responsi&le for one part of the stan ar an offers ser?ices to the hi)her layers# The layo%t of the &loc,s is &ase on the open syste's interconnection >OSI@ se?enBlayer 'o el# The interfaces &et(een the layers ser?e to efine the lo)ical lin,s that are escri&e in this stan ar # An LRBC9AN e?ice co'prises a 9ER* (hich contains

8;

the ra io fre-%ency >R4@ transcei?er alon) (ith its lo(Ble?el control 'echanis'* an a MAC s%&Blayer that pro?i es access to the physical channel for all types of transfer# 4i)%re :#1 sho(s these &loc,s in a )raphical representation

4i)%re :#1/ A$3=&& 4,':8 '+:0$,&:,#+& The %pper layers* sho(n in 4i)%re y* consist of a net(or, layer* (hich pro?i es net(or, confi)%ration* 'anip%lation* an 'essa)e ro%tin)* an an application layer* (hich pro?i es the inten e f%nction of the e?ice# 6.".1 P054$:'- -'5&+ HPHYJB The 9ER pro?i es t(o ser?ices/ the 9ER ata ser?ice an the 9ER ata ser?ice eacti?ation

'ana)e'ent ser?ice interfacin) to the physical layer 'ana)e'ent entity >9LME@ ser?ice access point >SA9@ >,no(n as the 9LMEBSA9@# The 9ER the physical ra io channel# The feat%res of the 9ER are acti?ation an ena&les the trans'ission an reception of 9ER protocol ata %nits >99DUs@ across

83

of the ra io transcei?er* ED* LbI* channel selection* clear channel assess'ent >CCA@* an trans'ittin) as (ell as recei?in) pac,ets across the physical 'e i%'# The ra io operates at one or 'ore of the follo(in) %nlicense &an s/ 3:3G3:3#: MED >e#)#* E%rope@ A61GA13 MED >e#)#* North A'erica@ 1766G1732#8 MED >(orl (i e@

6.".! MAC 4#< -'5&+B The MAC s%& layer pro?i es t(o ser?ices/ the MAC ata ser?ice an the MAC 'ana)e'ent ser?ice interfacin) to the MAC s%& layer 'ana)e'ent entity >MLME@ ser?ice access point >SA9@ >,no(n as MLMEBSA9@# The MAC across the 9ER fra'e ata ser?ice ena&les the trans'ission an reception of MAC protocol ata %nits >M9DUs@ ata ser?ice# The feat%res of the MAC s%& layer are &eacon isassociation# In a ition* the MAC s%& layer 'ana)e'ent* channel access* GTS 'ana)e'ent* fra'e ?ali ation* ac,no(le )e eli?ery* association* an pro?i es hoo,s for i'ple'entin) applicationBappropriate sec%rity 'echanis's#

4i)%re :#2/ MAC S%&layer

8A

6.".!.1 D',' F+'(&B The ata fra'e pro?i es a payloa of %p to 167 &ytes# The fra'e is n%'&ere to ens%re that all pac,ets are trac,e # A fra'eBchec, se-%ence ens%res that pac,ets are recei?e con itions# 6.".!.! A:8)/2-&%3(&), HACKJ .+'(&B Another i'portant str%ct%re for 361#18#7 is the ac,no(le )'ent >AC+@ fra'e# It pro?i es fee &ac, fro' the recei?er to the sen er confir'in) that the pac,et (as recei?e (itho%t error# The e?ice ta,es a ?anta)e of specifie O-%iet ti'eO &et(een fra'es to sen trans'ission# 6.".!." MAC :/((')% .+'(&B A MAC co''an fra'e pro?i es the 'echanis' for re'ote control an confi)%ration of client no es# A centraliDe net(or, 'ana)er %ses MAC to confi)%re in i?i %al clientsF co''an fra'es no 'atter ho( lar)e the net(or,# 6.".!. =&':/) .+'(&B 4inally* the &eacon fra'e (a,es %p client e?ices* (hich listen for their a ress an )o &ac, to sleep if they onFt recei?e it# 5eacons are i'portant for 'esh an cl%sterBtree net(or,s to ,eep all the no es synchroniDe (itho%t re-%irin) those no es to cons%'e precio%s &attery ener)y &y listenin) for lon) perio s of ti'e# a short pac,et i''e iately after the ataBpac,et (itho%t error# This fra'e str%ct%re i'pro?es relia&ility in iffic%lt

6. D',' T+')4.&+ M/%&Three types of ata transfer transactions e0ist# The first one is the ata transfer to a coor inator in (hich a e?ice trans'its the ata# The secon transaction is the ata transfer fro' a coor inator in (hich the e?ice recei?es the ata# The thir transaction is the ata transfer &et(een t(o peer e?ices# In star topolo)y* only t(o of these transactions are %se &eca%se ata 'ay &e e0chan)e only &et(een the

:6

coor inator an

e?ice# In a peerBtoBpeer topolo)y*

ata 'ay &e e0chan)e

&et(een any t(o e?ices on the net(or,N conse-%ently all three transactions 'ay &e %se in this topolo)y# The 'echanis's for each transfer type epen on (hether the net(or, s%pports the trans'ission of &eacons# A &eaconBena&le 9AN is %se in net(or,s that either re-%ire synchroniDation or s%pport for lo( latency e?ices* s%ch as 9C peripherals# If the net(or, oes not nee synchroniDation or s%pport for lo(Blatency e?ices* it can elect not to %se the &eacon for nor'al transfers# Eo(e?er* the &eacon is still re-%ire for net(or, isco?ery#

6.5 D&E$:& T5*&4


<i)&ee net(or,s %se three e?ice types/

The net(or, coor inator 'aintains o?erall net(or, ,no(le )e# ItFs the 'ost sophisticate of the three types an re-%ires the 'ost 'e'ory an co'p%tin) po(er#

The f%ll f%nction e?ice >44D) s%pports all 361#18#7 f%nctions an feat%res specifie A &y the stan ar # It can f%nction as a net(or, coor inator# itional 'e'ory an co'p%tin) po(er 'a,e it i eal for net(or, ro%ter

f%nctions or it co%l &e %se in net(or,Be )e e?ices >(here the net(or, to%ches the real (orl @#

The re %ce

f%nction

e?ice >R4D@ carries li'ite

>as specifie

&y the

stan ar @ f%nctionality to lo(er cost an co'ple0ity# ItFs )enerally fo%n in net(or,Be )e e?ices#

6.6 S&:#+$,5
Sec%rity an ata inte)rity are ,ey &enefits of the <i)5ee technolo)y# <i)5ee

le?era)es the sec%rity 'o el of the IEEE 361#18#7 MAC s%& layer (hich specifies fo%r sec%rity ser?ices/

:1

Access controlMthe e?ice 'aintains a list of tr%ste net(or,#

e?ices (ithin the encryption

Data encryption* (hich %ses sy''etric ,ey 113B&it a ?ance stan ar # 4ra'e inte)rity to protect crypto)raphic ,eys# ata fro' &ein) 'o ifie

&y parties (itho%t

Se-%ential freshness to reject

ata fra'es that ha?e &een replaye Mthe

net(or, controller co'pares the freshness ?al%e (ith the last ,no(n ?al%e fro' the e?ice an rejects it if the freshness ?al%e has not &een %p ate to a 16666666n*e( ?al%e#

6.7 C/):-#4$/)
<i)&ee (ith its lon) &attery life* lo(Bcost * (ireless ran)e %p to ;6' in oors an 766' o%t oors (ith f%ll control of trans'itte o%tp%t po(er ha?e net(or,in) fle0i&ility to co?er entire ca'p%ses an s%pports '%ltiple net(or, topolo)ies enco%ntere in ho'e an professional settin)s#

:1

CHAPTER - 7 MAI!"! HV/-,'3& C/)E&+,&+J


7.1 I),+/%#:,$/)B
Since the RS121 is not co'pati&le (ith to ays 'icroprocessors an 'icro controller* (e nee line ri?er to con?ert the RS121 si)nals to TTL ?olta)e le?els that (ill &e accepta&le to the 3681Ss T=D an R=D pins# One e0a'ple of s%ch a con?erter is MA= 121 fro' 'a0i' corp# The MA= 121 con?erts fro' RS121 ?olta)e le?els to TTL ?olta)e le?els* an ?ice ?ersa# One a ?anta)e of MA=121 chip is that it %ses a P8H po(er so%rce* (hich is the sa'e as the so%rce ?olta)e for the 9IC 1:f3;;A 'icro controller# In other (or s* (ith a sin)le P8? po(er s%pply (e can po(er &oth the 9IC an MA= 121* (ith no nee of for the %al po(er s%pplies that are co''on in 'any ol er syste's# The MA= 121 re-%ires fo%r capacitors ran)in) fro' 1 to 11 'icrofara # The 'ost (i ely %se ?al%e for this capacitor is 11'icrofara # PIN DIAGRAM OF MAI!"!B

4i)%re ;#1/ pin ia)ra' of MA=121

:2

7.! DCE ')% DTE %&E$:&4B


T(o ter's yo% sho%l &e fa'iliar (ith are DTE an DCE# DTE stan s for Data Ter'inal E-%ip'ent* an DCE stan s for Data Co''%nication E-%ip'ent# These ter's are %se to in icate the pinBo%t for the connectors on a e?ice an the irection of the si)nals on the pins# Ro%r co'p%ter is a DTE e?ice* (hile 'ost other e?ices are %s%ally DCE e?ices# If yo% ha?e tro%&le ,eepin) the t(o strai)ht then replace the ter' "DTE e?ice$ (ith yo%r 9C an the ter' DCE e?ice (ith "re'ote De?ice$ in the follo(in) isc%ssion# The RSB121 stan ar states that DTE e?ices %se a 18Bpin 'ale connector* an DCE e?ices %se a 18Bpin fe'ale connector# Ro% can therefore connect a DTE e?ice to a DCE %sin) a strai)ht pinB forBpin connection# Eo(e?er* to connect t(o li,e e?ices* yo% '%st instea %se a n%ll 'o e' ca&le# N%ll 'o e' ca&les cross the trans'it an recei?e lines in the ca&le# The DTE e?ice p%ts this line in a 'ar, con ition to tell the re'ote e?ice that it is rea y an a&le to recei?e ata# If the DTE e?ice is not a&le to recei?e ata >typically &eca%se its recei?e &%ffer is al'ost f%ll@* it (ill p%t this line in the space con ition as a si)nal to the DCE to stop sen in) ata# Chen the DTE e?ice is rea y to recei?e 'ore ata it (ill place this line &ac, in the 'ar, con ition# The co'ple'ent of the RTS (ire is CTS* (hich stan s for Clear to Sen # The DCE e?ice p%ts this line in a 'ar, con ition to tell the DTE e?ice that it is rea y to recei?e the ata# Li,e(ise* if the DCE e?ice is %na&le to recei?e ata* it (ill place this line in the space con ition# To)ether* these t(o lines 'a,e %p (hat is calle RTS.CTS or "har (are$ flo( control# The soft(are (e )e s%pports this type of flo( control as (ell as =on.=off or "soft(are$ flo( control# Soft(are flo( control %ses special control characters trans'itte fro' one e?ice to another to tell the other e?ice to stop or start sen in) ata# Cith soft(are flo( control the RTS an CTS lines are not %se # DTR stan s for Data Ter'inal Rea y# Its inten e f%nction is ?ery si'ilar to the RTS line# DSR >Data Set Rea y@ is the co'panion to DTR in the sa'e (ay that

:7

CTS is to RTS# So'e serial e?ices %se DTR an DSR as si)nals to si'plify confir' that a e?ice is connecte an t%rne on# The soft(are (e )e sets DTR to the 'ar, state (hen the serial port is opene an lea?es it in that state %ntil the port is close # The DTR an DSR lines (ere ori)inally esi)ne to pro?i e an alternate 'etho of har (are han sha,in)# It (o%l &e pointless to %se &oth RTS.CTS an DTR.DSR for flo( control si)nals at the sa'e ti'e# 5eca%se of this DTR an DSR are rarely %se for flo( control#

7." C/):-#4$/)
MA=121 is %se for the con?ersion of ?olta)e si)nals fro' TTL to CMOS lo)ic an ?ice ?ersa#

:8

CHAPTER G C POWER SUPPLY UNIT


C.1 I),+/%#:,$/)
4i)%re 3#1 sho(s the circ%it transfor'er# ia)ra' of po(er s%pply %nit a step o(n

4i)%re 3#1/ circ%it ia)ra' of po(er s%pply %nit 9o(er s%pply %nit consists of follo(in) %nits/ i@ Step o(n transfor'er ii@ Rectifier %nit iii@ Inp%t filter i?@#Re)%lator %nit ?@ O%tp%t filter

C.! S,&* %/2) T+')4./+(&+


The Step o(n Transfor'er is %se to step o(n the 'ain s%pply ?olta)e fro' 126H AC to lo(er ?al%e# This 126 AC ?olta)e cannot &e %se irectly* th%s it is steppe o(n# The Transfor'er consists of pri'ary an secon ary coils# To re %ce or step o(n the ?olta)e* the transfor'er is esi)ne to contain less n%'&er of t%rns in its secon ary ::

core# The o%tp%t fro' the secon ary coil is also AC (a?efor'# Th%s the con?ersion fro' AC to DC is essential# This con?ersion is achie?e &y %sin) the Rectifier Circ%it.Unit# Step o(n transfor'ers can step o(n inco'in) ?olta)e* (hich ena&les yo% to ha?e the correct ?olta)e inp%t for yo%r electrical nee s# 4or e0a'ple* if o%r e-%ip'ent has &een specifie for inp%t ?olta)e of 11 ?olts* an the 'ain po(er s%pply is 126 ?olts* (e (ill nee a step o(n transfor'er* (hich ecreases the inco'in) electrical ?olta)e to &e co'pati&le (ith yo%r 11 ?olt e-%ip'ent#

C." R&:,$.$&+ U)$,


The Rectifier circ%it is %se to con?ert the AC ?olta)e into its correspon in) DC ?olta)e# The 'ost i'portant an si'ple e?ice %se in Rectifier circ%it is the io e# The si'ple f%nction of the io e is to con %ct (hen for(ar &iase an not to con %ct in re?erse &ias# No( (e are %sin) three types of rectifiers# They are 1# 1# 2# EalfB(a?e rectifier 4%llB(a?e rectifier 5ri )e rectifier

C.".1 H'-.-2'E& +&:,$.$&+B In half (a?e rectification* either the positi?e or ne)ati?e half of the AC (a?e is passe * (hile the other half is &loc,e # 5eca%se only one half of the inp%t (a?efor' reaches the o%tp%t* it is ?ery inefficient if %se s%pply# C.".! F#---2'E& +&:,$.$&+B A f%llB(a?e rectifier con?erts the (hole of the inp%t (a?efor' to one of constant polarity >positi?e or ne)ati?e@ at its o%tp%t# 4%llB(a?e rectification con?erts &oth polarities of the inp%t (a?efor' to DC > irect c%rrent@* an is 'ore efficient# Eo(e?er* in a circ%it (ith a nonBcenter tappe transfor'er* fo%r io es are re-%ire instea of the one nee e for halfB(a?e rectification# A f%llB(a?e rectifier %ses a io e &ri )e* 'a e of fo%r io es* li,e this/ :; for po(er transfer# EalfB(a?e rectification can &e achie?e (ith a sin)le io e in a one phase s%pply* or (ith three io es in a threeBphase

4i)%re 3#1/ 4%ll (a?e Rectifier

C."." =+$%3& +&:,$.$&+B A &ri )e rectifier 'a,es %se of fo%r io es in a &ri )e arran)e'ent to achie?e f%llB(a?e rectification# This is a (i ely %se confi)%ration* &oth (ith in i?i %al io es (ire as sho(n an (ith sin)le co'ponent &ri )es (here the io e &ri )e is (ire internally#

4i)%re 3#2 5ri )e Rectifier A io e &ri )e or &ri )e rectifier is an arran)e'ent of fo%r io es in a &ri )e

confi)%ration that pro?i es the sa'e polarity of o%tp%t ?olta)e for either polarity of inp%t ?olta)e# Chen %se in its 'ost co''on application* for con?ersion of alternatin) c%rrent >AC@ inp%t into irect c%rrent >DC@ o%tp%t* it is ,no(n as a &ri )e rectifier# A &ri )e

:3

rectifier pro?i es f%llB(a?e rectification fro' a t(oB(ire AC inp%t* res%ltin) in lo(er cost an (ei)ht as co'pare to a centerBtappe transfor'er esi)n# The 4or(ar 5ias is achie?e &y connectin) the io eSs positi?e (ith positi?e of the &attery an ne)ati?e (ith &atterySs ne)ati?e# The efficient circ%it %se is the 4%ll (a?e 5ri )e rectifier circ%it# The o%tp%t ?olta)e of the rectifier is in ripple for'* the ripples fro' the o&taine DC ?olta)e are re'o?e %sin) other circ%its a?aila&le# The circ%it %se for re'o?in) the ripples is calle 4ilter circ%it#

C. I)*#, .$-,&+
Capacitors are %se as filter# The ripples fro' the DC ?olta)e are re'o?e an p%re DC ?olta)e is o&taine # An also these capacitors are %se to re %ce the har'onics of the inp%t ?olta)e# The pri'ary action perfor'e ne)ati?e half cycle# So it allo(s only AC ?olta)e an There are t(o types of filters# They are 1# Lo( pass filter 1# Ei)h pass filter C. .1 L/2 *'44 .$-,&+B One si'ple electrical circ%it that (ill ser?e as a lo(Bpass filter consists of a resistor in series (ith a loa * an a capacitor in parallel (ith the loa # The capacitor e0hi&its reactance* an &loc,s lo(Bfre-%ency si)nals* ca%sin) the' to )o thro%)h the loa instea # At hi)her fre-%encies the reactance rops* an the capacitor effecti?ely f%nctions as a short circ%it# The co'&ination of resistance an capacitance )i?es yo% the ti'e constant of the filter c [ RC >represente &y the Gree, letter ta%@# The &rea, fre-%ency* also calle the t%rno?er fre-%ency or c%toff fre-%ency >in hertD@* is eter'ine &y the ti'e constant/ or e-%i?alently >in ra ians per secon @/ :A &y capacitor is char)in) an ischar)in)# It char)es in positi?e half cycle of the AC ?olta)e an it (ill ischar)e in oes not allo( the DC ?olta)e# This filter is fi0e &efore the re)%lator# Th%s the o%tp%t is free fro' ripples#

One (ay to %n erstan this circ%it is to foc%s on the ti'e the capacitor ta,es to char)e# It ta,es ti'e to char)e or ischar)e the capacitor thro%)h that resistor/ At lo( fre-%encies* there is plenty of ti'e for the capacitor to char)e %p to practically the sa'e ?olta)e as the inp%t ?olta)e# At hi)h fre-%encies* the capacitor only has ti'e to char)e %p a s'all a'o%nt &efore the inp%t s(itches irection# The o%tp%t )oes %p an fraction of the a'o%nt the inp%t )oes %p an thereFs only ti'e for it to char)e %p half the a'o%nt Another (ay to %n erstan this circ%it is (ith the i ea of reactance at a partic%lar fre-%ency/ Since DC cannot flo( thro%)h the capacitor* DC inp%t '%st Oflo( o%tO the path 'ar,e Vo%t >analo)o%s to re'o?in) the capacitor@# Since AC flo(s ?ery (ell thro%)h the capacitor M al'ost as (ell as it flo(s thro%)h soli (ire M AC inp%t Oflo(s o%tO thro%)h the capacitor* effecti?ely short circ%itin) to )ro%n >analo)o%s to replacin) the capacitor (ith j%st a (ire@# It sho%l &e note that the capacitor is not an Oon.offO o&ject >li,e the &loc, or pass fl%i ic e0planation a&o?e@# The capacitor (ill ?aria&ly act &et(een these t(o e0tre'es# It is the 5o e plot an fre-%ency response that sho( this ?aria&ility# C. .! H$30 *'44 .$-,&+B The a&o?e circ%it ia)ra' ill%strates a si'ple 'RC' hi)hBpass filter# (e sho%l fin that the circ%it passes Fhi)hF fre-%encies fairly (ell* &%t atten%ates Flo(F fre-%encies# Eence it is %sef%l as a filter to &loc, any %n(ante lo( fre-%ency co'ponents of a co'ple0 si)nal (hilst passin) hi)her fre-%encies# Circ%its li,e this are %se -%ite a lot in electronics as a FD#C# 5loc,F B i#e# to pass a#c# si)nals &%t pre?ent any D#C# ?olta)es fro' )ettin) thro%)h# o(n only a s'all o(n# At o%&le the fre-%ency*

;6

The &asic -%antities (hich escri&e this circ%it are si'ilar to those %se for the Lo( 9ass 4ilter# In effect* this circ%it is j%st a si'ple lo(Bpass filter (ith the co'ponents s(appe o?er# As (ith the lo(Bpass filter* the circ%itFs &eha?ior (e can &e %n erstoo as arisin) %e to the ti'e ta,en to chan)e the capacitorFs char)e (hen (e alter the applie inp%t ?olta)e# It al(ays ta,es a finite >i#e# nonBDero@ ti'e to chan)e the a'o%nt of char)e store &y the capacitor# Eence it ta,es ti'e to chan)e the potential ifference across the capacitor# As a res%lt* any s% en chan)e in the inp%t ?olta)e pro %ces a si'ilar s% en chan)e on the other si e of the capacitor# This pro %ces a ?olta)e across the resistor an ca%ses a c%rrent to flo( thoro%)h it* char)in) the capacitor %ntil all the ?olta)e falls across it instea of the resistor#

C.5 R&3#-',/+ U)$,

4i)%re 3#7/ ;368 Re)%lator Re)%lator re)%lates the o%tp%t ?olta)e to &e al(ays constant# The o%tp%t ?olta)e is 'aintaine irrespecti?e of the fl%ct%ations in the inp%t AC ?olta)e# As an then the AC ?olta)e chan)es* the DC ?olta)e also chan)es# Th%s to a?oi this Re)%lators are %se # Also (hen the internal resistance of the po(er s%pply is )reater than 26 oh's* the o%tp%t )ets affecte # Th%s this can &e s%ccessf%lly re %ce here# The re)%lators are 'ainly classifie for lo( ?olta)e an for hi)h ?olta)e# 4%rther they can also &e classifie as/ i@ 9ositi?e re)%lator 1BBB^ inp%t pin 1BBB^ )ro%n pin 2BBB^ o%tp%t pin It re)%lates the positi?e ?olta)e#

;1

ii@ Ne)ati?e re)%lator 1BBB^ )ro%n pin 1BBB^ inp%t pin 2BBB^ o%tp%t pin It re)%lates the ne)ati?e ?olta)e#

C.6 F$;&% R&3#-',/+4

4i)%re 3#8/ An assort'ent of ;300 series ICs O4i0e O threeBter'inal linear re)%lators are co''only a?aila&le to )enerate fi0e ?olta)es of pl%s 2 H* an pl%s or 'in%s 8 H* A H* 11 H* or 18 H (hen the loa is less than a&o%t ; a'peres#

C.7 7C05 V/-,'3& R&3#-',/+


The ;368 pro?i es circ%it esi)ners (ith an easy (ay to re)%late DC ?olta)es to 8?# Encaps%late in a sin)le chip.pac,a)e >IC@* the ;368 is a positi?e ?olta)e DC re)%lator that has only 2 ter'inals# They are/ Inp%t ?olta)e* Gro%n * O%tp%t Holta)e#

C.7.1 G&)&+'- F&',#+&4B


O%tp%t C%rrent %p to 1A O%tp%t Holta)es of 8* :* 3* A* 16* 11* 18* 13* 17H Ther'al O?erloa 9rotection Short Circ%it 9rotection

;1

O%tp%t Transistor Safe Operatin) Area 9rotection

C.C 7C1! 1!V I),&3+',&% C$+:#$,"-T&+($)'- P/4$,$E& V/-,'3& R&3#-',/+

The ;311 fi0e ?olta)e re)%lator is a 'onolithic inte)rate circ%it in a TO116 type pac,a)e esi)ne for %se in a (i e ?ariety of applications incl% in) local* on&oar re)%lation# This re)%lator e'ploys internal c%rrent li'itin)* ther'al sh%t o(n* an safe area co'pensation#

Cith a e-%ate heatBsin,in) it can eli?er o%tp%t c%rrents in e0cess of 1#6 a'pere# Altho%)h esi)ne pri'arily as a fi0e ?olta)e re)%lator* this e?ice can &e %se (ith e0ternal co'ponents to o&tain a j%sta&le ?olta)es an c%rrents#

C.6 O#,*#, .$-,&+


The 4ilter circ%it is often fi0e after the Re)%lator circ%it# Capacitor is 'ost often %se as filter# The principle of the capacitor is to char)e an the positi?e half cycle of the AC ?olta)e an it allo(s only AC ?olta)e an Eere (e %se ischar)e# It char)es %rin) ischar)es %rin) the ne)ati?e half cycle# So

oes not allo( the DC ?olta)e# This filter is fi0e after the is )i?en to the

Re)%lator circ%it to filter any of the possi&ly fo%n ripples in the o%tp%t recei?e finally# 6#1I4 capacitor# The o%tp%t at this sta)e is 8H an Microcontroller# The o%tp%t ?olta)e o?ershoots (hen the loa is re'o?e or a short clears# Chen the loa is re'o?in) fro' a s(itchin) 'o e po(er s%pply (ith a LC lo(B pass o%tp%t filter* the only thin) the control loop can o is stop the s(itchin) action so no 'ore ener)y is ta,en fro' the so%rce# The ener)y that is store in the o%tp%t filter in %ctor is %'pe into the o%tp%t capacitor ca%sin) a ?olta)e o?ershoot# The 'a)nit% e of the o?ershoot is the ?ector s%' of t(o ortho)onal ?olta)es* the o%tp%t ?olta)e &efore the loa is re'o?e an the c%rrent thro%)h the in %ctor ti'es the characteristic i'pe ance of the o%tp%t filter* <o [ >L.C@d1.1# This can &e eri?e fro' conser?ation of ener)y consi erations# ;2

The initial ener)y* Ei* is/ Ei [ 1.1e>LeIid1 P CeHid1@ The final ener)y* Ef* is/ Ef [ 1.1e>LeIfd1 [ CeHfd1@ The t(o ener)ies are e-%al (hen the loa is re'o?e * since the loa is no lon)er ta,in) ener)y fro' the syste'# E-%atin) the t(o ener)ies* s%&stit%tin) Dero c%rrent for the final in %ctor c%rrent* then the sol%tion for the final ?olta)e Hf is/ Hf [ >Hid1 P >Iie<o@d1@d1.1 This is the ortho)onal ?ector s%' of the o%tp%t ?olta)e an the loa c%rrent ti'es the characteristic i'pe ance an is ill%strate in 4i)%re 1#

4i)%re 3#:/ O?ershoot Holta)e as Hector S%' The pro&le' &eco'es (orse if the c%rrent in the in %ctor is esta&lishe &y a short circ%it on the o%tp%t an the short circ%it clears# In this case* the initial ?olta)e is Dero >short circ%it@ an the o?ershoot is Ie<o* (here I can &e ?ery lar)e* res%ltin) in a r%ino%s o?ershoot#

C.10 C/):-#4$/)
`

5y %sin) the step o(n transfor'er an the ?olta)e re)%lators the re-%ire

po(er is s%pplie to the 9IC 'icrocontroller* Di)&ee 'o %le an the GSM 'o e'

;7

CHAPTER - 6 LCD
6.1 I),+/%#:,$/)
A 101: LCD is %se for the isplay of the ?al%es sense &y the press%re* te'perat%re an heart &eat sensors fro' the 'icrocontroller#

6.! LCD D$4*-'5


Li-%i crystal isplay >LCD@ has 'aterial (hich co'&ines the properties of &oth li-%i an crystals# They ha?e a te'perat%re ran)e (ithin (hich the 'olec%les are al'ost as 'o&ile as they (o%l &e in a li-%i * &%t are )ro%pe to)ether in an or er for' si'ilar to a crystal#

4i)%re A#1 LCD Display More 'icrocontroller e?ices are %sin) Fs'art LCDF isplays to o%tp%t ?is%al infor'ation# The follo(in) isc%ssion co?ers the connection of a Eitachi LCD esi)ne aro%n EitachiFs LCD isplay to a 9IC 'icrocontroller# LCD isplays

ED77;36 'o %le* are ine0pensi?e* easy to %se* an it is e?en possi&le to pro %ce a rea o%t %sin) the 3 0 36 pi0els of the isplay# Eitachi LCD isplays ha?e a stan ar ASCII set of characters pl%s Qapanese* Gree, an 'athe'atical sy'&ols# 4or an 3B&it ata &%s* the isplay re-%ires a P8H s%pply pl%s 11 I.O lines# 4or a 7B&it ata &%s it only re-%ires the s%pply lines pl%s se?en e0tra lines# Chen the ;8

LCD isplay is not ena&le * ata lines are triBstate (hich 'eans they are in a state of hi)h i'pe ance >as tho%)h they are isconnecte @ an this 'eans they o not interfere (ith the operation of the 'icrocontroller (hen the isplay is not &ein) a resse #

6." C/),+/- L$)&4


The LCD also re-%ires 2 OcontrolO lines fro' the 'icrocontroller# E)'<-& HEJ This line allo(s access to the isplay thro%)h R.C an RS lines# Chen this line is lo(* the LCD is isa&le an i)nores si)nals fro' R.C an RS# Chen >E@ line is hi)h* the LCD chec,s the state of the R&'%9W+$,& HR9WJ R&3$4,&+ 4&-&:, HRSJ t(o control lines an respon s accor in)ly# This line eter'ines the irection of ata &et(een the LCD an 'icrocontroller# Chen it is lo(* ata is (ritten to the LCD# Chen it is hi)h* ata is rea fro' the LCD# Cith the help of this line* the LCD interprets the type of ata on ata lines# Chen it is lo(* an instr%ction is &ein) (ritten to the LCD# Chen it is hi)h* a character is &ein) (ritten to the LCD#

Lo)ic stat%s on control lines/ E 6 Access to LCD isa&le 1 Access to LCD ena&le R.C 6 Critin) ata to LCD 1 Rea in) ata fro' LCD RS 6 Instr%ction 1 Character Critin) ata to the LCD is one in se?eral steps/ Set R.C &it to lo( Set RS &it to lo)ic 6 or 1 >instr%ction or character@ Set ata to ata lines >if it is (ritin)@

;:

Set E line to hi)h #Set E line to lo( Rea ata fro' ata lines >if it is rea in)@# Rea in) ata fro' the LCD is one in the sa'e (ay* &%t control line R.C has to &e hi)h# Chen (e sen a hi)h to the LCD* it (ill reset an (ait for instr%ctions# Typical instr%ctions sent to LCD isplay after a reset are/ t%rnin) on a isplay* t%rnin) on a c%rsor an (ritin) characters fro' left to ri)ht# Chen the LCD is initialiDe * it is rea y to contin%e recei?in) ata or instr%ctions# If it recei?es a character* it (ill (rite it on the isplay an 'o?e the c%rsor one space to the ri)ht# The C%rsor 'ar,s the ne0t location (here a character (ill &e (ritten# Chen (e (ant to (rite a strin) of characters* first (e nee to set %p the startin) a ress* an then sen one character at a ti'e# Characters that can &e sho(n on the isplay are store in ata isplay >DD@ RAM# The siDe of DDRAM is 36 &ytes#

The LCD isplay also possesses :7 &ytes of CharacterBGenerator >CG@ RAM# This 'e'ory is %se for characters efine &y the %ser# Data in CG RAM is represente as an 3B &it character &itB'ap# Each character ta,es %p 3 &ytes of CG RAM* so the total n%'&er of characters* (hich the %ser can efine* is ei)ht# In or er to rea in the character &itB'ap to the LCD isplay* (e '%st first set the CG RAM a ress to startin) point >%s%ally 6@* an then (rite ata to the isplay# The efinition of a FspecialF character is )i?en in the pict%re# 5efore (e access DD RAM after efinin) a special character* the pro)ra' '%st set the DD RAM a ress# Critin) an rea in) ata fro' any LCD 'e'ory is one fro' the last a ress (hich (as set %p %sin) setBa ress instr%ction# Once the a ress of DD RAM is set* a ne( (ritten character (ill &e isplaye at the

;;

appropriate place on the screen# Until no( (e isc%sse the operation of (ritin) an rea in) to an LCD as if it (ere an or inary 'e'ory# 5%t this is not so# The LCD controller nee s 76 to 116 'icrosecon s >%S@ for (ritin) an rea in)# Other operations can ta,e %p to 8 'S# D%rin) that ti'e* the 'icrocontroller can not access the LCD* so a pro)ra' nee s to ,no( (hen the LCD is &%sy# Ce can sol?e this in t(o (ays# One (ay is to chec, the 5USR &it fo%n on ata line D;# This is not the &est 'etho &eca%se LCDFs can )et st%c,* an pro)ra' (ill then stay fore?er in a loop chec,in) the 5USR &it# The other (ay is to intro %ce a elay in the pro)ra'# The elay has to &e lon) eno%)h for the LCD to finish the operation in process# At the &e)innin) (e 'entione that (e nee e 11 I.O lines to co''%nicate (ith an LCD# Eo(e?er* (e can co''%nicate (ith an LCD thro%)h a 7B&it ata &%s# Th%s (e can re %ce the total n%'&er of co''%nication lines to se?en# The (irin) for connection ?ia a 7B&it ata &%s is sho(n in the ia)ra' &elo(# In this e0a'ple (e %se an LCD isplay (ith 101: characters* la&ele LM1:=111 &y Qapanese 'a,er SEAR9# The 'essa)e FcharacterF is (ritten in the first ro(/ an F'i,roEle,troni,aF# t(o special characters FfF an FgF are isplaye # In the secon ro( (e ha?e pro %ce the (or

6. C/):-#4$/)
This 101: LCD is capa&le of isplayin) 21 characters at a ti'e# 1 LCD isplays are %se in the project one in the trans'itter an the other in recei?er#

;3

CHAPTER - 10 SOFTWARE REKUIREMENTS


10.1 I),+/%#:,$/)
The soft(are tools %se for the co in) in the e0peri'ent are/ M9LA5 9rotel 9ropic EIBTech 9IC C Co'piler

10.! MPLA= I),&3+',$/)


M9LA5 Inte)rate De?elop'ent En?iron'ent >IDE@ is a free* inte)rate toolset for the e?elop'ent of e'&e 'icro an e applications e'ployin) MicrochipFs 9IC s9IC 'icrocontrollers# M9LA5 IDE r%ns as a 21B&it application on MS e&%))in)# M9LA5 IDE also ser?es as a thir party

Cin o(s* is easy to %se an incl% es a host of free soft(are co'ponents for fast application e?elop'ent an s%perBchar)e sin)le* %nifie )raphical %ser interface for a itional Microchip an

soft(are an har (are e?elop'ent tools# Mo?in) &et(een tools is a snap* an %p)ra in) fro' the free si'%lator to M9LA5 ICD 1 or the M9LA5 ICE e'%lator is one in a flash &eca%se M9LA5 IDE has the sa'e %ser interface for all tools# Choose M9LA5 C13* the hi)hly opti'iDe co'piler for the 9IC13 series 'icrocontrollers* or try the ne(est MicrochipFs lan)%a)e tools co'piler* M9LA5 C26* tar)ete at the hi)h perfor'ance 9IC17 an s9IC i)ital si)nal controllers# Or* %se one of the 'any pro %cts fro' thir party lan)%a)e tools ?en ors# They inte)rate into M9LA5 IDE to f%nction transparently fro' the M9LA5 project 'ana)er* e itor an co'piler#

;A

10." I),+/%#:,$/) ,/ E(<&%%&% LCM


EIBTECE Soft(are 'a,es in %strialBstren)th soft(are processor co e# 4or o?er t(o eca es EIBTECE Soft(are has eli?ere the in %stryFs 'ost relia&le e'&e e soft(are e?elop'ent tools an co'pilers for (ritin) efficient an co'pact co e to r%n on the 'ost pop%lar e'&e e processors# Use &y tens of tho%san s of c%sto'ers incl% in) General Motors* Chirlpool* b%alco''* Qohn Deere an 'any others* EIBTECEFs relia&le e?elop'ent tools an C co'pilers* co'&ine (ith (orl Bclass s%pport ha?e helpe serio%s e'&e e soft(are pro)ra''ers to create h%n re s of &rea,thro%)h ne( sol%tions# EIBTECE 9ICC is a hi)hBperfor'ance C co'piler for the Microchip 9IC 'icro 16.11.17.1:.1; series of 'icrocontrollers# EIBTECE 9ICC is an in %strialB stren)th ANSI C co'piler B not a s%&set i'ple'entation li,e so'e other 9IC co'pilers# The 9ICC co'piler i'ple'ents f%ll ISO.ANSI C* (ith the e0ception of rec%rsion# All ata types are s%pporte incl% in) 17 an 21 &it IEEE stan ar floatin) point# EIBTECE 9ICC 'a,es f%ll %se of specific 9IC feat%res an %sin) an intelli)ent opti'iDer* can )enerate hi)hB-%ality co e easily ri?alin) han B(ritten asse'&ler# A%to'atic han lin) of pa)e an &an, selection frees the pro)ra''er fro' the tri?ial etails of asse'&ler co e# e?elop'ent tools

an C co'pilers that help soft(are e?elopers (rite co'pact* efficient e'&e e

10. E(<&%%&% C C/(*$-&+


ANSI C B f%ll feat%re an porta&le Relia&le B 'at%re* fiel Bpro?en technolo)y M%ltiple C opti'iDation le?els An opti'iDin) asse'&ler 4%ll lin,er* (ith o?erlayin) of local ?aria&les to 'ini'iDe RAM %sa)e Co'prehensi?e C li&rary (ith all so%rce co e pro?i e 36

Incl% es s%pport for 17B&it an 21B&it IEEE floatin) point an 21B&it lon) ata types

Mi0e C an asse'&ler pro)ra''in) Unli'ite n%'&er of so%rce files Listin)s sho(in) )enerate asse'&ler Co'pati&le B inte)rates into the M9LA5 IDE* M9LA5 ICD an 'ost 2r B party e?elop'ent tools

R%ns on '%ltiple platfor's/ Cin o(s* Lin%0* UNI=* Mac OS =* Solaris

10.5 E(<&%%&% D&E&-/*(&), E)E$+/)(&),


This en?iron'ent allo(s yo% to 'ana)e all of yo%r 9IC projects# Ro% can co'pile* asse'&le an lin, yo%r e'&e e application (ith a sin)le step# Optionally* the co'piler 'ay &e r%n co'piler to &e inte)rate MicrochipFs M9LA5 IDE# into thir party irectly fro' the co''an line* allo(in) yo% to co'pile* asse'&le an lin, %sin) one co''an # This ena&les the e?elop'ent en?iron'ents* s%ch as

10.6 E(<&%%&% 454,&( T//-4


10.6.1 A44&(<-&+B An asse'&ler is a co'p%ter pro)ra' for translatin) asse'&ly lan)%a)e M essentially* a 'ne'onic representation of 'achine lan)%a)e M into o&ject co e# A cross asse'&ler >see cross co'piler@ pro %ces co e for one type of processor* &%t r%ns on another# The co'p%tational step (here an asse'&ler is r%n is ,no(n as asse'&ly ti'e# Translatin) asse'&ly instr%ction 'ne'onics into opco es* asse'&lers pro?i e the a&ility to %se sy'&olic na'es for 'e'ory locations an 'acro facilities for perfor'in) te0t%al s%&stit%tion M typically %se to enco e co''on short se-%ences of instr%ctions to r%n inline instea of in a s%&ro%tine# Asse'&lers are far si'pler to (rite than co'pilers for hi)hBle?el lan)%a)es#

31

10.7 P0'4&4 /. :/(*$-&+


The co'piler has a n%'&er of phases pl%s sy'&ol ta&le 'ana)er an an error han ler# Inp%t So%rce 9ro)ra' h Le0ical AnalyDer h Synta0 AnalyDer h Sy'&ol Ta&le Mana)er Se'antic AnalyDer h Inter'e iate Co e Generator h Co e Opti'iDer h Co e Generator h O%t Tar)et 9ro)ra' Error Ean ler

10.C F'<+$:',$/) %&,'$-4


The fa&rication of one e'onstration %nit is carrie o%t in the follo(in) se-%ence#

31

4inaliDin) the total circ%it ia)ra'* listin) o%t the co'ponents an so%rces of proc%re'ent# 9roc%rin) the co'ponents* testin) the co'ponents an co'ponents# Ma,in) layo%t* repairin) the interconnection ia)ra' as per the circ%it ia)ra'# Asse'&lin) the co'ponents as per the co'ponent layo%t an circ%it ia)ra' an sol erin) co'ponents# Inte)ratin) the total %nit* inter (irin) the %nit an final testin) the %nit# screenin) the

10.6 D&4$3) /. &(<&%%&% 454,&(


Li,e e?ery other syste' e?elop'ent esi)n cycle e'&e e syste' too

ha?e a esi)n cycle# The flo( of the syste' (ill &e li,e as )i?en &elo(# 4or any esi)n cycle these (ill &e the i'ple'entation steps# 4ro' the initial state of the project to the final fa&rication the esi)n consi erations (ill &e ta,en li,e the soft(are consi eration an the har (are co'ponents* sensor* inp%t an o%tp%t# The electronics %s%ally %ses either a 'icroprocessor or a 'icrocontroller# So'e lar)e or ol syste's %se )eneralBp%rpose 'ainfra'e co'p%ters or 'inico'p%ters#

10.10 U4&+ $),&+.':&4


User interfaces for e'&e e syste's ?ary (i ely* an th%s eser?e so'e special co''ent# User interface is the %lti'ate ai' for an e'&e e 'o %le as to the %ser to chec, the o%tp%t (ith co'plete con?enience# One stan ar interface* (i ely %se in e'&e e syste's* %ses t(o &%ttons >the a&sol%te 'ini'%'@ to control a 'en% syste' >j%st to &e clear* one &%tton sho%l &e One0t 'en% entryO the other &%tton sho%l &e Oselect this 'en% entryO@# Another &asic tric, is to 'ini'iDe an si'plify the type of o%tp%t# Desi)ns so'eti'es %se a stat%s li)ht for each interface pl%)* or fail%re con ition* to tell (hat faile # A cheap ?ariation is to ha?e t(o li)ht &ars (ith a printe 'atri0 of errors that they selectB the %ser can )l%e on the la&els for the lan)%a)e that he spea,s# 4or e0a'ple* 'ost s'all co'p%ter printers %se li)hts la&ele (ith stic,Bon la&els that

32

can &e printe in any lan)%a)e# In so'e 'ar,ets* these are eli?ere (ith se?eral sets of la&els* so c%sto'ers can pic, the 'ost co'forta&le lan)%a)e# In 'any or)aniDations* one person appro?es the %ser interface# Often this is a c%sto'er* the 'ajor istri&%tor or so'eone irectly responsi&le for sellin) the syste'#

10.11 P-',./+(
There are 'any ifferent C9U architect%res %se in e'&e H386* 4RBH* M21R etc# This in contrast to the es,top co'p%ter 'ar,et* (hich as of this (ritin) >1662@ is li'ite to j%st a fe( co'petin) architect%res* 'ainly the Intel.AMD 03:* an the Apple.Motorola.I5M 9o(er9C* %se in the Apple Macintosh# Cith the )ro(in) acceptance of Qa?a in this fiel * there is a ten ency to e?en f%rther eli'inate the epen ency on specific C9U.har (are >an OS@ re-%ire'ents# Stan ar 9C.167 is a typical &ase for s'all* lo(B?ol%'e e'&e e an e esi)ns s%ch

as ARM* MI9S* Col fire.:3,* 9o(er9C* =3:* 9IC* 3681* At'el AHR* E3* SE*

r%))e iDe syste' esi)n# These often %se DOS* Lin%0 or an e'&e e realBti'e operatin) syste' s%ch as bN= or Inferno# A co''on confi)%ration for ?eryBhi)hB?ol%'e e'&e e p%rchase as intellect%al property to a syste's is the

syste' on a chip* an applicationBspecific inte)rate circ%it* for (hich the C9U (as to the ICFs esi)n# A relate co''on sche'e is to %se a fiel Bpro)ra''a&le )ate array* an pro)ra' it (ith all the lo)ic* incl% in) the C9U# Most 'o ern 49GAs are esi)ne for this p%rpose#

10.1! T//-4
Li,e typical co'p%ter pro)ra''ers* e'&e e co'pilers* asse'&lers* an e&%))ers to syste' esi)ners %se

e?elop e'&e e

syste' soft(are#

Eo(e?er* they also %se a fe( tools that are %nfa'iliar to 'ost pro)ra''ers# Soft(are tools can co'e fro' se?eral so%rces/ Soft(are co'panies that specialiDe in the e'&e e 'ar,et#

37

9orte fro' the GNU soft(are e?elop'ent tools# So'eti'es* e?elop'ent tools for a personal co'p%ter can &e %se if the

e'&e e processor is a close relati?e to a co''on 9C processor# E'&e e syste' esi)ners also %se a fe( soft(are tools rarely %se pro)ra''ers# One co''on tool is an OinBcirc%it e'%latorO >ICE@ or* in 'ore 'o ern esi)ns* an e'&e e e&%))er# This e&%))in) tool is the f%n a'ental tric, %se to e&%) e0peri'ental co e in the syste'# A s'all po to pro?i e the e&%))in) e?elop e'&e e co e# It replaces or pl%)s into the 'icroprocessor* an pro?i es facilities to -%ic,ly loa an %s%ally pro?i es the special electronics to pl%) into the syste'# Often a personal co'p%ter (ith special soft(are attaches to the po interface# Another co''on tool is a %tility pro)ra' >often ho'eB)ro(n@ to a a &y typical co'p%ter

chec,s%' or CRC to a pro)ra'* so it can chec, its pro)ra' ata &efore e0ec%tin) it# An e'&e e pro)ra''er that e?elops soft(are for i)ital si)nal

processin) often has a 'ath (or,&ench s%ch as MathCa si'%late the 'athe'atics#

or Mathe'atical to

Less co''on are %tility pro)ra's to t%rn ata files into co e* so one can incl% e any ,in of ata in a pro)ra'# A fe( projects %se Synchrono%s pro)ra''in) lan)%a)es for e0tra relia&ility or i)ital si)nal processin)#

10.1" D&<#33$)3
De&%))in) is %s%ally perfor'e (ith an inBcirc%it e'%lator* or so'e type of e&%))er that can interr%pt the 'icrocontrollerFs internal 'icroco e# The 'icroco e interr%pt lets the e&%))er operate in har (are in (hich only the C9U (or,s# The C9UB&ase e&%))er can &e %se to test an e&%) the electronics of the co'p%ter fro' the ?ie(point of the C9U# This feat%re (as pioneere on the 9D9B11# As the co'ple0ity of e'&e e syste's )ro(s* hi)her le?el tools an

operatin) syste's are 'i)ratin) into 'achinery (here it 'a,es sense# 4or e0a'ple* cell phones* personal i)ital assistants an other cons%'er co'p%ters often nee 38

si)nificant soft(are that is p%rchase

or pro?i e

&y a person other than the

'an%fact%rer of the electronics# In these syste's* an open pro)ra''in) en?iron'ent s%ch as Lin%0* OSGi or E'&e e Qa?a is re-%ire so that the thir Bparty soft(are pro?i er can sell to a lar)e 'ar,et#

10.1 S,'+, #*
All e'&e e syste's ha?e startB%p co e# Us%ally it isa&les interr%pts* sets %p the electronics* tests the co'p%ter >RAM* C9U an soft(are@* an then starts the application co e# Many e'&e e syste's reco?er fro' shortBter' po(er fail%res &y restartin) >(itho%t recent selfBtests@# Restart ti'es %n er a tenth of a secon are co''on# Many esi)ners ha?e fo%n a fe( LEDs %sef%l to in icate errors >they help tro%&leshootin)@# A co''on sche'e is to ha?e the electronics t%rn on all of the LED>s@ at reset >there&y pro?in) that po(er is applie an the LEDs the'sel?es (or,@* (here%pon the soft(are chan)es the LED pattern as the 9o(erBOn Self Test e0ec%tes# After that* the soft(are 'ay &lin, the LED>s@ or set %p li)ht patterns %rin) nor'al operation to in icate pro)ra' e0ec%tion pro)ress or errors# This ser?es to reass%re 'ost technicians.en)ineers an li)hts are ,no(n to attract attention an ?an alis'# so'e %sers# An interestin) e0ception is that on electric po(er 'eters an other ite's on the street* &lin,in)

10.15 C/%$)3 10.15.1 T+')4($,,&+ C/%$)3B


N$):-#%& ?*$:.0@ N$):-#%& O-:%7!;16.:O 9PPPPPPPPPPPPPPPPPPPPPPP F#):,$/) D&.$)$,$/)PPPPPPPPPPPPPPPPPPPPPPPPPP9 E/$% $)$,HJQ ADC7H&'+,=&',7T&(*&+',#+&HJQ E/$% %&-'5HJQ

3:

9PPPPPPPPPPPPPPPPPPPPPPPPV'+$'<-& D&:-'+',$/) PPPPPPPPPPPPPPPPPPPPPPPP9 #)4$3)&% $), $,D,8,-Q <')81 #)4$3)&% :0'+ PHUDS, PTENS,PONES,HHUDS,TTENS,TONES,THUDS,HTENS,HONES,,&(*,0<&',, ,(*,*+&4Q #)4$3)&% :0'+ 0R11S,:/#),,'E30<Q <')8! #)4$3)&% :0'+ ($--7:/#),,4&:,/#,,.-'31,'E3:/),,:0&:8*,,',/;5*,+7%',',3*4R 5S,+&:Q <$, +&:&$E&7%','!,+&:&$E&7%','1,34(Q 9PPPPPPPPPPPPPPPPPPPPPPPP M'$) F#):,$/) PPPPPPPPPPPPPPPPPPPPPPPPPPPPP9 E/$% $),&++#*, $4+HJ T $.HTMR1IFJ T TMR1IFU0Q ($--7:/#),VVQ $.H($--7:/#),@15J T ($--7:/#),U0Q 4&:VVQ $.H4&:@!J T 4&:U0Q .-'31U1Q W W

3;

W W E/$% ('$)HE/$%J T $)$,HJQ 20$-&H1J T ADC7H&'+,=&',7T&(*&+',#+&HJQ -:%7(/E&H0,0JQ -:%7*#,4HO I H M OJQ -:%7(/E&H0,6JQ -:%7*#,4HO=*BOJQ -:%7*#,)H*+&4JQ -:%7(/E&H1,0JQ -:%7*#,4HOT&(*BOJQ -:%7*#,)H,&(*JQ -:%7*#,4HO H=,BOJQ -:%7*#,)H'E30<JQ -:%7*#,4HO OJQ $.H.-'31J T .-'31U0Q $.H,&(*? 5 >>H'E30<@U65 >> 'E30<?UC0J >> *+&4?U1C0J

33

T -:%7(/E&H1,0JQ -:%7*#,4HOH&'-,0 $4 N/+('-OJQ RC U0Q TIREGU0;!=Q 20$-&HXTRMTJQ TIREGUHTTENSV0;"0JQ 20$-&HXTRMTJQ TIREGUHTONESV0;"0JQ 20$-&HXTRMTJQ TIREGUHHTENSV0;"0JQ 20$-&HXTRMTJQ TIREGUHHONESV0;"0JQ 20$-&HXTRMTJQ TIREGUHPHUDSV0;"0JQ 20$-&HXTRMTJQ TIREGUHPTENSV0;"0JQ 20$-&HXTRMTJQ TIREGUHPONESV0;"0JQ 20$-&HXTRMTJQ TIREGUH!V0;"0JQ 20$-&HXTRMTJQ D&-'5M4H!50JQ -:%7:-&'+HJQ W $.H,&(*@ 5 YY 'E30<@U7C YY *+&4@U1C0J T -:%7(/E&H1,0JQ -:%7*#,4HOH&'-,0 $4 A<N+(-OJQ TIREGU0;!=Q

3A

20$-&HXTRMTJQ TIREGUHTTENSV0;"0JQ 20$-&HXTRMTJQ TIREGUHTONESV0;"0JQ 20$-&HXTRMTJQ TIREGUHHTENSV0;"0JQ 20$-&HXTRMTJQ TIREGUHHONESV0;"0JQ 20$-&HXTRMTJQ TIREGUHPHUDSV0;"0JQ 20$-&HXTRMTJQ TIREGUHPTENSV0;"0JQ 20$-&HXTRMTJQ TIREGUHPONESV0;"0JQ 20$-&HXTRMTJ TIREGUH"V0;"0JQ 20$-&HXTRMTJQ

D&-'5M4H!50JQ -:%7:-&'+HJQ W W W W

9PPPPPPPPPPPPPPPPPPPPPPPP I)$,$'-$F',$/) PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP9 E/$% $)$,HJ T

A6

TRISC U 0;C0Q ADCON1U0IC!Q SP=RGU!5Q =RGHU1Q RCSTAU0I60Q TISTAU0I! Q TMR1LU0I17Q TMR1HU0IFCQ T1CONU0I01Q GIEUPEIEUTMR1IEU1Q99RCIEU1Q -:%7$)$,HJQ D&-'5M4H1JQ W 9PPPPPPPPPPPPPPPPPPPPPPPF#):,$/)PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP9 ADC7H&'+,=&',7T&(*&+',#+&HJ T 9PPPPPPPT&(*&+',#+&PPPPPP9 ADCON0 U 0;C1Q D&-'5M4H1JQ ADGOU1Q 20$-&HADGOJQ ,&(*U,(*U,(*9!Q THUDSU,(*9100Q ,(*U,(*Z100Q TTENSU,(*910Q ,(*U,(*Z10Q 994,',#4 :0&:8 ,(*UADRESHP!56VADRESLQ 99ADC C0 U 0

A1

TONESU,(*Q D&-'5M4H5JQ 9PPPPPP H&'+, =&', PPPPP9 ADCON0 U 0;C6Q D&-'5M4H1JQ ADGOU1Q 20$-&HADGOJQ 0<&',U,(*Q 0R:/#),SU 0<&',Q :/#),VVQ $.H:/#),@10J T :/#),U0Q 'E30<UH0R0SV0R1SV0R!SV0R"SV0R SV0R5SV0R6SV0R7SV0RCSV0R6SJ910Q $.H'E30<?"5J T 'E30<U0Q W $.H'E30<@ 100 >> 'E30<?1!0J T 'E30<U60Q W $.H'E30<@ 100 >> 'E30<@1"0J T 'E30<U6CQ W $.H'E30<@"5 >> 'E30<?5CJ 994,',#4 :0&:8 ,(*UADRESHP!56VADRESLQ 99ADC C0 U 1

A1

T 'E30<U60Q W $.H'E30<@ 5 >> 'E30<?61J T 'E30<U65Q 99 W $.H'E30<@6! >> 'E30<?7CJ T 'E30<U66Q 99 W $.H'E30<@65 >> 'E30<?C0J T 'VVQ $.H'UU1JT 'E30<U66Q W $.H'UU!J T'E30<U7 Q W $.H'UU"JT 'E30<U7"Q W W ,(*U'E30<Q HHUDSU,(*9100Q ,(*U,(*Z100Q HTENSU,(*910Q ,(*U,(*Z10Q HONESU,(*Q W ADCON0U0I61Q D&-'5M4H1JQ 99/;5*U7CQ 99/;5*U7!Q /;5*U75Q /;5*U70Q

$.H'UU JT 'E30<U6CQ 'U0QW 99/;5*U66QW

A2

ADGOU1Q 20$-&HADGOJQ D&-'5M4H5JQ *+&4U,(*U*+&4-!CQ PHUDSU,(*9100Q ,(*U,(*Z100Q PTENSU,(*910Q ,(*U,(*Z10Q PONESU,(*Q W E/$% %&-'5HJ T ./+HDU0QD?U 000QDVVJQ W 994,',#4 :0&:8 *+&4UHADRESHP!56VADRESLJ9 Q

10.15.! R&:&$E&+ C/%$)3B


.eeeeeeeeeeeeeee<i)5ee Eealth Monitorin)eeeeeeeeeeeeeeeeeeeeeee. iincl% e ]pic#h^ iincl% e Olc _1:07#cO __CON4IG>=T L CDTDIS L 9CRTDIS L 5ORDIS L LH9DIS L CRTEN L DE5UGDIS L DUN9ROT L UN9ROTECT@N .eeeeeeeeeeeeeeeeeee 4%nc Definition eeeeeeeeeeeeeeeeeeeeeeee. ?oi init>@N A7

?oi for'at>@N ?oi sen topc_?ar1>@N ?oi sen topc1>const char ess-1@N ?oi elay>@N

i efine E')_alert_alar' R5; i efine E')_alert_LED i efine ON i efine O44 6 .eeeeeeeeeeeeeeeeeeee Haria&le Declarationeeeeeeeeeeeeeeeeeeeeeeee. %nsi)ne char set* 'cnt[6*R=[6*pres*Rec_ctl`16a*h&eat*te'p*fla)1*chec,*&%D1*&%Dcnt*co%nt*'ill_co%n t*secN %nsi)ne int ,N 1 R51

.eeeeeeeeeeeeeeeeeee Interr%pt 4%nctioneeeeeeeeeeeeeeeeeeeeeeeee. %nsi)ne interr%pt isr>?oi @ j if>SS9I4@ j SS9I4 [ 6N g if>RCI4@ j RCI4[6N R=[RCREGN

A8

if>R=[[6015@ j set[1N g if>set[[1@ j Rec_ctl`'cnta[R=B6026N 'cntPPN if>'cnt[[A@ j set['cnt[6N fla)1[1N g g g if>TMR1I4@ j TMR1I4[6N 'ill_co%ntPPN if>'ill_co%nt^18@ j 'ill_co%nt[6N secPPN if>sec^1@ j sec[6N if>&%Dcnt [[ 1@ j co%ntPPN if>co%nt^16@

A:

j &%D1[6N &%Dcnt[6N co%nt[6N E')_alert_alar'[O44N g g g g g g .eeeeeeeeeeeeeeeeeeeMain 4%nction eeeeeeeeeeeeeeeeeeeeeeeeeeeee. ?oi 'ain>?oi @ j init>@N R5;[6N (hile>1@ j lc _'o?e>6*6@N lc _p%ts>O = E M O@N lc _'o?e>6*A@N lc _p%ts>O5p/O@N lc _p%tn>pres@N lc _'o?e>1*6@N lc _p%ts>OTe'p/O@N lc _p%tn>te'p@N lc _p%ts>O E5t/O@N lc _p%tn>h&eat@N lc _p%ts>O O@N

A;

if>fla)1[[1@ j fla)1[6N 'cnt[6N for'at>@N if>chec,[[1@ j lc _'o?e>1*6@N lc _p%ts>OEealth is Nor'alO@N ..E')_alert_alar'[O44N .. E')_alert_LED[O44N DelayMs>186@N g if>chec,[[2@ j lc _'o?e>1*6@N lc _p%ts>OEealth is A&Nr'lO@N &%D1[1N DelayMs>186@ g if>&%D1[[1@ j E')_alert_alar'[ONN &%Dcnt[1N sen topc1>OATO@N T=REG[12N (hile>kTRMT@N

A3

elay>@N for>,[6N ,][76666N ,PP@N sen topc1>OATPCMG4[1O@N T=REG[12N (hile>kTRMT@N elay>@N for>,[6N ,][76666N ,PP@N sen topc1>OATO@N T=REG[12N (hile>kTRMT@N elay>@N for>,[6N ,][76666N ,PP@N sen topc1>OATPCMGS[O@N T=REG[FOFN (hile>kTRMT@N sen topc1>OA7A7777O@N..AA8AA::132 sen topc1>O;7;O@N T=REG[FOFN (hile>kTRMT@N elay>@N T=REG[12N..4OR LINE 4EED (hile>kTRMT@N for>,[6N ,][76666N ,PP@N sen topc_?ar1>@N T=REG[12N..4OR LINE 4EED (hile>kTRMT@N for>,[6N ,][76666N ,PP@N T=REG[1:N..4OR CTRLP< (hile>kTRMT@N for>,[6N ,][76666N ,PP@N for>,[6N ,][76666N ,PP@N

AA

g else j&%Dcnt[6N E')_alert_alar'[O44Ng lc _clear>@N g g g .eeeeeeeeeeeeeeeeeeeeeeeeeeeInitialiDationeeeeeeeeeeeeeeeeeeeeeeee. ?oi init>@ j TRIS5 [ 6066N TRISC [ 6036N R5;[6N S95RG[18N 5RGE[1N RCSTA[6=A6N T=STA[6=17N TMR1L[6=1;N TMR1E[6=4CN T1CON[6=61N GIE[9EIE[SS9IE[RCIE[TMR1IE[1N lc _init>@N DelayMs>1@N g ?oi for'at>@ j %nsi)ne char cte'p*cte'p1*cte'p1N 'cntPPN

166

cte'p [ Rec_ctl`'cntaN 'cntPPN cte'p1 [ Rec_ctl`'cntaN te'p [>cte'p e 16@P cte'p1N 'cntPP cte'p [ Rec_ctl`'cntaN 'cntPPN cte'p1 [ Rec_ctl`'cntaN h&eat [>cte'p e 16@P cte'p1N 'cntPPN cte'p [ Rec_ctl`'cntaN 'cntPPN cte'p1 [ Rec_ctl`'cntaN 'cntPPN cte'p1 [ Rec_ctl`'cntaN pres [>cte'p e 166@P >cte'p1e16@Pcte'p1N 'cntPPN

chec, [ Rec_ctl`'cntaN 'cnt[6N g ?oi sen topc_?ar1>@ j sen topc1>OEealth A&nor'alO@N T=REG[12N (hile>kTRMT@N for>,[6N ,][766N ,PP@N sen topc1>OTe'p/O@N T=REG[>Rec_ctl`1aP6026@N (hile>kTRMT@N

161

T=REG[>Rec_ctl`1aP6026@N (hile>kTRMT@N sen topc1>OCO@N T=REG[12N (hile>kTRMT@N for>,[6N ,][766N ,PP@N sen topc1>OE.R/O@N T=REG[>Rec_ctl`2aP6026@N (hile>kTRMT@N T=REG[>Rec_ctl`7aP6026@N (hile>kTRMT@N sen topc1>O5p/O@N T=REG[>Rec_ctl`8aP6026@N (hile>kTRMT@N T=REG[>Rec_ctl`:aP6026@N (hile>kTRMT@N T=REG[>Rec_ctl`;aP6026@N (hile>kTRMT@N T=REG[12N (hile>kTRMT@N for>,[6N ,][766N ,PP@N g ?oi sen topc1>const char ess-1@ j o j (hile>kTRMT@N T=REG[ess-1N ss-1PPN g

161

(hile>ess-1k[Fl6F@N g ?oi j %nsi)ne int jN for>j[6Nj][7666NjPP@N g elay>@

10.15 C/):-#4$/)
The tool %se is M9LA5 ?;#71 an the co in) is (ritten in E'&e e C an %'pe into the 9IC 'icrocontroller#

162

CONCLUSION
Cith the fast e?elop'ent of the in %strialiDation an %r&aniDation process in the (orl an hence (ith the increase of &%syness of people it has &eco'e iffic%lt to 'onitor the health con itions of a patient contin%o%sly# Also (ith the increase in the n%'&er senior citiDens an chronic iseases* the n%'&er of el erly patients (ho nee constant assistance has increase # One ,ey point of all critical care for el erly patient is the contin%o%s 'onitorin) of their ?ital si)ns # To a?oi %ne0pecte health pro&le's an o&tain hi)her acc%racy in ia)nosis of the health con itions of a patient* efficient an co'prehensi?e ata collectin)* 'onitorin) an control play an i'portant role to i'pro?e the health care syste' 'ore relia&le an effecti?e# A no?el (ireless ata collection for health 'onitorin) syste' of electric 'achine &ase on (ireless sensor net(or, ><i)5ee.IEEE361#18#7 Stan ar @ is propose an e?elope in this project# The %ni-%e characteristics of <i)5ee net(or,s s%ch as lo( po(er* lo( cost* an hi)h fle0i&ility 'a,e the' i eal for this application# As the foc%s of this* the har (are esi)n an i'ple'entation of a <i)&ee &ase (ireless sensor net(or, are isc%sse in o%r project#

167

=I=ILOGRAPHY

C%sto'iDin) an pro)ra''in) %r pic 'icrocontrollerB My,e 9re c,o Micro controllers an applications BAjay H Deh'%,h Electronics 'eas%re'ent an instr%'entation B +alsi C pro)ra''in) for e'&e e syste'sB +ir, <%rell Teach yo%rself electronics an electricityB Stan Gi&lisco E'&e e 9IC 'icrocontrollerB Qohn 9eat'an Cireless co''%nications G Theo ore S# Rappaport E'&e e C G Michael Q#9ont De?elopin) E'&e e Soft(are in C G Qanathan#C#Hal?ano 9IC Microcontroller 9roject 5oo, G Qohn Lo?ine <i)&ee Net(or,in) B Ear?ey Stel'an

168

APPENDII A A$3<&& H&'-,0 C'+& F&',#+&4


A3$)3 I)%&*&)%&),-5B Ena&les relia&le re'ote patient 'onitorin)

Maintains free o' of 'o&ility Offers safety an acti?ity 'onitorin) sensors for ho'e an professional %se O9ro?i es realBti'e location capa&ilities

C0+/)$: D$4&'4& M')'3&(&),B Offers pro'pt fee &ac, for &etter self 'ana)e'ent

Ena&les colla&oration &et(een iseases

e?ices for 'ana)in) '%ltiple chronic

Connects a 'yria of e?ices that 'ay &e re-%ire in professional settin)s

H&'-,0 ')% W&--)&44B Offers &o yB(orn sensors for sports an fitness

4eat%res precision ti'e sta'ps for synchroniDation an 'onitorin)

hi)h acc%racy

Opti'iDe application ata rates for all types of fitness e-%ip'ent Ena&les strea'in)* storeBan Bfor(ar L &%rst co''%nication 'o es

C#4,/($F&% S&:#+$,5B Offers o%tBofB&o0 sec%rity for easy %se


Confor's (ith re)ional re)%latory en?iron'ents S%pports access control for cons%'er* ser?ice pro?i er* care pro?i er* or share net(or,s 4eat%res scala&le s%pport for ata sec%rity an pri?acy Efficient ,ey )eneration* professional settin)s istri&%tion an 'ana)e'ent for ho'e an

16:

APPENDII = MPLA= FEATURES


M9LA5 Inte)rate De?elop'ent En?iron'ent >IDE@ is a free* inte)rate toolset for the e?elop'ent of e'&e e applications e'ployin) MicrochipFs 9ICm an s 9ICm 'icrocontrollers# M9LA5 Inte)rate De?elop'ent En?iron'ent >IDE@ is a free* inte)rate toolset for the e?elop'ent of e'&e e applications e'ployin) MicrochipFs 9ICm an s 9ICm 'icrocontrollers# M9LA5 IDE r%ns as a 21B&it application on MS Cin o(sm* is easy to %se an incl% es a host of free soft(are co'ponents for fast application e?elop'ent an s%perBchar)e e&%))in)#

M9LA5 IDE also ser?es as a sin)le* %nifie )raphical %ser interface for a itional Microchip an thir party soft(are an har (are e?elop'ent tools# Mo?in) &et(een tools is a snap* an %p)ra in) fro' the free soft(are si'%lator to har (are e&%) an pro)ra''in) tools is one in a flash &eca%se M9LA5 IDE has the sa'e %ser interface for all tools# M9LA5 IDESs SIM* hi)h spee soft(are si'%lator for 9IC an s9IC

>Di)ital Si)nal 9rocessin) 9IC Microcontroller@ e?ices (ith peripheral si'%lation* co'ple0 sti'%l%s injection an re)ister lo))in)

16;

APPENDII C AT C/((')%4
AT co''an s are instr%ctions %se to control a 'o e'# AT is the a&&re?iation of ATtention# E?ery co''an line starts (ith OATO or OatO# ThatFs (hy 'o e' co''an s are calle AT co''an s# Many of the co''an s that are %se to control (ire ialB%p 'o e's* s%ch as ATD >Dial@* ATA >Ans(er@* ATE >Eoo, control@ an ATO >Ret%rn to online ata state@* are also s%pporte &y GSM.G9RS 'o e's an 'o&ile phones# 5esi es this co''on AT co''an set* GSM.G9RS 'o e's an 'o&ile phones s%pport an AT co''an set that is specific to the GSM technolo)y* (hich incl% es SMSBrelate co''an s li,e ATPCMGS >Sen SMS 'essa)e@* ATPCMSS >Sen SMS 'essa)e fro' stora)e@* ATPCMGL >List SMS 'essa)es@ an ATPCMGR >Rea SMS 'essa)es@# Note that the startin) OATO is the prefi0 that infor's the 'o e' a&o%t the start of a co''an line# It is not part of the AT co''an na'e# 4or e0a'ple* D is the act%al AT co''an na'e in ATD an PCMGS is the act%al AT co''an na'e in ATPCMGS# Eo(e?er* so'e &oo,s an (e& sites %se the' interchan)ea&ly as the na'e of an AT co''an # Eere are so'e of the tas,s that can &e GSM.G9RS 'o e' or 'o&ile phone/

one %sin) AT co''an s (ith a

Get &asic infor'ation a&o%t the 'o&ile phone or GSM.G9RS 'o e'# 4or e0a'ple* na'e of 'an%fact%rer >ATPCGMI@* 'o el n%'&er >ATPCGMM@* IMEI n%'&er >International Mo&ile E-%ip'ent I entity@ >ATPCGSN@ an soft(are ?ersion >ATPCGMR@#

Get &asic infor'ation a&o%t the s%&scri&er# 4or e0a'ple* MSISDN >ATPCNUM@ an IMSI n%'&er >International Mo&ile S%&scri&er I entity@ >ATPCIMI@#

Get the c%rrent stat%s of the 'o&ile phone or GSM.G9RS 'o e'# 4or e0a'ple* 'o&ile phone acti?ity stat%s >ATPC9AS@* 'o&ile net(or,

163

re)istration stat%s >ATPCREG@* ra io si)nal stren)th >ATPCSb@* &attery char)e le?el an &attery char)in) stat%s >ATPC5C@#

Esta&lish a ata connection or ?oice connection to a re'ote 'o e' >ATD* ATA* etc@#

Sen an recei?e fa0 >ATD* ATA* ATP4e@# Sen >ATPCMGS* ATPCMSS@* rea >ATPCMGR* ATPCMGL@* (rite an o&tain

>ATPCMGC@ or

elete >ATPCMGD@ SMS 'essa)es

notifications of ne(ly recei?e SMS 'essa)es >ATPCNMI@#

Rea >ATPC95R@* (rite >ATPC95C@ or search >ATPC954@ phone&oo, entries#

9erfor' sec%rityBrelate tas,s* s%ch as openin) or closin) facility loc,s >ATPCLC+@* checking whether a facility is locked (AT !"!#$ and changing %asswords (AT !&'($. >4acility loc, e0a'ples/ SIM loc, `a pass(or '%st &e )i?en to the SIM car e?ery ti'e the 'o&ile phone is s(itche ona an 9EBSIM loc, `a certain SIM car is associate (ith the 'o&ile phone# To %se other SIM car s (ith the 'o&ile phone* a pass(or '%st &e entere #a@

Control the presentation of res%lt co es . error 'essa)es of AT co''an s# 4or e0a'ple* yo% can control (hether to ena&le certain error 'essa)es >ATPCMEE@ an (hether error 'essa)es sho%l &e isplaye in n%'eric for'at or ?er&ose for'at >ATPCMEE[1 or ATPCMEE[1@#

Get or chan)e the confi)%rations of the 'o&ile phone or GSM.G9RS 'o e'# 4or e0a'ple* chan)e the GSM net(or, >ATPCO9S@* &earer ser?ice type >ATPC5ST@* ra io lin, protocol para'eters >ATPCRL9@* SMS center a ress >ATPCSCA@ an stora)e of SMS 'essa)es >ATPC9MS@#

Sa?e an restore confi)%rations of the 'o&ile phone or GSM.G9RS 'o e'# 4or e0a'ple* sa?e >ATPCSAS@ an restore >ATPCRES@ settin)s relate to SMS 'essa)in) s%ch as the SMS center a ress#

16A

APPENDII D D$..&+&):&4 <&,2&&) P+/3+'(($)3 C ')% E(<&%%&% C


C is for es,top co'p%ters* e'&e e C %s%ally is for 'icrocontroller &ase applications# Chat 'a,es e'&e e c so ifferent fro' the re)%lar c is/ A&sence of console Restriction on co e siDe The co'piler Re)%lar co'pilers create OS epen ent e0ec%ta&le file (here as e'&e co'pilers create a file (hich are o(nloa e to controllers to realiDe the re-%ire tas,# Re)%lar co'pilers onFt )i?e a&straction for all the reso%rces of the syste' (here as in e'&e e c co'piler )i?es access to all the reso%rces irectly so co e efficient# Co e (ritten in e'&e e c is tho%)h not cross co'pati&le &%t they are series co'pati&le# e c

116

APPENDII E T0& 8&5 :0'+':,&+$4,$:4 /. A$3<&&, W$-F$ ')% =-#&,//,0


A$3=&& W$-F$ R')3& 16B166 'eters 86B166 'eters N&,2/+8$)3 A Bhoc* peer to peer* 9oint to h%& T/*/-/35 star* or 'esh O*&+',$)3 3:3 MED >E%rope@ 1#7 an 8 GED F+&1#&):5 A66BA13 MED >NA@* 1#7 GED >(orl (i e@ C/(*-&;$,5 HD&E$:& Lo( Ei)h ')% '**-$:',$/) $(*':,J P/2&+ Hery lo( >lo( Ei)h C/)4#(*,$/) po(er is a esi)n H=',,&+5 /*,$/) ')% )oal@ -$.&J S&:#+$,5 113 AES pl%s application layer sec%rity T5*$:'In %strial control Cireless LAN A**-$:',$/)4 an 'onitorin)* connecti?ity* sensor net(or,s* &roa &an Internet &%il in) a%to'ation* access ho'e control an a%to'ation* toys* )a'es =-#&,//,0 16 G 166 'eters A Bhoc* ?ery s'all net(or,s 1#7 GED

Ei)h

Me i%'

:7 an 113 &it encryption Cireless connecti?ity &et(een e?ices s%ch as phones* 9DA* laptops* hea sets

Ta&le E#1/ Co'parison &et(een <i)&ee* CiBfi an 5l%etooth

111

Vous aimerez peut-être aussi