Sunteți pe pagina 1din 45

PROJECT REPORT ON

Easy Electronics
easyelectronics.weebly.com

1 | P a g e
Introduction
Component Used
Circuit Diagram
Circuit Description
GPS
GSM
Diode
LCD
Resistor
Crystal Oscillator
Voltage Regulator
Capacitor
Momentary switch
Source Code
2 | P a g e
Security in travel is primary concern for every one. This Project describes a
design of effective alarm system that can monitor an automotive / vehicle / car
condition in traveling. This project is designed to inform about an accident that
is occurred to a vehicle to the family members of the traveling persons. This
project uses a piezo-electric sensor which can detect the abrupt vibration
when an accident is occurred. This sends a signal to microcontroller.
This Project presents an automatic vehicle accident detection system using
GPS and GS modems. The system can be interconnected with the car alarm
system and alert the owner on his mobile phone. This detection and
messaging system is composed of a GPS receiver! icrocontroller and a
GS odem. GPS "eceiver gets the location information from satellites in the
form of latitude and longitude.
The icrocontroller processes this information and this processed information
is sent to the user/owner using GS modem # GS modem is interfaced to the
$%. The GS modem sends an SS to the predefined mobile number and
informs about this accident. This enable it to monitor the accident situations
and it can immediately alerts the police/ambulance service with the location of
accident.
The project is built around the #T&'S() micro controller from #tmel. This micro
controller provides all the functionality of the SS alert system. *t also ta+es
care of filtering of the signals at the inputs.
The uni,ueness of this project is! not only alerting the neighbors by its siren!
but also it sends a caution SS to four mobile numbers. This numbers can be
changed at any time by the user using a -./ +ey pad. These numbers are
stored in 00P"1.
This project uses regulated (2! 3(4m# power supply. 3&4( three terminal
voltage regulator is used for voltage regulation. 5ridge type full wave rectifier
is used to rectify the ac out put of secondary of )-4/6)2 step down transformer.
3 | P a g e
Component used Quantity (no.s)
#T&'$(6 microcontroller 7base 8 *$9
1
:iode 7/443! .3v9
4
64+ resistance
1
/.3+ resistance
7
/34 ohms resistance
12
$rystal oscillator
1
Transformer 7))4v-'4'9
1
;.0.:.
1
$eramic $apacitor 7-4pf---pf9
2
0lectrolytic capacitor 7644 microfarad9
1
$apacitor764nf9
4
0lectrolytic capacitor 7/34 microfarad9
1
#:$4&4/7*$ 8 5#S09
1
*" Transmitter7TS#; <)449
4
*" "eceiver 7TS1P 63-&9
4
2oltage regulator 73&4(978(v9
1
Pot 764+9
4
)-Pin connector
1
)- pin switches
2
$ello tape 7for electrical use9
1
Supply wire
2 mts

4 | P a g e
5 | P a g e

6 | P a g e
This circuit wor+s on the principle that water conducts electricity. # wire connected to
2$$ and four other wires are dipped in tan+ at different levels namely ,uarter! half!
three-fourth! full and their output are ta+en on pins P-.4! P-.6! P-.)! P-.- via a
transistor 5$(/3.
Port P) is connected to data pins of ;$: and P6.4! P6.6! P6.) are respectively
connected to "S! "=! and 0> pins of ;$:.
*nitially when the tan+ is empty ;$: will show the message 2#$#>T. #s the tan+
starts filling up wire at different levels get some positive voltage! due to conducting
nature of water.
This voltage is then fed to their corresponding pins on controller. =hen level reaches
to ,uarter level! ;$: displays the message ?%#"T0". 1n further rise of level!
@#;A and -// ?%#"T0" are displayed on ;$:.
=hen tan+ gets full ;$: shows the message A%;; $;1S0 T#P
The sensing unit usually uses a float connected to a potentiometer. typically printed
in+ design in a modern automobile. #s the tan+ empties! the float drops and slides a
moving contact along the resistor! increasing its resistance.*n addition! when the
resistance is at a certain point! it will also turn on a Blow fuelB light on some vehicles.
eanwhile! the indicator unit 7usually mounted on the dashboard9 is measuring and
displaying the amount of electrical current flowing through the sending unit. =hen
the tan+ level is high and maCimum current is flowing! the needle points to BAB
indicating a full tan+. =hen the tan+ is empty and the least current is flowing! the
needle points to B0B indicating an empty tan+.
The system can be safeD if an electrical fault opens the electrical circuit causes the
indicator to show the tan+ as being empty 7which will provo+e the driver to refill the
tan+ 7in theory99 rather than full 7which would allow the driver to run out of fuel with
no prior notification9. $orrosion or wear of the potentiometer will provide erroneous
readings of fuel level.
@owever this system has a potential ris+ associated with it. #n electric current is
sent through the variable resistor to which a float is connected! so that the value of
resistance depends on the fuel level. *n most of automotive fuel gauges such
resistors are on the inward side of gauge i.e. inside fuel tan+. Sending current
through such a resistor has fire hazard 7and an eCplosion ris+9 associated with it.
These resistance sensors are also showing an increased failure rate with the
incremental additions of alcohol in automotive gasoline fuel. #lcohol increases the
corrosion rate at the potentiometer! as it is capable of carrying current li+e water.
Potentiometer applications for alcohol fuel use a pulse and hold methodology in that
a periodic signal is sent to determine fuel level decreasing the corrosion potential.
Therefore there is demand for another safer! non contact method for fuel level is
desired.
7 | P a g e
8 | P a g e
8052 Microcontroller

