Beruflich Dokumente
Kultur Dokumente
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION ENGINEERING
SUBMITTED BY
A.NAYANA VAISHNAVI 138B1A0403
M.TEJASWINI 138B1A0428
A.BHARATHI 138B1A0404
We are thankful to our beloved Treasurer, Sri SIDDHA BHARATH garu, who
took keen interest and encouraged us in every effort throughout the course.
Finally, we thank all the faculty members, supporting staff of ECE Department and friends
for their kind co-operation and valuable help for completing the seminar.
SUBMITTED BY
A
T
8
9
64k
S
5 Bytes
INTRODUCTION TO EMBEDDED SYSTEMS
60k4k Bytes
DIRECT
Bytes
Internal
2
1.1 Introduction:
ADDRESSING External
External
ONLY RESET Smoke Sensor
FFF
0000 0000
If the SP is initialized to this area enough bytes should be left aside to prevent SP data
destruction.
A & B REGISTERS:
They are used during math and logically operations. The register A is also used for all
data transfers between the micro controller and memory. The B register is used during
multiplication and divided operations. For other instructions it can be treated as another
scratch pad register.
It contains math flags user flags F0 and register select bits RS1 and RS0 to determine
the working register bank.
PC (PROGRAM COUNTER):
It addresses the memory locations that program instructions are to be fetched. It is the
only register that does not have any internal address.
FLAGS:
They are 1bit register provided to store the results of certain program instructions. Other
instructions can test the conditions of the flags and make the decisions accordingly. To
conveniently address, they are grouped inside the PSW and PCON. The micro controller has
4 main flags: carry(c), auxiliary carry (AC), over flow (OV), parity (P) and 3 general-purpose
flagsF0, GF0 and GF1.
PORTS:
All ports are bi-directional; each consists of a latch, an output driver and an input
buffer. P0, P1, P2 and P3 are the SFR latches ports 0, 1, 2 and 3 respectively. The main
functions of each port are mentioned below.
Port0: input/output bus port, address output port and data input/output port.
Port1: Quasi-bi-directional input/output port.
Port2: Quasi-bi-directional input/output port and address output port.
Port3: Quasi-bi-directional input/output port and control input/output pin.
SFRs, IP, TMOD, SCON, and PCON contain control and status bits for the interrupt system,
Timers/counters and the serial port.
3.5.2 OSCILLATOR AND CLOCK CIRCUIT: This circuit generates the clock pulses by
which all internal operations are synchronized. For the microcontroller to yield standard baud
rates, the crystal frequency is chosen as 11.059MHz.
RESET:
The Reset switch is the RST pin of the microcontroller, which is the input to a Schmitt
trigger. It is accomplished by holding the RST pin HIGH for at least two machine cycles
while the oscillator frequency is running the CPU responds by generating an internal reset.
3.5.3 TIMERS/COUNTER:
Micro controller has two 16- bit Timer/Counter register T0 and T1 configured to operate
either as timers or event counters. There are no restrictions on the duty cycle of the external
input signal, but it should be for at least one full machine to ensure that a given level is
sampled at least once before it changes. Timers 0 and 1 have four operating modes: 13-bit
mode, 16 bit mode, 8 bit auto-reload mode. Control bits C/t in TMOD SFR select the
timer or counter function.
MODE 0:
Both timers in MODE0 are counters with a divide by 32 pre-scalar. The timer
register is configured as a 13 bit register with all 8 bits of TH1 and the lower 5-bit of
TL1.The upper 3 bits of TL1 are in determinate and should be ignored. Setting the run flags
(TR1) doesnt clear the register or the registers.
MODE1:
Mode 1 is same as mode 0, except that the timer register is run with all 16 bits. The clock is
applied to the combined high and low timer registers. An overflow occurs on the overflow
flag. The timer continues to count.
MODE 2:
This mode configures the timer register as an 8 bit counter (TL1/0) with automatic reload.
Overflow from TL1/0 not only sets TF1/0, but also reloads TL1/0 with the contents of TH1/0,
which is preset by software. The reload leaves unchanged.
MODE3:
Mode 3 is used for application that requires an extra 8 bit timer or counter. Timer 1 in mode
3 simply holds its count. The effect is same as setting TR0. Timer 0 its mode 3 establishes
TL0 and TL1 as two separate counters. TL0 uses the timer0 control bits C/T, GATE, TR0,
INT0 and TF0. TH0 is locked into a timer function and over the use of TR1 and TR2 from
timer 1. Thus TH0 controls the timer 1 interrupts.
3.6 INTERRUPTS:
The micro controller provides 6 interrupt sources, 2 external interrupts, 2 timer interrupts
and a serial port interrupt and a reset. The external interrupts (INT0 & INT1) can each be
either level activated or transition activated depending on bits IT0 and IT1 in register TCON.
The flags that actually generate these interrupts are IE0 & IE1 bits in TCON.
TF0 and TF1 generate the timer 0 & 1 interrupts, which are set by a roll over in their
respective timer/counter registers. When a timer interrupt is generated the on-chip hardware
clears the flag that generated it when the service routine is vectored to the serial port interrupt
is generated by logical OR of R1 & T1. Neither of these flags is cleared by hardware when
service routine is vectored to. In fact, the service routine itself determines whether R1 & T1
generated the interrupt, and the bit is cleared in the software.
Upon reset, all interrupts are disabled, meaning that none will be responded to by the micro
controller if they are activated. The interrupts must be enabled by software in order for the
micro controller to respond to them.
3.7SERIALINTERFACE:
The serial port is full duplex, i.e. it can transmit and receive simultaneously. It is also receive
buffered which implies it can begin receiving a second byte before a previously byte has been
read from the receive register. The serial port receives and transmits register and reading
SBUF accesses a physically separate receive register.
This serial interface had four modes of operation:
MODE 0: this mode of operation the serial data enters and exists through RXD.TXD outputs
the shift clock. Eight data bits are transmitted/ received, with the LSB first, the baud rate is
fixed at 1/12 of the oscillator frequency. Reception is initialized by the condition RI-0 and
REN=1.
MODE 1:
This mode 10 bits (a start bit 0, 8 data bits with LSB first and a stop bit are transmitted
through TXD port received through RXD. At the receiving end the stop bits goes into RB8 in
the SFR SCON. The baud rate is variable.
MODE 2:
Here 2, 16 bits (a start bit 0, 8 data bits (LSDB first), a programmable 9th data bit and a stop
bit) are transmitted through TXD or received through RXD. The baud rate is programmable
to either 1/32 or 1/64 of the oscillator frequency
MODE3:
The function of mode 3 is same as mode 2 except that the baud rate is variable. Reception is
initialized by the incoming start bit if REN=1.
3.9 PROGRAM MEMORY LOCK BITS: On the chip are three lock bits, which can be left
un-programmed (u) or can be programmed (p) to obtain the additional features listed in the
table below.
When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched during
reset.
Table 1.1
If the device is powered up without a reset, the latch initializes to a random value, and holds
that value until reset is activated. It is necessary state the latched value of EA be in agreement
with the current logic level at that pin in order for the device to function properly.
CHAPTER-4
GSM TECHNOLOGY
4.1 Introduction:
4.1.1Definition of GSM:
GSM (Global System for Mobile communications) is an open, digital cellular
technology used for transmitting mobile voice and data services.
4.1.2 History
In 1982, the European Conference of Postal and Telecommunications Administrations
(CEPT) created the Group Special Mobile (GSM) to develop a standard for a mobile
telephone system that could be used across Europe. In 1987, a memorandum of
understanding was signed by 13 countries to develop a common cellular telephone system
across Europe. Finally the system created by SINTEF lead by Torleiv Maseng was selected.
GSM-900 uses 890915 MHz to send information from the mobile station to the base
station (uplink) and 935960 MHz for the other direction (downlink), providing 124 RF
channels (channel numbers 1 to 124) spaced at 200 kHz. Duplex spacing of 45 MHz is used.
In some countries the GSM-900 band has been extended to cover a larger frequency range.
This 'extended GSM', E-GSM, uses 880915 MHz (uplink) and 925960 MHz (downlink),
adding 50 channels (channel numbers 975 to 1023 and 0) to the original GSM-900 band.
Time division multiplexing is used to allow eight full-rate or sixteen half-rate speech
channels per radio frequency channel. There are eight radio timeslots (giving eight burst
periods) grouped into what is called a TDMA frame. Half rate channels use alternate frames
in the same timeslot. The channel data rate for all 8 channels is 270.833 Kbit/s, and the frame
duration is 4.615 ms.
The transmission power in the handset is limited to a maximum of 2 watts in
GSM850/900 and 1 watt in GSM1800/1900. GSM operates in the 900MHz and 1.8GHz
bands in Europe and the 1.9GHz and 850MHz bands in the US. The 850MHz band is also
used for GSM and 3G in Australia, Canada and many South American countries. By having
harmonized spectrum across most of the globe, GSMs international roaming capability
allows users to access the same services when travelling abroad as at home. This gives
consumers seamless and same number connectivity in more than 218 countries.
Terrestrial GSM networks now cover more than 80% of the worlds population. GSM
satellite roaming has also extended service access to areas where terrestrial coverage is not
available.
4.2.1 1G TECHNOLOGY:
The first generation of mobile telephony (written 1G) operated using analogue
communications and portable devices that were relatively large. It used primarily the
following standards:
AMPS (Advanced Mobile Phone System), which appeared in 1976 in the United
States, was the first cellular network standard. It was used primarily in the Americas,
Russia and Asia. This first-generation analogue network had weak security
mechanisms which allowed hacking of telephones lines.
TACS (Total Access Communication System) is the European version of the AMPS
model. Using the 900 MHz frequency band, this system was largely used in England
and then in Asia (Hong-Kong and Japan).
ETACS (Extended Total Access Communication System) is an improved version of
the TACS standard developed in the United Kingdom that uses a larger number of
communication channels.
The first-generation cellular networks were made obsolete by the appearance of an entirely
digital second generation.
GSM (Global System for Mobile communications) is the most commonly used
standard in Europe at the end of the 20th century and supported in the United States.
This standard uses the 900 MHz and 1800 MHz frequency bands in Europe. In the
United States, however, the frequency band used is the 1900 MHz band. Portable
telephones that are able to operate in Europe and the United States are therefore
called tri-band.
CDMA (Code Division Multiple Access) uses a spread spectrum technique that
allows a radio signal to be broadcast over a large frequency range.
TDMA (Time Division Multiple Access) uses a technique of time division of
communication channels to increase the volume of data transmitted simultaneously.
TDMA technology is primarily used on the American continent, in New Zealand and
in the Asia-Pacific region.
With the 2G networks, it is possible to transmit voice and low volume digital data, for
example text messages (SMS, for Short Message Service) or multimedia messages (MMS,
for Multimedia Message Service). The GSM standard allows a maximum data rate of 9.6
kbps.
Extensions have been made to the GSM standard to improve throughput. One of these is
the GPRS (General Packet Radio System) service which allows theoretical data rates on the
order of 114 Kbit/s but with throughput closer to 40 Kbit/s in practice. As this technology
does not fit within the "3G" category, it is often referred to as 2.5G
The EDGE (Enhanced Data Rates for Global Evolution) standard, billed as 2.75G,
quadruples the throughput improvements of GPRS with its theoretical data rate of 384 Kbps,
thereby allowing the access for multimedia applications. In reality, the EDGE standard allows
maximum theoretical data rates of 473 Kbit/s, but it has been limited in order to comply with
the IMT-2000 (International Mobile Telecommunications-2000) specifications from the ITU
(International Telecommuni1cations Union).
4.2.3 3G Technology:
The IMT-2000 (International Mobile Telecommunications for the year 2000) specifications
from the International Telecommunications Union (ITU) defined the characteristics
of 3G (third generation of mobile telephony). The most important of these characteristics are:
1. High transmission data rate.
2. 144 Kbps with total coverage for mobile use.
3. 384 Kbps with medium coverage for pedestrian use.
4. 2 Mbps with reduced coverage area for stationary use.
5. World compatibility.
6. Compatibility of 3rd generation mobile services with second generation networks.
3G offers data rates of more than 144 Kbit/s, thereby allowing the access to multimedia uses
such as video transmission, video-conferencing or high-speed internet access. 3G networks
use different frequency bands than the previous networks: 1885-2025 MHz and 2110-2200
MHz
The main 3G standard used in Europe is called UMTS (Universal Mobile
Telecommunications System) and uses WCDMA (Wideband Code Division Multiple
Access) encoding. UMTS technology uses 5 MHz bands for transferring voice and data, with
data rates that can range from 384 Kbps to 2 Mbps. HSDPA (High Speed Downlink Packet
Access) is a third generation mobile telephony protocol, (considered as "3.5G"), which is able
to reach data rates on the order of 8 to 10 Mbps. HSDPA technology uses the 5 GHz
frequency band and uses WCDMA encoding.
Introduction to the GSM Standard
The GSM (Global System for Mobile communications) network is at the start of the
21st century, the most commonly used mobile telephony standard in Europe. It is called as
Second Generation (2G) standard because communications occur in an entirely digital mode,
unlike the first generation of portable telephones.
When it was first standardized in 1982, it was called as Group Special Mobile and later, it
became an international standard called "Global System for Mobile communications" in
1991.
In Europe, the GSM standard uses the 900 MHz and 1800 MHz frequency bands. In
the United States, however, the frequency band used is the 1900 MHz band. For this reason,
portable telephones that are able to operate in both Europe and the United States are
called tri-band while those that operate only in Europe are called bi-band.
The GSM standard allows a maximum throughput of 9.6 kbps which allows transmission of
voice and low-volume digital data like text messages (SMS, for Short Message Service) or
multimedia messages (MMS, for Multimedia Message Service).
There are three basic principles in multiple access, FDMA (Frequency Division
Multiple Access), TDMA (Time Division Multiple Access), and CDMA (Code Division
Multiple Access). All three principles allow multiple users to share the same physical
channel. But the two competing technologies differ in the way user sharing the common
resource.
TDMA allows the users to share the same frequency channel by dividing the signal
into different time slots. Each user takes turn in a round robin fashion for transmitting and
receiving over the channel. Here, users can only transmit in their respective time slot.
CDMA uses a spread spectrum technology that is it spreads the information contained
in a particular signal of interest over a much greater bandwidth than the original signal.
Unlike TDMA, in CDMA several users can transmit over the channel at the same time.
TDMA in brief:
In late1980s, as a search to convert the existing analog network to digital as a means
to improve capacity, the cellular telecommunications industry association chose TDMA over
FDMA.
Time Division Multiplex Access is a type of multiplexing where two or more channels of
information are transmitted over the same link by allocating a different time interval for the
transmission of each channel. The most complex implementation using TDMA principle is of
GSMs (Global System for Mobile communication). To reduce the effect of co-channel
interference, fading and multipath, the GSM technology can use frequency hoping, where a
call jumps from one channel to another channel in a short interval.
TDMA systems still rely on switch to determine when to perform a handoff. Handoff
occurs when a call is switched from one cell site to another while travelling. The TDMA
handset constantly monitors the signals coming from other sites and reports it to the switch
without callers awareness. The switch then uses this information for making better choices
for handoff at appropriate times. TDMA handset performs hard handoff, i.e., whenever the
user moves from one site to another, it breaks the connection and then provides a new
connection with the new site.
Advantages of TDMA:
There are lots of advantages of TDMA in cellular technologies.
1. It can easily adapt to transmission of data as well as voice communication.
2. It has an ability to carry 64 kbps to 120 Mbps of data rates. This allows the operator to
do services like fax, voice band data and SMS as well as bandwidth intensive
application such as multimedia and video conferencing.
3. Since TDMA technology separates users according to time, it ensures that there will
be no interference from simultaneous transmissions.
4. It provides users with an extended battery life, since it transmits only portion of the
time during conversations. Since the cell size grows smaller, it proves to save base
station equipment, space and maintenance.
TDMA is the most cost effective technology to convert an analog system to digital.
Disadvantages of TDMA:
One major disadvantage using TDMA technology is that the users has a predefined time slot.
When moving from one cell site to other, if all the time slots in this cell are full the user
might be disconnected. Likewise, if all the time slots in the cell in which the user is currently
in are already occupied, the user will not receive a dial tone.
The second problem in TDMA is that it is subjected to multipath distortion. To overcome this
distortion, a time limit can be used on the system. Once the time limit is expired, the signal is
ignored.
Finally, the base station controllers are themselves physically connected to the Mobile
Switching Centre (MSC), managed by the telephone network operator, which connects them
to the public telephone network and the Internet. The MSC belongs to a Network Station
Subsystem (NSS), which is responsible for managing user identities, their location and
establishment of communications with other subscribers. The MSC is generally connected to
databases that provide additional functions:
Finally, GSM networks support the concept of roaming i.e., movement from one operator
network to another.
Introduction to Modem:
Fig4.4: Modem
Modem stands for modulator-demodulator.
A modem is a device or program that enables a computer to transmit data over
telephone or cable lines. Computer information is stored digitally, whereas information
transmitted over telephone lines is transmitted in the form of analog waves. A modem
converts between these two forms.
While the modem interfaces are standardized, a number of different protocols for
formatting data to be transmitted over telephone lines exist. Some, like CCITT V.34 are
official standards, while others have been developed by private companies. Most modems
have built-in support for the more common protocols at slow data transmission speeds at
least, most modems can communicate with each other. At high transmission speeds, however,
the protocols are less standardized.
Apart from the transmission protocols that they support, the following characteristics
distinguish one modem from another:
Bps: How fast the modem can transmit and receive data. At slow rates, modems are
measured in terms of baud rates. The slowest rate is 300 baud (about 25 cps). At
higher speeds, modems are measured in terms of bits per second (bps). The fastest
modems run at 57,600 bps, although they can achieve even higher data transfer rates
by compressing the data. Obviously, the faster the transmission rate, the faster the data
can be sent and received. It should be noted that the data cannot be received at a faster
rate than it is being sent.
Voice/data: Many modems support a switch to change between voice and data
modes. In data mode, the modem acts like a regular modem. In voice mode, the
modem acts like a regular telephone. Modems that support a voice/data switch have a
built-in loudspeaker and microphone for voice communication.
Auto-answer: An auto-answer modem enables the computer to receive calls in the
absence of the operator.
Data compression: Some modems perform data compression, which enables them to
send data at faster rates. However, the modem at the receiving end must be able to
decompress the data using the same compression technique.
Flash memory: Some modems come with flash memory rather than conventional
ROM which means that the communications protocols can be easily updated if
necessary.
Fax capability: Most modern modems are fax modems, which mean that they can
send and receive faxes.
4.7Introduction to AT Commands
AT commands are instructions used to control a modem. AT is the abbreviation of
ATtention. Every command line starts with "AT" or "at". That's the reason, modem
commands are called AT commands. Many of the commands that are used to control wired
dial-up modems, such as ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return
to online data state) are also supported by GSM modems and mobile phones.
Besides this common AT command set, GSM modems and mobile phones support an
AT command set that is specific to the GSM technology, which includes SMS-related
commands like AT+CMGS (Send SMS message), AT+CMSS (Send SMS message from
storage), AT+CMGL (List SMS messages) and AT+CMGR (Read SMS messages).
It should be noted that the starting "AT" is the prefix that informs the modem about the start
of a command line. It is not part of the AT command name. For example, D is the actual AT
command name in ATD and +CMGS is the actual AT command name in AT+CMGS.
Some of the tasks that can be done using AT commands with a GSM modem or mobile phone
are listed below:
Get basic information about the mobile phone or GSM modem. For example, name of
manufacturer (AT+CGMI), model number (AT+CGMM), IMEI number (International
Mobile Equipment Identity) (AT+CGSN) and software version (AT+CGMR).
Get basic information about the subscriber. For example, MSISDN (AT+CNUM) and
IMSI number (International Mobile Subscriber Identity) (AT+CIMI).
Get the current status of the mobile phone or GSM/GPRS modem. For example,
mobile phone activity status (AT+CPAS), mobile network registration status
(AT+CREG), radio signal strength (AT+CSQ), battery charge level and battery
charging status (AT+CBC).
Establish a data connection or voice connection to a remote modem (ATD, ATA, etc).
Send and receive fax (ATD, ATA, AT+F*).
Send (AT+CMGS, AT+CMSS), read (AT+CMGR, AT+CMGL), write (AT+CMGW)
or delete (AT+CMGD) SMS messages and obtain notifications of newly received
SMS messages (AT+CNMI).
Read (AT+CPBR), write (AT+CPBW) or search (AT+CPBF) phonebook entries.
Perform security-related tasks, such as opening or closing facility locks (AT+CLCK),
checking whether a facility is locked (AT+CLCK) and changing
passwords(AT+CPWD).
(Facility lock examples: SIM lock [a password must be given to the SIM card every
time the mobile phone is switched on] and PH-SIM lock [a certain SIM card is
associated with the mobile phone. To use other SIM cards with the mobile phone, a
password must be entered.])
Control the presentation of result codes / error messages of AT commands. For
example, the user can control whether to enable certain error messages (AT+CMEE)
and whether error messages should be displayed in numeric format or verbose format
(AT+CMEE=1 or AT+CMEE=2).
Get or change the configurations of the mobile phone or GSM/GPRS modem. For
example, change the GSM network (AT+COPS), bearer service type (AT+CBST),
radio link protocol parameters (AT+CRLP), SMS center address (AT+CSCA) and
storage of SMS messages (AT+CPMS).
Save and restore configurations of the mobile phone or GSM/GPRS modem. For
example, save (AT+CSAS) and restore (AT+CRES) settings related to SMS
messaging such as the SMS center address.
It should be noted that the mobile phone manufacturers usually do not implement all AT
commands, command parameters and parameter values in their mobile phones. Also, the
behavior of the implemented AT commands may be different from that defined in the
standard. In general, GSM modems, designed for wireless applications, have better support of
AT commands than ordinary mobile phones.
5.1 LCD:
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In
this LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers,
namely, Command and Data.
The command register stores the command instructions given to the LCD. A
command is an instruction given to LCD to do a predefined task like initializing it, clearing
its screen, setting the cursor position, controlling display etc. The data register stores the data
to be displayed on the LCD. The data is the ASCII value of the character to be displayed on
the LCD.
A liquid crystal display (LCD) is a thin, flat electronic visual display that uses the
light modulating properties of liquid crystals (LCs). LCs does not emit light directly.
Each pixel of an LCD typically consists of a layer of molecules aligned between two
transparent electrodes, and two polarizing filters the axes of transmission of which are (in
most of the cases) perpendicular to each other. With no actual liquid crystal between the
polarizing filters, light passing through the first filter would be blocked by the second
(crossed) polarizer. In most of the cases the liquid crystal has double refraction
The surfaces of the electrodes that are in contact with the liquid crystal material are
treated so as to align the liquid crystal molecules in a particular direction. This treatment
typically consists of a thin polymer layer that is unidirectional rubbed using, for example, a
cloth. The direction of the liquid crystal alignment is then defined by the direction of rubbing.
Electrodes are made of a transparent conductor called Indium Tin Oxide (ITO).
If the applied voltage is large enough, the liquid crystal molecules in the center of the
layer are almost completely untwisted and the polarization of the incident light is not rotated
as it passes through the liquid crystal layer. This light will then be mainly polarized
perpendicular to the second filter, and thus be blocked and the pixel will appear black.
LCD with top polarizer removed from device and placed on top, such that the top and
bottom polarizers are parallel.
The optical effect of a twisted nematic device in the voltage-on state is far less
dependent on variations in the device thickness than that in the voltage-off state. Because of
this, these devices are usually operated between crossed polarizer such that they appear bright
with no voltage. These devices can also be operated between parallel polarizer, in which case
the bright and dark states are reversed. The voltage-off dark state in this configuration
appears blotchy, however, because of small variations of thickness across the device.
Both the liquid crystal material and the alignment layer material contain ionic
compounds. If an electric field of one particular polarity is applied for a long period of time,
this ionic material is attracted to the surfaces and degrades the device performance. This is
avoided either by applying an alternating current or by reversing the polarity of the electric
field as the device is addressed.
When a large number of pixels are needed in a display, it is not technically possible to
drive each directly since then each pixel would require independent electrodes. Instead, the
display is multiplexed. In a multiplexed display, electrodes on one side of the display are
grouped and wired together (typically in columns), and each group gets its own voltage
source. On the other side, the electrodes are also grouped (typically in rows), with each group
getting a voltage sink.
5.1.1 PIN DESCRIPTION:
Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins (two
pins are extra in both for back-light LED connections).
CONTROL LINES
EN:
Line is called "Enable." This control line is used to tell the LCD that you are sending
it data. To send data to the LCD, your program should make sure this line is low (0) and then
set the other two control lines and/or put data on the data bus. When the other lines are
completely ready, bring EN high (1) and wait for the minimum amount of time required by
the LCD datasheet (this varies from LCD to LCD), and end by bringing it low (0) again.
RS:
Line is the "Register Select" line. When RS is low (0), the data is to be treated as a
command or special instruction (such as clear screen, position cursor, etc.). When RS is high
(1), the data being sent is text data which would be displayed on the screen. For example, to
display the letter "T" on the screen you would set RS high.
RW:
Line is the "Read/Write" control line. When RW is low (0), the information on the
data bus is being written to the LCD. When RW is high (1), the program is effectively
querying (or reading) the LCD. Only one instruction ("Get LCD status") is a read command.
All others are write commands, so RW will almost always be low.
Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation
selected by the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1,
DB2, DB3, DB4, DB5, DB6, and DB7.
Logic status on control lines:
E - 0 Access to LCD disabled
-1 Access to LCD enabled
R/W - 0 Writing data to LCD
-1 Reading data from LCD
RS - 0 Instructions
-1 Character
5.2.1 TRANSFORMER:
A transformer is an electrical device which is used to convert electrical power from
one electrical circuit to another without change in frequency.
Transformers convert AC electricity from one voltage to another with little loss of
power. Transformers work only with AC and this is one of the reasons why mains electricity
is AC. Step-up transformers increase in output voltage, step-down transformers decrease in
output voltage. Most power supplies use a step-down transformer to reduce the dangerously
high mains voltage to a safer low voltage. The input coil is called the primary and the output
coil is called the secondary. There is no electrical connection between the two coils; instead
they are linked by an alternating magnetic field created in the soft-iron core of the
transformer. The two lines in the middle of the circuit symbol represent the core.
Transformers waste very little power so the power out is (almost) equal to the power in. Note
that as voltage is stepped down current is stepped up. The ratio of the number of turns on
each coil, called the turns ratio, determines the ratio of the voltages. A step-down transformer
has a large number of turns on its primary (input) coil which is connected to the high voltage
mains supply, and a small number of turns on its secondary (output) coil to give a low output
voltage.
Figure 5.4: Electrical Transformer
Turns ratio = Vp/ VS = Np/NS
VS X IS=VP X IP
5.3 RECTIFIER:
A circuit, which is used to convert ac to dc, is known as RECTIFIER. The process of
conversion ac to dc is called rectification
TYPES OF RECTIFIERS
Type of Rectifier
Number of diodes
1 2 4
PIV of diodes
Vm 2Vm Vm
no-load
Ripple
Frequency f 2f 2f
Rectification
Transformer
Factor(TUF)
er.
.
Fig 5.2: Comparison of rectifier circuits
Full-wave Rectifier
From the above comparisons we came to know that full wave bridge rectifier as more
advantages than the other two rectifiers. So, in our project we are using full wave bridge
rectifier circuit
Bridge Rectifier
A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-wave
rectification. This is a widely used configuration, both with individual diodes wired as shown
and with single component bridges where the diode bridge is wired internally. A bridge
rectifier makes use of four diodes in a bridge arrangement as shown in fig (a) to achieve full-
wave rectification. This is a widely used configuration, both with individual diodes wired as
shown and with single component bridges where the diode bridge is wired
A proximity sensor is a sensor able to detect the presence of nearby objects without any
physical contact. A proximity sensor often emits an electromagnetic field or a beam of
electromagnetic radiation (infrared, for instance), and looks for changes in the field or return
signal. The object being sensed is often referred to as the proximity sensor's target. It is the
same principle in ALL Infra-Red proximity sensors. The basic idea is to send infrared light
through IR-LEDs, which is then reflected by any object in front of the sensor. Then all you
have to do is to pick-up the reflected IR light. For detecting the reflected IR light, we are
going to use a very original technique: we are going to use another IR-LED, to detect the IR
light that was emitted from another LED of the exact same type. This is an electrical property
of Light Emitting Diodes (LEDs) which is the fact that a LED produces a voltage difference
across its leads when it is subjected to light. As if it was a photo-cell, but with much lower
output current.
SMOKE SENSOR
A gas detector is a device that detects the presence of gases in an area, often as part of a
safety system. This type of equipment is used to detect a gas leak and interface with a control
system so a process can be automatically shut down. A gas detector can sound an alarm to
operators in the area where the leak is occurring, giving them the opportunity to leave. This
type of device is important because there are many gases that can be harmful to organic life,
such as humans or animals
5.4 FILTER:
A Filter is a device, which removes the ac component of rectifier output but allows the
dc component to reach the load
Capacitor Filter
We have seen that the ripple content in the rectified output of half wave rectifier is
121% or that of full-wave or bridge rectifier or bridge rectifier is 48% such high percentages
of ripples is not acceptable for most of the applications. Ripples can be removed by one of the
following methods of filtering:
(a) A capacitor, in parallel to the load, provides an easier bypass for the ripples voltage
though it due to low impedance. At ripple frequency and leave the d.c.to appears the load.
(b) An inductor, in series with the load, prevents the passage of the ripple current (due to high
impedance at ripple frequency) while allowing the dc (due to low resistance to dc)
(c) Various combinations of capacitor and inductor, such as L-section filter section filter,
multiple section filter etc. which make use of both the properties mentioned in (a) and (b)
above. Two cases of capacitor filter, one applied on half wave rectifier and another with full
wave rectifier.
5.5 REGULATOR
Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable
output voltages. The maximum current they can pass also rates them. Negative voltage
regulators are available, mainly for use in dual supplies. Most regulators include some
automatic protection from excessive current ('overload protection') and overheating ('thermal
protection'). Many of the fixed voltage regulator ICs have 3 leads and look like power
transistors, such as the 7805 +5V 1A regulator shown on the right. The LM7805 is simple to
use. You simply connect the positive lead of your unregulated DC power supply (anything
from 9VDC to 24VDC) to the Input pin, connect the negative lead to the Common pin and
then when you turn on the power, you get a 5 volt supply from the output pin.
78XX
The Bay Linear LM78XX is integrated linear positive regulator with three terminals.
The LM78XX offer several fixed output voltages making them useful in wide range of
applications. When used as a zener diode/resistor combination replacement, the LM78XX
usually results in an effective output impedance improvement of two orders of magnitude,
lower quiescent current. The LM78XX is available in the TO-252, TO-220 & TO-
263packages,
Features
No External Component
Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V
Figure5.9:Potentiometer
Potentiometers are rarely used to directly control significant power (more than a watt).
Instead they are used to adjust the level of analog signals (e.g. volume controls on audio
equipment), and as control inputs for electronic circuits.
5.7 RESISTOR:
A resistor is a two-terminal passive electronic component which implements electrical
resistance as a circuit element. When a voltage V is applied across the terminals of a resistor,
a current I will flow through the resistor in direct proportion to that voltage. The reciprocal of
the constant of proportionality is known as the resistance R, since, with a given voltage V, a
larger value of R further "resists" the flow of current I as given by Ohm's law.
Resistors are common elements of electrical networks and electronic circuits and
are ubiquitous in most electronic equipment. Practical resistors can be made of various
compounds and films, as well as resistance wire (wire made of a high-resistivity alloy, such
as nickel-chrome). Resistors are also implemented within integrated circuits, particularly
analog devices, and can also be integrated into hybrid and printed circuits. The electrical
functionality of a resistor is specified by its resistance: common commercial resistors are
manufactured over a range of more than 9 orders of magnitude.
5.8 CAPACITOR:
In electronics, a ceramic capacitor is a capacitor constructed of alternating layers
of metal and ceramic, with the ceramic material acting as the dielectric. The coefficient
depends on whether the dielectric is Class 1 or Class 2. A ceramic capacitor (especially the
class 2) often has high dissipation factor, high frequency coefficient of dissipation
A ceramic is a two terminal non polar device. The classical ceramic capacitor is the Disc
Capacitor. This device pre-dates the transistor and was used extensively in vacuum tube
equipment(Ex: Radio receivers).From about 1930 through the 1950s , and discrete transistor
equipment from the 1950s through the 1980s.Asof 2007,ceramic disc capacitors are in
widespread use in electronic equipment ,providing high capacity and small size at low price
compared to other low value capacitor types.
bare leadless disc, sits in a slot in the PCB and is soldered in place, used for UHF
applications
ELECTROLYTIC CAPACITOR
Figure5.11: Pushbutton
This is about something commonly unnoticeable when using these components in everyday
life. It is about contact bounce, a common problem with mechanical switches. If contact
switching does not happen so quickly, several consecutive bounces can be noticed prior to
maintain stable state. The reasons for this are: vibrations, slight rough spots and dirt. Anyway,
this whole process does not last long (a few micro- or milliseconds), but long enough to be
registered by the microcontroller. Concerning the pulse counter, error occurs in almost 100%
of cases.
The simplest solution is to connect simple RC circuit which will suppress each quick voltage
change. Since the bouncing time is not defined, the values of elements are not strictly
determined. In the most cases, the values shown on figure are sufficient.
Switch Interfacing with 8051:
In 8051 PORT 1, PORT 2 & PORT 3 have internal 10k Pull-up resistors whereas
this Pull-up resistor is absent in PORT 0. Hence PORT 1, 2 & 3 can be directly used to
interface a switch whereas we have to use an external 10k pull-up resistor for PORT 0 to be
used for switch interfacing or for any other input. Figure 1 shows switch interfacing for
PORT 1, 2 & 3. Figure 2 shows switch interfacing to PORT 0.
For any pin to be used as an input pin, a HIGH (1) should be written to the pin if
the pin will always to be read as LOW. In the above figure, when the switch is not pressed,
the 10k resistor provides the current needed for LOGIC 1 and closure of switch provides
LOGIC 0 to the controller
Introduction:
A light-emitting diode (LED) is a semiconductor diode that emits light when an electrical
current is applied in the forward direction of the device, as in the simple LED circuit. The
effect is a form of electroluminescence where incoherent and narrow-spectrum light is
emitted from the p-n junction..
Basic principle:
Like a normal diode, the LED consists of a chip of semi conducting material impregnated, or
doped, with impurities to create a p-n junction. As in other diodes, current flows easily from
the p-side, or anode, to the n-side, or cathode, but not in the reverse direction. Charge-carriers
electrons and holes flow into the junction from electrodes with different voltages. When an
electron meets a hole, it falls into a lower energy level, and releases energy in the form of a
photon.
Bar graphs
Seven segment
Star Burst
Dot Matrix
Miniature LEDs
Different sized LEDs. 8 mm, 5mm and 3 mm
These are mostly single-die LEDs used as indicators, and they come in various-size packages:
surface mount
2 mm
3 mm (T1)
5 mm (T1)
10 mm
The encapsulation may also be clear or semi opaque to improve contrast and viewing angle.
Flashing LEDs
Flashing LEDs are used as attention seeking indicators where it is desired to avoid the
complexity of external electronics. Flashing LEDs resemble standard LEDs but they contain
an integrated multivibrator circuit inside which causes the LED to flash with a typical period
of one second. In diffused lens LEDs this is visible as a small black dot. Most flashing LEDs
emit light of a single color, but more sophisticated devices can flash between multiple colors
and even fade through a color sequence using RGB color mixing.
Multi-Color LEDs
A bi-color LED is actually two different LEDs in one case. It consists of two dies
connected to the same two leads but in opposite directions. Current flow in one direction
produces one color, and current in the opposite direction produces the other color. Alternating
the two colors with sufficient frequency causes the appearance of a third color. A tri-color
LED is also two LEDs in one case, but the two LEDs are connected to separate leads so that
the two LEDs can be controlled independently and lit simultaneously.
RGB LEDs contain red, green and blue emitters, generally using a four-wire
connection with one common (anode or cathode). The Taiwanese LED manufacturer Ever
light has introduced a 3 watt RGB package capable of driving each die at 1 watt.
Alphanumeric LEDs
LED displays are available in seven-segment and starburst format. Seven-segment displays
handle all numbers and a limited set of letters. Starburst displays can display all letters.
Seven-segment LED displays were in widespread use in the 1970s and 1980s, but increasing
use of liquid crystal displays, with their lower power consumption and greater display
flexibility, has reduced the popularity of numeric and alphanumeric LED displays.
Applications:
Instrument Panels & Switches, Courtesy Lighting, CHMSL, Rear Stop/Turn/Tai, Retrofits,
New Turn/Tail/Marker Lights.
Traffic, Rail, Aviation, Tower Lights, Runway Lights, Emergency/Police Vehicle Lighting.
Medical Instrumentation, Bar Code Readers, Color & Money Sensors, Encoders, Optical
Switches, Fiber Optic Communication.
BUZZER
It most commonly consists of a number of switches or sensors connected to a control unit that
determines if and which button was pushed or a preset time has lapsed, and usually
illuminates a light on the appropriate button or control panel, and sounds a warning in the
form of a continuous or intermittent buzzing or beeping sound. Initially this device was based
on an electromechanical system which was identical to an electric bell without the metal gong
. Often these units were anchored to a wall or ceiling and used the ceiling or wall as a
sounding board. Another implementation with some AC-connected devices was to implement
a circuit to make the AC current into a noise loud enough to drive a loudspeaker and hook
this circuit up to a cheap 8-ohm speaker. Nowadays, it is more popular to use a ceramic-based
piezoelectric sounder like a Son alert which makes a high-pitched tone. Usually these were
hooked up to "driver" circuits which varied the pitch of the sound or pulsed the sound on and
off. The word "buzzer" comes from the rasping noise that buzzers made when they were
electromechanical devices, operated from stepped-down AC line voltage at 50 or 60 cycles.
Other sounds commonly used to indicate that a button has been pressed are a ring or a beep.
CHAPTER-6
SOFTWARE IMPLEMENTATION
This chapter briefly explains about the firmware implementation of the project. The
required software tools are discussed in section 4.2. Section 4.3 shows the flow diagram of
the project design. Section 4.4 presents the firmware implementation of the project design.
CHAPTER -7