The #T&'$() is a low-power! high-performance $1S &-bit microcomputer with &E
bytes of Alash programmable and erasable read only memory 7P0"19. The device
is manufactured using #tmelFs high-density nonvolatile memory technology and is
compatible with the industry-standard $S-(6 instruction set and pin out. The on-chip
Alash allows the program memory to be reprogrammed in-system or by a conventional
non-volatile memory programmer. 5y combining a versatile &-bit $P% with Alash on a
monolithic chip! the #tmel #T&'$() is a powerful microcomputer which provides a
highly-fleCible and cost-effective solution to many embedded control applications.
9 | P a g e
The #T&'$() provides the following standard featuresG &E bytes of Alash! )(< bytes of
"#! -) */1 lines! three 6<-bit timer/counters! a five vector two-level interrupt
architecture! a full dupleC serial port! on-chip oscillator and cloc+ circuitry. *n addition!
the #T&'$() is designed with static logic for operation down to zero fre,uency and
supports two software selectable power saving modes. The *dle ode stops the $P%
while allowing the "#! timer/counters! serial port and interrupt system to continue
functioning. The Power-down ode saves the "# contents but freezes the oscillator
disabling all other chip functions until the neCt hardware reset.
Pin Configuration :
10 | P a g e
Pin Description
11 | P a g e
VCC:
Supply voltage.
GD:
Ground.
Port !:
Port 4 is an &-bit open-drain bi-directional */1 port. #s an output port! each pin can sin+
eight TT; inputs. =hen 6s are written to port 4 pins! the pins can be used as high
impedance inputs. Port 4 may also be configured to be the multipleCed low order
#ddress /data bus during accesses to eCternal program and data memory. *n this mode
P4 has internal pull ups. Port 4 also receives the code bytes during Alash programming!
and outputs the code bytes during program verification. 0Cternal pull ups are re,uired
during program verification.
Port ":
12 | P a g e
Port 6 is an &-bit bi-directional */1 port with internal pull-ups. The Port 6 output buffers
can sin+/source four TT; inputs. =hen 6s are written to Port 6 pins they are pulled high
by the internal pull-ups and can be used as inputs. #s inputs! Port 6 pins that are
eCternally being pulled low will source current 7**;9 because of the internal pull-ups. Port
6 also receives the low-order address bytes during Alash programming and verification.
Port #:
Port ) is an &-bit bi-directional */1 port with internal pull-ups. The Port ) output buffers
can sin+/source four TT; inputs. =hen 6s are written to Port ) pins they are pulled high
by the internal pull-ups and can be used as inputs. #s inputs! Port ) pins that are
eCternally being pulled low will source current 7**;9 because of the internal pull-ups.
Port ) emits the high-order address byte during fetches from eCternal program memory
and during accesses to eCternal data memory that use 6<-bit addresses 712. H
:PT"9. *n this application! it uses strong internal pull-ups when emitting 6s. :uring
accesses to eCternal data memory that use &-bit addresses 712. H "*9! Port ) emits
the contents of the P) Special Aunction "egister. Port ) also receives the high-order
address bits and some control signals during Alash programming and verification.
Port $:
Port - is an &-bit bi-directional */1 port with internal pull-ups. The Port - output buffers
can sin+/source four TT; inputs. =hen 6s are written to Port - pins they are pulled high
by the internal pull-ups and can be used as inputs. #s inputs! Port - pins that are
eCternally being pulled low will source current 7**;9 because of the pull-ups. Port - also
serves the functions of various special features of the #T&'$() as listed belowG Port -
also receives some control signals for Alash programming and verification.
13 | P a g e
ALE/PROG:
#ddress ;atch 0nable output pulse for latching the low byte of the address during
accesses to eCternal memory. This pin is also the program pulse input 7P"1G9 during
Alash programming. *n normal operation #;0 is emitted at a constant rate of 6/< the
oscillator fre,uency! and may be used for eCternal timing or cloc+ing purposes. >ote!
however! that one #;0
Pulse is s+ipped during each access to eCternal :ata emory. *f desired! #;0 operation
can be disabled by setting bit 4 of SA" location &0@. =ith the bit set! #;0 is active only
during a 12. or 12$ instruction. 1therwise! the pin is wea+ly pulled high. Setting
the #;0-disable bit has no effect if the microcontroller is in eCternal eCecution mode.
R%S%&:
"eset input. # high on this pin for two machine cycles while the oscillator is running
resets the device.
14 | P a g e
PS%:
Program Store 0nable is the read strobe to eCternal program memory. =hen the
#T&'$() is eCecuting code from eCternal program memory! PS0> is activated twice
each machine cycle! eCcept that two PS0> activations are s+ipped during each access
to eCternal data memory.
%'(VPP:
0Cternal #ccess 0nable. 0# must be strapped to G>: in order to enable the device to
fetch code from eCternal program memory locations starting at 4444@ up to AAAA@.
>ote! however! that if loc+ bit 6 is programmed! 0# will be internally latched on reset.
0# should be strapped to 2$$ for internal program eCecutions. This pin also receives
the 6)-volt programming enable voltage 72PP9 during Alash programming! for parts that
re,uire 6)-volt 2PP.
)&'L":
*nput to the inverting oscillator amplifier and input to the internal cloc+ operating circuit.
)&'L#:
1utput from the inverting oscillator amplifier.
15 | P a g e
Oscillator Characters:
.T#;6 and .T#;) are the input and output! respectively! of an inverting amplifier which
can be configured for use as an on-chip oscillator! as shown in Aigure 6. 0ither a ,uartz
crystal or ceramic resonator may be used. To drive the device from an eCternal cloc+
source! .T#;) should be left unconnected while .T#;6 is driven as shown in Aigure ).
There are no re,uirements on the duty cycle of the eCternal cloc+ signal! since the input
to the internal cloc+ing circuitry is through a divide-by-two flip-flop! but minimum and
maCimum voltage high and low time specifications must be observed.
*dle Mode:
*n idle mode! the $P% puts itself to sleep while all the on chip peripherals remain active.
The mode is invo+ed by software. The content of the on-chip "# and all the special
functions registers remain unchanged during this mode. The idle mode can be
terminated by any enabled interrupt or by a hardware reset. *t should be noted that
when idle is terminated by a hard ware reset! the device normally resumes program
eCecution! from where it left off! up to two machine cycles before the internal reset
algorithm ta+es control. 1n-chip hardware inhibits access to internal "# in this event!
but access to the port pins is not inhibited. To eliminate the possibility of an uneCpected
write to a port pin when *dle is terminated by reset! the instruction following the one that
invo+es *dle should not be one that writes to a port pin or to eCternal memory.
Programming the +lash:
The #T&'$() is normally shipped with the on-chip Alash memory array in the erased
state 7that is! contents I AA@9 and ready to be programmed. The programming interface
accepts either a high-voltage 76)-volt9 or a low-voltage 72$$9 program enable signal.
The low-voltage programming mode provides a convenient way to program the
#T&'$() inside the userFs system! while the high-voltage programming mode is
compatible with conventional third party Alash or 0P"1 programmers. The #T&'$()
is shipped with either the high-voltage or low-voltage programming mode enabled.
The #T&'$() code memory array is programmed byte by byte in either programming
mode. To program any nonblan+ byte in the on-chip Alash emory! the entire memory
must be erased using the $hip 0rase ode.
16 | P a g e
Programming !lgorit"m
5efore programming the #T&'$()! the address! data and control signals should be set
up according to the Alash programming mode table. To program the #T&'$()! ta+e the
following steps.
6. *nput the desired memory location on the address lines.
). *nput the appropriate data byte on the data lines.
-. #ctivate the correct combination of control signals.
/. "aise 0#/2PP to 6)2 for the high-voltage programming mode.
(. Pulse #;0/P"1G once to program a byte in the Alash array or the loc+ bits. The
byte-write cycle is self-timed and typically ta+es no more than 6.( ms.
"epeat steps 6 through (! changing the address and data for the entire array or until the
end of the object file is reached.
Data Polling:
The #T&'$() features :ata Polling to indicate the end of a write cycle. :uring a write
cycle! an attempted read of the last byte written will result in the complement of the
written datum on P1.3. 1nce the write cycle has been completed! true data are valid on
all outputs! and the neCt cycle may begin. :ata Polling may begin any time after a write
cycle has been initiated.
Ready(,usy:
The progress of byte programming can also be monitored by the ":J/5SJ output
signal. P-./ is pulled low after #;0 goes high during programming to indicate 5%SJ.
P-./ is pulled high again when programming is done to indicate "0#:J.
Program Veri-yG
*f loc+ bits ;56 and ;5) have not been programmed! the programmed code data can be
read bac+ via the address and data lines for verification. The loc+ bits cannot be verified
directly. 2erification of the loc+ bits is achieved by observing that their features are
enabled.
Chip %raseG
The entire Alash array is erased electrically by using the proper combination of control
signals and by holding #;0/P"1G low for 64 ms. The code array is written with all K6Ls.
17 | P a g e
The chip erase operation must be eCecuted before the code memory can be re-
programmed.
Reading the Signature ,ytes:
The signature bytes are read by the same procedure as a normal verification of
locations 4-4@! 4-6@! and 4-)@! eCcept that P-.< and P-.3 must be pulled to a logic
low. The values returned are as follows.
74-4@9 I 60@ indicates manufactured by #tmel
74-6@9 I (6@ indicates &'$()
74-)@9 I AA@ indicates 6)2 programming
74-)@9 I 4(@ indicates (2 programming
Special +unction Registers:
# map of the on-chip memory area called the Special Aunction "egister 7SA"9 space.
>ote that not all of the addresses are occupied! and unoccupied addresses may not be
implemented on the chip. "ead accesses to these addresses will in general return
random data! and write accesses will have an indeterminate effect. %ser software
should not write 6s to these unlisted locations! since they may be used in future
products to invo+e.
18 | P a g e
Data Memory:
The #T&'$() implements )(< bytes of on-chip "#. The upper 6)& bytes occupy a
parallel address space to the Special Aunction "egisters. That means the upper 6)&
bytes have the same addresses as the SA" space but are physically separate from
SA" space. =hen an instruction accesses an internal location above address 3A@! the
address mode used in the instruction specifies whether the $P% accesses the upper
6)& bytes of "# or the SA" space. *nstructions that use direct addressing access
SA" space. new features. *n that case! the reset or inactive values of the new bits will
always be 4.
#nterrupt $egisters
The individual interrupt enable bits are in the *0 register. Two priorities can be set for
each of the siC interrupt sources in the *P register. specifies whether the $P% accesses
the upper 6)& bytes of "# or the SA" space. *nstructions that use direct addressing
access SA" space. Aor eCample! the following direct addressing instruction accesses
the SA" at location 4#4@ 7which is P)9.
*nstructions that use indirect addressing access the upper 6)& bytes of "#. Aor
eCample! the following indirect addressing instruction! where "4 contains 4#4@!
accesses the data byte at address 4#4@! rather than P) 7whose address is 4#4@9.
&imer ! and ":
Timer 4 and Timer 6 in the #T&'$() operate the same way as Timer 4 and Timer 6 in
the #T&'$(6.
19 | P a g e
&imer #:
Timer ) is a 6<-bit Timer/$ounter that can operate as either a timer or an event counter.
The type of operation is selected by bit $/T) in the SA" T)$1>. Timer ) has three
operating modesG capture! auto-reload 7up or down counting9! and baud rate generator.
The modes are selected by bits in T)$1>. Timer ) consists of two &-bit registers! T@)
and T;). *n the Timer function! the T;) register is incremented every machine cycle.
Since a machine cycle consists of 6) oscillator periods! the count rate is 6/6) of the
oscillator fre,uency. *n the $ounter function! the register is incremented in response to
a 6-to-4 transition at its corresponding eCternal input pin! T). *n this function! the
eCternal input is sampled during S(P) of every machine cycle. =hen the samples show
a high in one cycle and a low in the neCt cycle! the count is incremented. The new count
value appears in the register during S-P6 of the cycle following the one in which the
transition was detected. Since two machine cycles 7)/ oscillator periods9 are re,uired to
recognize a 6-to-4 transition! the maCimum count rate is 6/)/ of the oscillator fre,uency.
To ensure that a given level is sampled at least once before it changes! the level should
be held for at least one full machine cycle.
Capture Mode:
*n the capture mode! two options are selected by bit 0.0>) in T)$1>. *f 0.0>) I 4!
Timer ) is a 6<-bit timer or counter which upon overflow sets bit TA) in T)$1>. This bit
can then be used to generate an interrupt. *f 0.0>) I 6! Timer ) performs the same
operation! but a 6- to-4 transition at eCternal input T)0. also causes the current value
in T@) and T;) to be captured into $#P)@ and "$#P);! respectively. *n addition! the
transition at T)0. causes bit 0.A) in T)$1> to be set. The 0.A) bit! li+e TA)! can
generate an interrupt.
'uto.reload /Up or Down Counter0:
Timer ) can be programmed to count up or down when configured in its 6<-bit auto-
reload mode. This feature is invo+ed by the :$0> 7:own $ounter 0nable9 bit located in
the SA" T)1:. %pon reset! the :$0> bit is set to 4 so that timer ) will default to
20 | P a g e
count up. =hen :$0> is set! Timer ) can count up or down! depending on the value of
the T)0. pin.
*nterrupts:
The #T&'$() has a total of siC interrupt vectorsG two eCternal interrupts 7*>T4 and
*>T69! three timer interrupts 7Timers 4! 6! and )9! and the serial port interrupt. 0ach of
these interrupt sources can be individually enabled or disabled by setting or clearing a
bit in Special Aunction "egister *0. *0 also contains a global disable bit! 0#! which
disables all interrupts at once. >ote that bit position *0.< is unimplemented. *n the
#T&'$(6! bit position *0.( is also unimplemented. %ser software should not write 6s to
these bit positions! since they may be used in future #T&' products. Timer ) interrupt is
generated by the logical 1" of bits TA) and 0.A) in register T)$1>. >either of these
flags cleared by hardware when the service routine is vectored . *n fact! the service
routine may have to determine whether it was TA) or 0.A) that generated the
interrupt! and that bit will have to be cleared in software. . The Timer 4 and Timer 6
flags! TA4 and TA6! are set at S(P) of the cycle in which the timers overflow.
The values are then polled by the circuitry in the neCt cycle.@owever! the Timer ) flag!
TA)! is set at S)P) and is polled in the same cycle in which the timer overflows.
21 | P a g e
SERIAL COMMUNICATION:
Computers trans-er data in two ways:
Parallel: 1ften & or more lines 7wire conductors9 are used to transfer data to a device
that is only a few feet away.
Serial: To transfer to a device located many meters away! the serial method is used.
The data is sent one bit at a time.
#t the transmitting end! the byte of data must be converted to serial bits using parallel-
in-serial-out shift register. #t the receiving end! there is a serial in-parallel-out shift
register to receive the serial data and pac+ them into byte. =hen the distance is short!
the digital signal can be transferred as it is on a simple wire and re,uires no modulation.
*f data is to be transferred on the telephone line! it must be converted from 4s and 6s to
audio tones.
This conversion is performed by a device called a modem! Kodulator/demodulatorL.
Serial data communication uses two methods1 Synchronous method transfers a
bloc+ of data at a time #synchronous method transfers a single byte at a time *t is
possible to write software to use either of these methods! but the programs can be
tedious and long. There are special *$ chips made by many manufacturers for serial
communications U'R& /uni2ersal asynchronous Recei2er transmitter0 US'R&
/uni2ersal synchronous asynchronous Recei2er.transmitter03 *f data can be
transmitted and received! it is a dupleC transmission. *f data transmitted one way a time!
it is referred to as half dupleC. *f data can go both ways at a time! it is full dupleC.
22 | P a g e
# protocol is a set of rules agreed by both the sender and receiver on.
=hen the data begins and ends. #synchronous serial data communication is widely
used for character-oriented transmissionsD
0ach character is placed in between start and stop bits! this is called framing.
5loc+-oriented data transfers use the synchronous method.
The start bit is always one bit! but the stop bit can be one or two bits The start bit is
always a 4 7low9 and the stop bit7s9 is 6 7high9
S5%A is an &-bit register used solely for serial communication. Aor a byte data to be
transferred via the TC: line! it must be placed in the S5%A "egister. The moment a byte
is written into S5%A! it is framed with the start and stop bits and transferred serially via
the TC: line S5%A holds the byte of data when it is received by &4(6 "C: line. =hen
the bits are received serially via "C:! the &4(6 de-frames it by eliminating the stop and
start bits! ma+ing a byte out of the data received! and then placing it in S5%A
12 S5%A!MF:F Dload S5%AI//h! #S$** for N:F
12 S5%A!# Dcopy accumulator into S5%A
12 #!S5%A Dcopy S5%A into accumulator
SCO is an 4.5it register used to program the start 5it6 stop 5it6 and data 5its o-
data -raming6 among other things.
23 | P a g e
SM!6 SM": They determine the framing of data by specifying the number of bits per
character! and the start and stop bits.
SM#: This enables the multiprocessing capability of the &4(6.
R% /recei2e ena5le0: *t is a bit-addressable register3 =hen it is high! it allows &4(6 to
receive data.
R7D pin: *f low! the receiver is disable3
&* /transmit interrupt0: =hen &4(6 finishes the transfer of &-bit character. *t raises T*
flag to indicate that it is ready to transfer another byte.T* bit is raised at the beginning of
the stop bit
R* /recei2e interrupt0: =hen &4(6 receives data serially via "C:! it gets rid of the start
and stop bits and places the byte in S5%A register. *t raises the "* flag bit to indicate
that a byte has been received and should be pic+ed up before it is lost. "* is raised
halfway through the stop bit.
24 | P a g e
The Glo5al Positioning System 7GPS9 is a space-based satellite navigation system
that provides location and time information in all weather conditions! anywhere on or
near the 0arth where there is an unobstructed line of sight to four or more GPS
satellites.
O6P
The system provides critical capabilities to military! civil and commercial
users around the world. *t is maintained by the %nited States government and is freely
accessible to anyone with a GPS receiver.
The GPS project was developed in 6'3- to overcome the limitations of previous
navigation systems!
O)P
integrating ideas from several predecessors! including a number
of classified engineering design studies from the 6'<4s. GPS was created and realized
by the %.S. :epartment of :efense 7:o:9 and was originally run with )/ satellites. *t
became fully operational in 6''(. 5radford Par+inson! "oger ;. 0aston! and *van #.
Getting are credited with inventing it.
#dvances in technology and new demands on the eCisting system have now led to
efforts to modernize the GPS system and implement the neCt generation of GPS
*** satellites and >eCt Generation 1perational $ontrol System 71$.9.
O-P
#nnouncements
from 2ice President #l Gore and the=hite @ouse in 6''& initiated these changes. *n
)444! the %.S. $ongress authorized the modernization effort! GPS ***.
*n addition to GPS! other systems are in use or under development. The "ussian Global
>avigation Satellite System 7G;1>#SS9 was developed contemporaneously with GPS!
but suffered from incomplete coverage of the globe until the mid-)444s.
O/P
There are
also the planned 0uropean %nionGalileo positioning system! *ndian *ndian "egional
>avigational Satellite System and $hinese $ompass navigation system.
25 | P a g e
;i,uid $rystal :isplays 7;$:s9 are categorized as none missive display devices!in that
respect! they do not produce any form of light li+e a $athode "ay Tube 7$"T9. ;$:s
either pass or bloc+ light that is reflected from an eCternal light source or provided by a
bac+/side lighting system.
There are two modes of operation for ;$:sG

ormal 8hite mode: the display is white or clear and allows light to pass through.
ormal ,lac9 Mode: the display is dar+ and all light is diffused. 2irtually all displays in
production for P$/=or+station use are normal white mode to optimize contrast and
speed.
26 | P a g e
Polarizers are an integral part of a ;$: display! possessing the uni,ue property of
only passing light if it is oriented in a specific 7oriented9 direction. To utilize this
phenomenon in T> ;$ displays! the bottom polarizer orients incoming light in one
direction. The oriented light passes through the ;$ material and is either unaltered
or BbentB '4 degrees. :epending on the orientation of the top polarizer! this light will
either pass through or be diffused. *f the light is diffused! it will appear as a dar+
area.
27 | P a g e
GSM 7Glo5al System -or Mo5ile Communications! originally Group Spcial Mobile9!
is a standard developed by the 0uropean Telecommunications Standards
*nstitute 70TS*9 to describe protocols for second generation 7)G9 digital cellular
networ+s used by mobile phones. *t became the de facto global standard for mobile
communications with over &4Q mar+et share.
The GS standard was developed as a replacement for first generation 76G9 analog
cellular networ+s! and originally described a digital! circuit-switched networ+ optimized
for full dupleC voice telephony. This was eCpanded over time to include data
communications! first by circuit-switched transport! thenpac+et data transport
28 | P a g e
via GP"S 7General Pac+et "adio Services9 and 0:G0 70nhanced :ata rates for GS
0volution or 0GP"S9.
Subse,uently! the -GPP developed third generation 7-G9 %TS standards followed by
fourth generation 7/G9 ;T0 #dvanced standards! which are not part of the 0TS* GS
standard.
BGSB is a trademar+ owned by the GS #ssociation. *t may also refer to the initially
most common voice codec used!
29 | P a g e
# diode is a two-terminal electronic component that conducts electric current in only
one direction. The term usually refers to a semiconductor diode! the most common
type today! which is a crystal of semiconductor connected to two electrical terminals! a
P-> junction.
The most common function of a diode is to allow an electric current in one direction
7called the diodeRs forward direction9 while bloc+ing current in the opposite direction 7the
reverse direction9. Thus! the diode can be thought of as an electronic version of a chec+
valve. This unidirectional behavior is called rectification! and is used to convert
alternating current to direct current! and remove modulation from radio signals in radio
receivers.



30 | P a g e

The electrical resistance of an object is a measure of its opposition to the passage of
a steady electric current. #n object of uniform cross section will have a resistance
proportional to its length and inversely proportional to its cross-sectional area! and
proportional to the resistivity of the material.

The resistance of a resistive object determines the amount of current through the object
for a given potential difference across the object! in accordance with 1hmRs lawG * I2/"
R is the resistance of the object! measured in ohms! e,uivalent to STs/$
)

V is the potential difference across the object! measured in volts
I is the current through the object! measured in amperes
Aor a wide variety of materials and conditions! the electrical resistance does not depend
on the amount of current through or the amount of voltage across the object! meaning
that the resistance " is constant for the given temperature and material. Therefore! the
resistance of an object can be defined as the ratio of voltage to current.*n the case of
31 | P a g e
nonlinear objects 7not purely resistive! or not obeying 1hmRs law9! this ratio can change
as current or voltage changes.
32 | P a g e
# crystal oscillator is an electronic circuit that uses the mechanical resonance of a
vibrating crystal of piezoelectric material to create an electrical signal with a very
precise fre,uency. This fre,uency is commonly used to +eep trac+ of time 7as in ,uartz
wristwatches9! to provide a stable cloc+ signal for digital integrated circuits! and to
stabilize fre,uencies for radio transmitters and receivers. The most common type of
piezoelectric resonator used is the ,uartz crystal! so oscillator circuits designed around
them were called Bcrystal oscillatorsB.
?uartz crystals are manufactured for fre,uencies from a few tens of +ilohertz to tens of
megahertz.

# ,uartz crystal can be modelled as an electrical networ+ with a low impedance
7series9 and a high impedance 7parallel9 resonance point spaced closely together.
33 | P a g e
# 2oltage regulator is an electrical regulator designed to automatically maintain a
constant voltage level.*t may use an electromechanical mechanism! or passive or active
electronic components. :epending on the design! it may be used to regulate one or
more #$ or :$ voltages.
2oltage regulators operate by comparing the actual output voltage to some internal
fiCed reference voltage. #ny difference is amplified and used to control the regulation
element in such a way as to reduce the voltage error. This forms a negative feedbac+
control loopD increasing the open-loop gain tends to increase regulation accuracy but
reduce stability 7avoidance of oscillation! or ringing during step changes9. There will also
be a trade-off between stability and the speed of the response to changes.
*- the output 2oltage is too low the regulation element is commanded to produce a
higher output voltage - by dropping less of the input voltage or to draw input current for
longer periods
i- the output 2oltage is too high the regulation element will normally be commanded
to produce a lower voltage. @owever! many regulators have over-current protection! so
that they will entirely stop sourcing current 7or limit the current in some way9 if the output
current is too high! and some regulators may also shut down if the input voltage is
outside a given range
.
34 | P a g e

35 | P a g e

# capacitor or condenser is a passive electronic component consisting of a pair of
conductors separated by a dielectric 7insulator9. =hen a potential difference 7voltage9
eCists across the conductors! an electric field is present in the dielectric. This field
stores energy and produces a mechanical force between the conductors. The effect is
greatest when there is a narrow separation between large areas of conductor! hence
capacitor conductors are often called plates.
$apacitors are widely used in electronic circuits to bloc+ the flow of direct current while
allowing alternating current to pass! to filter out interference! to smooth the output of
power supplies! and for many other purposes. They are used in resonant circuits in
radio fre,uency e,uipment to select particular fre,uencies from a signal with many
fre,uencies.

36 | P a g e
TYPES OF CAPACITOR:
'luminum %lectrolytic Capacitors
#Cial ;eads "adial ;eads $omputer Grade Snap ount Twist ;o+ Surface ount
&antalum Capacitors
Solid Tantalum
7 #Cial ;eads 9
Solid Tantalum
7 "adial ;eads 9
Aoil Tantalum
7 #Cial ;eads 9
:ipped Tantalum =et Tantalum Surface ount
Ceramic Capacitors
:ip Guard
onolithic
7 #Cial ;eads 9
onolithic
7 "adial ;eads 9
:isc Surface ount
+ilm Capacitors
Polyester
7 #Cial ;eads 9
Polyester
7 "adial ;eads 9
Polypropylene
7 #Cial ;eads 9
Polypropylene
7 "adial ;eads 9
Polystyrene
7 #Cial ;eads 9
37 | P a g e
Mica Capacitors
:ipped ica etal $lad Transmitting
Oil Capacitors
@ermetically Sealed
7 #Cial ;eads 9
@ermetically Sealed
7 "adial ;eads 9
Other Capacitor &ypes
2acuum $apacitors Trimmers Aeed Thru


*n electronics! a switch is an electrical component that can brea+ an electrical
circuit! interrupting the current or diverting it from one conductor to another.
38 | P a g e
The most familiar form of switch is a manually operated electromechanical device
with one or more sets of electrical contacts.
0ach set of contacts can be in one of two statesG either RclosedR meaning the
contacts are touching and electricity can flow between them! or RopenR! meaning the
contacts are separated and nonconducting.

# switch may be directly manipulated by a human as a control signal to a system!
such as a computer +eyboard button! or to control power flow in a circuit! such as a
light switch. #utomatically-operated switches can be used to control the motions of
machines! for eCample! to indicate that a garage door has reached its full open
position or that a machine tool is in a position to accept another wor+piece. Switches
may be operated by process variables such as pressure! temperature! flow! current!
voltage! and force! acting as sensors in a process and used to automatically control
a system.
#include<reg51.h>
sbit RS=P2^0;
sbit RW=P2^1;
sbit EN=P2^2;
39 | P a g e
sbit SENS=P2^;
ch!r in"#$0%;
ch!r test$&%='()*P**+(,;
ch!r c#--!./#siti#n$15%;
unsigned int chec0=01i10101;
unsigned ch!r !;
unsigned ch!r b11b2;
2#id recei2e.d!t!34;
2#id lcd.l!titude34;
2#id lcd.l#ngitude34;
2#id tr!ns-it.d!t!34;
2#id tr!ns.string34;
2#id lcd.string34;
2#id lcdc-d34;
2#id del!53unsigned int 2!lue4
'
int i16;
"#r3i=0;i<=2!lue;i774
"#r36=0;6<=125;6774;
,
2#id lcdc-d3unsigned ch!r 2!lue4
'
P1=2!lue;
RS=0;
RW=0;
EN=1;
del!5354;
EN=0;
del!5354;
,
2#id lcdd!t!3unsigned ch!r 2!lue4
'
P1=2!lue;
RS=1;
RW=0;
EN=1;
del!5354;
EN=0;
del!5354;
,
2#id lcd.string3unsigned ch!r 8str4
'
int i=0;
9hile3str$i%:=;<0;4
'
lcdd!t!3str$i%4;
40 | P a g e
i77;
del!53104;
,
return;
,
2#id seri!l34
'
=>?@=0A20; BB>?@E=2
=C1=0AD@; BB EF00 G+H@
SI?N=0A50; BB SERJ+K >?@E 1 1FL GJ= @+=+ 11 S=?P GJ= 11 S=+R= GJ= 1
REIEJMJN* ?N
=R1=1; BB=J>ER S=+R=
,
2#id "ind.c#--!34
'
unsigned int i1c#unt=0;
"#r3i=0;i<0;i774
'
i"3in"#$i%==;1;4
'
c#--!./#siti#n$c#unt77%=i;
,
,
,
2#id c#-/!re34
'
JE=0A00; BBJnterru/t dis!ble
"ind.c#--!34; BBDuncti#n t# detect /#siti#n #" c#--! in the string
lcd.l!titude34; BBDuncti#n t# sh#9 K!titude
lcd.l#ngitude34; BBDuncti#n t# sh#9 K#ngitude
chec0=0;
JE=0ANE; BBJnterru/t en!ble
,
2#id recei2e.d!t!34 interru/t E
'
in"#$chec077%=SGHD; BBRe!d SGHD
i"3chec0<4 BBI#nditi#n t# chec0 the reOuired d!t!
'
i"3in"#$chec0L1%:=test$chec0L1%4
chec0=0;
,
RJ=0;
,
2#id lcd.sh!/e34 BBDuncti#n t# cre!te sh!/e #" degree
'
lcdc-d30AFE4;
41 | P a g e
lcdd!t!3104;
lcdd!t!314;
lcdd!t!314;
lcdd!t!3104;
lcdd!t!304;
lcdd!t!304;
lcdd!t!304;
lcdd!t!304;
,
2#id tr!ns-it.d!t!3unsigned ch!r str4 BB Duncti#n t# tr!ns-it
d!t! thr#ugh seri!l /#rt
'
SGHD=str; BBSt#re d!t! in
SGHD
9hile3=J==04; BBW!it till d!t!
tr!ns-its
=J=0;
,
2#id tr!ns.string3ch!r 8/4
'
9hile38/:=;<0;4
'
SGHD=8/;
9hile3=J==04;
=J=0;
/77;
,
,
2#id -ess!ge34
'
int 61l;
unsigned ch!r b$%='(Cell#(,;
lcdc-d30A014;
lcdc-d30AF04;

del!53504;
lcd.string3(Re!d5(4;
del!53104;
lcdc-d30A014;

tr!ns.string3(+=(4; BB
=r!ns-it ;+; t# seri!l /#rt
del!531004;
tr!ns.string3(+=7I>*D=1<r<n(4;
del!531004;
lcd.string3(?P(4;
tr!ns.string3(+=7I>*S=<(7N1NN2&0051Q<(<r<n(4;
lcdc-d30A014;
42 | P a g e
lcd.string3(Nu-ber sent(4;
del!531004;
lcdc-d30A014;
tr!ns.string3(+ccident h!s ?ccured.....(4;
tr!ns.string3(....K!titude....(4;
"#r36=0;6<=11;6774
'
tr!ns-it.d!t!3in"#$076%4;
,
tr!ns.string3(.....(4;
tr!ns.string3(....K#ngitude....(4;
"#r3l=0;l<12;l774
'
tr!ns-it.d!t!3in"#$017l%4;
,
tr!ns-it.d!t!30A1+4;
del!531004;
lcdc-d30A014;
lcd.string3(>ssg Sent(4;
,
2#id lcd.l!titude34 BBDuncti#n t# dis/l!5 K!titude
'
unsigned int c2=c#--!./#siti#n$1%; BBP#siti#n #" sec#nd c#--!
lcd.sh!/e34;
lcdc-d30A014; BB Ile!r KI@ dis/l!5
lcdc-d30AFE4; BB>#2e curs#r t# /#siti#n & #" line 1
lcd.string3(K+=J=H@E(4; BBSh#9ing K!titude
lcdc-d30AI04; BBGeginning #" sec#nd line
lcdd!t!3in"#$c271%4;
lcdd!t!3in"#$c272%4;
lcdd!t!304; BB@egree s5-b#l
lcdd!t!3in"#$c27Q%4;
lcdd!t!3in"#$c27E%4;
lcdd!t!3in"#$c275%4;
lcdd!t!3in"#$c27&%4;
lcdd!t!3in"#$c27%4;
lcdd!t!3in"#$c27F%4;
lcdd!t!3in"#$c27N%4;
lcdd!t!30A24; BB+SIJJ #" -inute sign3;4
lcdd!t!3in"#$c2710%4;
lcdd!t!3in"#$c2711%4;
del!532504;
0=c2;
,
2#id lcd.l#ngitude34
'
unsigned int cE=c#--!./#siti#n$Q%;
lcdc-d30A014; BBIle!r KI@ dis/l!5
43 | P a g e
lcdc-d30AFE4; BB>#2e curs#r t# /#siti#n E #" line 1
lcd.string3(K?N*J=H@E(4; BBSh#9ing K#ngitude
lcdc-d30AI04; BBGegining #" sec#nd line
lcdd!t!3in"#$cE71%4;
lcdd!t!3in"#$cE72%4;
lcdd!t!3in"#$cE7Q%4;
lcdd!t!304;
lcdd!t!3in"#$cE7E%4;
lcdd!t!3in"#$cE75%4;
lcdd!t!3in"#$cE7&%4;
lcdd!t!3in"#$cE7%4;
lcdd!t!3in"#$cE7F%4;
lcdd!t!3in"#$cE7N%4;
lcdd!t!3in"#$cE710%4;
lcdd!t!30A24; BB+SIJJ #" -inute sign3;4
lcdd!t!3in"#$cE711%4;
lcdd!t!3in"#$cE712%4;
del!532504;
01=cE;
-ess!ge34;
,
2#id -!in34
'
SENS=1;
seri!l34;
lcdc-d30A014;
lcdc-d30AQF4; BB2 KJNE1 5R >+=RJR
lcdc-d30A0&4;
lcdc-d30A0E4; BB@JSPK+S ?N1 IHRS?R GKJNPJN*
JE=0ANE;
9hile314
'
i"3SENS==04
'
del!5314;
,
SENS=1;
i"3SENS:=04
'
i"3chec0==&N4
'
c#-/!re34;
,
,,
,
44 | P a g e
45 | P a g e

S-ar putea să vă placă și